3 ms·
Does anyone have a simple way to make rendered images from osm data? Usually it involves postgres, but I wish there was a renderer that could use the vector til
by agencies 5y ago
Does anyone have a simple way to make rendered images from osm data? Usually it involves postgres, but I wish there was a renderer that could use the vector tiles directly...
- nielsole 5y agoOSMs source of truth is not organized around vector tiles, i believe. https://github.com/dfyz/osm-renderer https://github.com/dfyz/osm-renderer might be similar to what you are looking for
- mtmail 5y agohttps://github.com/systemed/tilemaker https://github.com/systemed/tilemaker can generate vector tiles directly from *.osm.pbf files. Then serve the vector tiles with leaflet+mapbox-gl-leaflet, mapbox gl js, openlayers 3 or similar. https://github.com/mapbox/awesome-vector-tiles https://github.com/mapbox/awesome-vector-tiles
- qwertox 5y agoThe simplest is to fetch the OSM tiles directly (and cache them!) imgurl = "https://a.tile.openstreetmap.org/{0}/{1}/{2}.png".format(zoom, xtile, ytile) the tricky part is to known which xtile, ytile to fetch, but Stack Overflow has the answer [1]. Then you can draw over them with `PIL` and also `cairo`, in order to lay SVG shapes onto the map. Cairo is somewhat hard to grasp, because it is outdated, but it draws perfectly smooth lines. [1] https://stackoverflow.com/a/28530369 https://stackoverflow.com/a/28530369
- mistrial9 5y agoif you think postgres is challenging, try mapnik directly!