Coder Social home page Coder Social logo

Comments (3)

jones139 avatar jones139 commented on June 17, 2024

I think the options are:

  1. The current way - maintain an osm2pgsql database on a database server, and keep it up to date using osmosis and osm2pgsql. Generate the data files periodically and up-load them to web server.
    Pros: Simple, if database server crashes, web front end continues to work using latest available data.
    Cons: Does not scale well - one file per layer would get big if we try to run map for larger area, or for higher density features.
  2. Use Mapnik2 'MetaWriter' to generate image tiles for the map, but provide a data file for each tile to provide the interactive part of the map (data in popups). Use tilecache to upload tiles and metadata from database server to web server.
    Pros: Server side simple for static data - will need work to deal with expiry of tiles and meta-data.
    Cons: I think we will need a Leaflet plug-in to retrieve the meta-data each time a tile is downloaded, then add the data to the icon layer groups.
  3. Run an instance of xapi and have Leaflet generate an xapi query each time a tile is loaded to obtain the information.
    Pros: jxapi will be supported so should be able to get it running.
    Cons: Can not run jxapi on web server, so will be limited by upload speed of my internet connection to the database server, so could seem slow from a users point of view.
  4. Use database server to obtain diffs using osmosis and generate sql to keep a mysql database up to date on the web server.
    Pros - should be fast for the users because it uses the mysql server on the web server.
    Cons - will need a Leaflet plugin to obtain the data as tiles are loaded. Will need to develop the code to keep the mysql database up to date.

I think the options for scalability using our current hardware are 2 (mapnik metawriters) or 4 (mysql database on web server).
I would quite like to get the mysql version working, but the mapnik route will be the easiest. What do you think?

from brewmap.

jones139 avatar jones139 commented on June 17, 2024

I am minded to have a go at mapnik metawriters (http://sotm-eu.org/slides/58_HermannKraus_vortrag.pdf). I could make a set of transparent tiles with just small icons for the BrewMap features, and json files corresponding to each map tile.
Then it is just a matter of getting the javascript side working. Will give that a bit of thought tomorrow evening.

from brewmap.

jones139 avatar jones139 commented on June 17, 2024

Actually, I have been thinking some more - we do not actually need raster tiles produced by mapnik, so an Option 5 would be to use TileCache (http://tilecache.org) with a new backend - rather than a module that calls mapnik to produce a png of a particular area, it could query the database and produce a json file for a particular area - the json files would then be cached so they are quick to access next time. Still need the same client code to download the json each time a tile is downloaded and add the data to the map.

from brewmap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.