0

I got my osm2pgsql/PostGIS/Mapnik/Nik4 setup up and running. I have tested it with the openstreetmap-carto style and everything works well. Now I want to change the style to Mapbox' pencil style (https://github.com/mapbox/mapbox-studio-pencil.tm2). I am not sure how to do that as this style does not have ".style" file that I could use with osm2pgsql. I have tried leaving data exported using openstreetmap-carto and exporting using Nik4 using the "project.xml" file. This only gives me the background image with nothing on it.

I guess I need to import the data to PostGIS with the correct style. How do I do this when I do not have the ".style" file? Or is it possible to do it without importing using the specific style?

2

This Pencil style depends from remote vector tiles from Mapbox not from PostGIS e.g https://github.com/mapbox/mapbox-studio-pencil.tm2/blob/master/project.yml#L21 so reusing them is not possible except if you create local vector tiles with the same data structure as Mapbox in your styles. Unfortunately for you, if you do so, you will infringe Mapbox licence (people already did e.g https://github.com/osm2vectortiles/osm2vectortiles#osm2vectortiles I quote their text below).

OSM2VectorTiles is claimed to be breaching intellectual property rights of Mapbox Inc. by implementing schema of vector tiles designed by this company (details in #387). It is not recommended to use this project in production systems.

I'm also not sure you can use Mapbox pencil style whether you create or not a key using a Mapbox account to connect to their vector tiles as this style is using mapbox.mapbox-streets-v6 and it's deprecated (https://docs.mapbox.com/vector-tiles/reference/mapbox-streets-v6/)

We recommend moving to Mapbox Streets v8 for additional features and improvements. Mapbox Streets v6 no longer receives data updates from OpenStreetMap.

| improve this answer | |

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.