rendering a geojson to a png

My vector tiles are, sometimes, too heavy. I wanted to try rendering them to pngs with a transparent background, and filter small stuff out of my vector tile and display it completely transparent but interactive.

I cooked an input file using overpass, then osm2geo and geojson-mapnikify and have an ugly looking XML.
I think I have built mapnik OK, but I get

Error Projection error during map.zoom_all: failed to initialize projection with: '+init=epsg:3857'

I dont even know what an epsg really is, but epsg.io claims it’s area of use is “the world”.

there’s an issue on github but it’s quite old and I am not really following their points https://github.com/mapproxy/mapproxy/issues/136
I dont even have a /usr/share/proj/epsg

I did try building geotools but failed, but will accept “have another go with geotools”, or anything else, as an answer.

Hi, EPSG = https://en.wikipedia.org/wiki/EPSG_Geodetic_Parameter_Dataset It tells how “the world” is projected on a 2d surface like your computer screen :slight_smile:
I can’t help you with the details, but that’s what your issue concerns.

Dank je wel. So I guess I am using the correct projection, used by OSM and indeed everyone. Maybe I need to specify what zoom levels I want.

Graag gedaan

I made a file, with lines on it, by replacing +init=epsg:3857 with +proj=longlat +datum=WGS84 +no_defs

All I am trying to do is turn vector tiles, ready made, into pngs, this code shows me how simple that is to do
https://github.com/bjornreppen/rasterize-vector-tiles/blob/master/render.js

You do sometimes need to go backwards. it’s easy enough to end up with vector tiles that are just huge database dumps, especially as you go up the tree obviously. A raster layer if you like, allowing you to continue up the tree with as much data as you can handle in your reduction process, which in practice is going to be hundreds if not thousands of times greater than the client, and then present a radically reduced vector with a full detail raster. obviously you loose dynamic styling, but you get as much interactive detail as the client can reasonably handle.