-
Notifications
You must be signed in to change notification settings - Fork 122
Description
Version: tippecanoe v2.78.0
Context:
I have two polygon/multi-polygon geojsons: one representing the US states, and the other one representing the major cities/townships in US. Both have the same attributes. Originally they both come from one single table that I have, in that states geometries can overlap cities geometries a lot. I was trying to create a single pmtile file to include those two types of aois, but the tippecanoe creation takes really long time, probably due to large max zoom level that I set up.
Thus, I partitioned my aois and created tiles for each aoi types, namely state aoi and cities aoi, and I want to join them at the end. Just like the state and country example in the tippecanoe readme section. At last, I will self-serve this joined pmtile file with pmtiles library in a python fast api server, and I will consume this tile in a mapbox map, with the aim that in smaller zoom level, I show states. In larger zoom level, I show cities only.
Data:
State aoi:
I ran tippecanoe -o state.pmtiles state.geojson -z7 -Z3 --no-tile-compression -l state --no-tile-size-limit --no-feature-limit --buffer=0 --coalesce-densest-as-needed --extend-zooms-if-still-dropping
It shows:
51 features, 4883417 bytes of geometry and attributes, 17 bytes of string pool, 0 bytes of vertices, 0 bytes of nodes
During tile creation, no error or warning is triggered. and I can serve and render it normally in mapbox map from zoom level 3-7.
Cities aoi:
I ran tippecanoe -o city.pmtiles city.geojson -z14 -Z7 --no-tile-compression -l city --no-tile-size-limit --no-feature-limit --buffer=0 --coalesce-densest-as-needed --extend-zooms-if-still-dropping
It shows:
66140 features, 216173380 bytes of geometry and attributes, 16 bytes of string pool, 0 bytes of vertices, 0 bytes of nodes
Again, during tile creation, no error or warning is triggered. and I can also serve and render it normally in mapbox map from zoom level 7-14.
Tile joining:
After I confirmed both tiles work individually, I joined those two pmtiles to create a new one:
tile-join -o state-city.pmtiles state.pmtiles city.pmtiles, during which there is a warning that says zoom levels mismatch before and after joining.
When I load this joined tile into mapbox, with extra care on the 'source-layer' attribute in mapbox vector tile api to make sure the name matches. But I got error {error {message: 'Unimplemented type: 3'}.
Question:
Why do two tiles work normally separately, but error out when I used their joined version? How to exactly join two pmtiles and output one joined pmtiles for rendering? What optional params am I missing or misusing in the workflow above?
What I have tried to fix:
- tried .mbtiles for input and join, encountered the same issue, two tiles can render normally. But error out when rendering the joined tile.
- tried setting
-zgfor the cities.pmtile creation, in order to better mimic example in the readme. Still the same rendering error in mapbox map.
Any hint is appreciated, thanks. If this is not a proper place to ask question, would someone guide me to a place for help? Thanks and sorry if that is the case.