You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I'm using pmtiles extract to get a piece of a larger tileset, sometimes I might not want every layer available. Could extract also filter layers or give me a way to include or exclude layers?
The API could look something like this:
# only extract buildings and county boundaries
pmtiles extract input.pmtiles output.pmtiles --bbox "..." --layers "buildings,boundaries_country"# get everything except water
pmtiles extract input.pmtiles output.pmtiles --bbox "..." --exclude-layers "water"
The text was updated successfully, but these errors were encountered:
I ran into similar use cases where I started out with the .pmtiles matching the default basemaps style https://github.com/protomaps/basemaps but then wanted to slightly deviate from it. For example when you want a very simple overview map as shown below where we only need to style the water, earth, boundaries layers. At the moment I simply use the .pmtiles with much more data in them as needed by the simple style.
Two more considerations here
In theory it should be possible to e.g. use ogr2ogr to convert to mbtiles and do the filtering there. In practice only most recent gdal-bin packages contain the pmtiles reader, tho.
One question could be: should this layer filter be a command line flag for the extract sub-command or should there be a pmtiles filter sub-command, or maybe both?
FWIW I tried doing this with the tile-join command from tippecanoe like this:
tile-join -l water -l earth -l boundaries -o output.pmtiles input.pmtiles
But it doesn't seem to succeed when using a full protomaps basemap pmtiles file (~120gb). Tries for several minutes then crashes on alpine linux and osx.
If I'm using
pmtiles extract
to get a piece of a larger tileset, sometimes I might not want every layer available. Couldextract
also filter layers or give me a way to include or exclude layers?The API could look something like this:
The text was updated successfully, but these errors were encountered: