-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
"pmtiles merge" CLI command? #403
Comments
Does this also happen if you create a Then |
@bdon here's the best approach I've found thus far:
re: gdal's
The issue is that gdal_translate is single-threaded. The above process takes 4 days for a 120GB dataset. If I could process each .tif separately (.tif -> .mbtiles -> .pmtiles), then merge them all together, that could potentially save a TON of time. Your |
Maybe https://github.com/mapbox/rio-mbtiles is a multithreaded option? I've been exploring a derivative of that that can generate PMTiles directly. |
It seems like every solution thus far has caveats.
The problem is still the same... squashing all the pmtiles into one. Let's assume the simplest use-case (merging pmtiles with no overlaps). What does that process look like to build out |
In most cases "no overlaps" is not actually feasible. If you have 2600 GeoTIFFs, and each one is being tiled to zoom 0, then all the resulting |
^ My solution to the above is that any correct solution needs to start with a |
I'll give Thanks for the clarification re: |
@bdon For the 120GB dataset, Again, I love PMTiles but this hasn't been a great experience 🙃 The fastest approach I've found thus far is to create the millions of tiles via Really, really hoping that you could give us raster users some better tooling, whether it involves |
The problems you are encountering seem to be related to your specific challenging dataset and tiling it, regardless of tile archive format. Could you make your dataset and current tooling available so other can pitch in to help? |
It's the ESA WorldCover dataset: https://worldcover2021.esa.int/ The best approach thus far:
Every other solution I've tried has either failed (see the first comment in this thread), required absurd resources, or would've taken many days (weeks) to complete. @bdon maybe you could give it a try as a proof-of-concept 😇 |
Have you looked into using
|
@larsmaxfield thanks for the suggestion. That's very similar to |
If you want the ESA WorldCover as tiles you can modify this script https://github.com/OvertureMaps/overture-tiles/blob/main/profiles/Base.java to convert Overture GeoParquet's ESA Worldcover dataset into tiles. |
I have a 120GB raster dataset, split into 2600 geotiffs. Extracting a
.pmtiles
from it hasn't been easy 🙃Would you consider adding a
pmtiles merge
CLI command?See below for the different approaches I've tried, and how a
pmtiles merge
command could help.Option 1:
gdal_merge of the geotiffs, then gdal_translate to .mbtiles
[-] Single-threaded
[-] painfully slow
[-] gdal requires ludicrous amount of free space (7+ TB)
Option 2:
Convert each geotiff to its own .mbtiles file, then merge the .mbtiles files together
[+] multi-threaded, minus the merging
[-] tippecanoe's
tile-join
doesn't support rastersOption 3:
gdal2tiles -> directory of .pngs, then
mb-util
to generate merged .mbtiles, then .pmtiles[+] png creation multi-threaded
[-] creating millions of pngs is torture on the filesystem
[-] slow
Option 4 (proposed):
Convert each geotiff into its own .mbtiles file, then
pmtiles convert
for each, thenpmtiles merge
to stitch all the pmtiles together[+] multi-threaded
[+] fast(?)
The text was updated successfully, but these errors were encountered: