Open daniel-j-h opened 6 months ago
It's a good feature request - anything that interacts with GeoTIFF or raster formats will probably depend on GDAL, which is out of scope for go-pmtiles. I've heard the best outputs come from rasterio and rio-mbtiles
here: https://docs.protomaps.com/pmtiles/create#geotiff after which you can use go-pmtiles convert
so maybe we just need to make a rio-pmtiles
equivalent?
A rio-pmtiles
equivalent to directly convert GeoTIFF to PMTiles would be awesome, especially if the functionality was able to be added to go-pmtiles
, giving the user the option to convert either MBTiles or GeoTIFF.
It's unlikely this would be part of go-pmtiles
because it would need to depend on GDAL. A python package installed through pip run via a rasterio
command e.g. rio pmtiles ...
I think would be the easiest path.
issue transferred to main PMTiles repository
What would have made that workflow simpler is a cli tool like
pmtiles convert
but instead of converting mbtiles into pmtiles it would take e.g. a slippy map tile hierarchy as inz/x/y.ext
or a GeoTIF raster and turn it into a pmtiles file.
Isn't it already kinda simple by the use of mb-util which allow to convert tiles file tree to mbtiles, then converting it to pmtiles with pmtiles convert
?
$ mb-util my-tiles-root-directory my_tiles.mbtiles
$ pmtiles convert my_tiles.mbtiles my_tiles.pmtiles
What would have made that workflow simpler is a cli tool like
pmtiles convert
but instead of converting mbtiles into pmtiles it would take e.g. a slippy map tile hierarchy as inz/x/y.ext
or a GeoTIF raster and turn it into a pmtiles file.Isn't it already kinda simple by the use of mb-util which allow to convert tiles file tree to mbtiles, then converting it to pmtiles with
pmtiles convert
?$ mb-util my-tiles-root-directory my_tiles.mbtiles $ pmtiles convert my_tiles.mbtiles my_tiles.pmtiles
This is the route I went to convert some terrain tiles. It is indeed pretty simple, but:
The protomaps format allows for raster tile hierarchies.
We've been working with bundling up raster tiles recently and ended up using the python library from https://github.com/protomaps/PMTiles to do so (see also example in https://github.com/protomaps/PMTiles/blob/e1228f5df1a4ac852e0117dc08c8813089a5c8af/python/examples/create_raster_example.py).
What would have made that workflow simpler is a cli tool like
pmtiles convert
but instead of converting mbtiles into pmtiles it would take e.g. a slippy map tile hierarchy as inz/x/y.ext
or a GeoTIF raster and turn it into a pmtiles file.Should the convert sub-command be extended to support raster, too?