-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI tool to concatenate or merge pmtiles #105
Comments
There are a few details that complicate doing this correctly.
In a perfect world we could accomplish all of the above with go-pmtiles, but it's preferable to first address the use cases people actually need (which do you need?). A major factor in determining these is whether it complicates the go-pmtiles dependencies. For example 2) above would require adding image processing libraries for PNG, JPG etc which will probably need a native dependency (we don't want any). |
I have a Jekyll blog that I also use for travel blog posts. In the yaml meta data I can put a GEOJSON object. Then, a plugin loads currently mapbox with mapbox cloud data. I want to move the maps to selfhosting. I do not want to have map data covering the entire world on high zoom levels, but instead only files for the area that I cover in my travel blog. In my mapbox gl style file, I need to From what I read, (b) is so far not possible and difficult to implement. Hence, I would need to find a way how I can do (a) in the most elegant way. |
@rriemann Is each region displayed on a separate page? If so, you can re-use only the (b) will be difficult to implement as one big pmtiles if there are any low zoom tiles that overlap among the regions, since we'd have to do an individual tile merging for it to look correct. |
Thank you for this detailed reply! We came across the following use cases recently
There are workarounds for now e.g. to merge the mbtiles files before converting to pmtiles but a |
I don't know of any Use case 2 is 3) from my post above which is relatively easy to accomplish. The simplest way is to do direct PBF concatenation, relying on |
I would be interested in this feature as well, specifically when building raster tiles in the cloud it would be nice to be able to do something like "this |
It ought to be relatively easy to implement |
I'd be interested in this feature, too - specifically case (3) described in #105 (comment) I've used tile-join to similar effect, but based on felt/tippecanoe#10, I wonder if its support is more rudimentary than what's in go-pmtiles. |
I'm thinking we do this:
We can maybe add a minzoom/maxzoom issueFinally there is an outstanding issue of how to deal with merging archives that do not have matching max zooms. If I merge one tileset that has max 14, and another that has max 15, my archive in total has a max of 15, but when I look at the 14 area in most browser and zoom into 15 I get nothing. This is a limitation of how JSON metadataWe need to update the binary header like bounds, minzoom, maxzoom, # addressed tiles to be accurate after a merge. But if the JSON metatadata has keys like cc @ZeLonewolf |
Thanks, this feature would help me for a few obscure development use cases when I want to demonstrate a change in OpenMapTiles and style it with Americana, the the examples I have are in different parts of the planet. For example, I'd currently like to render a sample that has Massachusetts, Yukon, and Spain to proof-out an OpenMapTiles concept (and hence I'm rendering it on openmaptiles-tools. In my admittedly one-off use case, I really don't care what happens in the case of tile collisions. |
To address the issue of tilesets with uneven/variable max zoom level (e.g. protomaps/PMTiles/discussions/321), I see a use for merge + extrapolate(?). Assuming the original tileset has a maxzoom of 15-16:
This is not a common usecase but I feel it makes more sense to "fix" the data, instead of coming up with hacks for different renderers. |
My use case: I am working on a raster dem map that needs a detail of zoom 13 in one area but needs only zoom 10 in the other area. -Create one area in z13 and the other in zoom 10 and then merge. |
@bdon @daniel-j-h 👍 for
Case 1 (no overlaps) would be an excellent start. Especially useful for larger datasets split into chunks. Related: protomaps/PMTiles#403 |
We've been working more and more with pmtiles recently and we're coming across various use cases, such as concatenating multiple pmtiles into one. At the moment we're simply loading multiple pmtiles in our frontend but ideally we could bundle up multiple pmtiles into a single pmtile to put on a static host and be done with it.
Usage could be as simple as
The text was updated successfully, but these errors were encountered: