3

I'm looking for a way to transform geoJson (obtained from a query to potsgis) to mapbox vector format, serverside in nodejs, without using mapnik (I dont have access to the server and therefore cannot use mapnik, as it needs certain specific versions as seen here https://github.com/mapnik/node-mapnik/wiki/Troubleshooting)

Is there any libraries allowing to do that ?

5

I ended up using those two packages : https://github.com/mapbox/geojson-vt (for getting a tile from geojson) and https://github.com/mapbox/vt-pbf (for transforming this tile into pbf)

I made a quick module from that (maybe not ready for production use, but hey, it is a good start) : https://github.com/philippeauriach/vector-tiles-generator

1

With PostGIS >2.4.0, you can also convert your geometries to mapbox vector tiles directly. For more information, see http://postgis.net/docs//ST_AsMVT.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.