go-pmtiles icon indicating copy to clipboard operation
go-pmtiles copied to clipboard

add ability to convert a directory of tile files with XYZ structure

Open jamesscottbrown opened this issue 7 months ago • 2 comments

This provides the ability to generate a PMTiles archive from a directory of tiles directly, wihtout having to first create a PMTiles archive.

See https://github.com/protomaps/PMTiles/discussions/519

jamesscottbrown avatar Jun 12 '25 14:06 jamesscottbrown

Fix for hard coded png

path := filepath.Join(input, fmt.Sprintf("%d", z), fmt.Sprintf("%d", x), fmt.Sprintf("%d.%s", y, tileFormat))

mcbain avatar Jul 01 '25 13:07 mcbain

Thanks for tackling this feature. Overall I think we need to depend on necessary metadata existing in a metadata.json or equivalent, see this comment on how this was implemented in the python pmtiles package:

https://github.com/protomaps/PMTiles/issues/338#issuecomment-2566336593

I know Tippecanoe outputs a metadata.json to directory outputs, maybe we ought to demand that the user author a metadata.json for this directory conversion to work simply (otherwise we would need to support N number of arbitrary formats, since AFAIK there is no standardization)?

A integration test for creating an archive from a directory would be nice too

bdon avatar Jul 03 '25 03:07 bdon