[gdal-dev] Reading PMTiles With Missing Tiles

Patrick Young patrick.mckendree.young at gmail.com
Fri Feb 23 08:15:22 PST 2024


Thanks Even!

I got a much smaller reproduce case with data ready at
https://github.com/OSGeo/gdal/issues/9288

I created the test case with `pmtiles extract --maxzoom 7 ...`,
interestingly enough using a coarser zoom didn't surface the issue!

Patrick

On Fri, Feb 23, 2024 at 1:37 AM Even Rouault <even.rouault at spatialys.com>
wrote:

> Hi,
>
> this is likely a bug. I would need access to the file to investigate,
> ideally through /vsicurl, /vsis3, etc. . I don't have storage to host
> 300 GB. And possibly try to reduce the file size by removing upper zoom
> levels
>
> Even
>
> Le 23/02/2024 à 06:54, Patrick Young via gdal-dev a écrit :
> > Hello,
> >
> > I've been exploring the pmtiles driver a bit, what a great way to read
> > giant blobs of tiles off of cloud storage, really impressed by how
> > fast this is.
> >
> > I've been encountering a "Non increasing tile_id" when attempting to
> > read from coarser zoom levels for a large (~300GB) pmtile file:
> >
> >
> https://github.com/OSGeo/gdal/blob/48ddaf28db2826c635243abd469e7c7d2e749bdc/ogr/ogrsf_frmts/pmtiles/ogrpmtilestileiterator.cpp#L329
> >
> > For example, this fails for me:
> >
> > ds = gdal.OpenEx("</vsis3/...", gdal.OF_VECTOR | gdal.OF_READONLY,
> > open_options=["ZOOM_LEVEL=0"])
> > lyr = ds.GetLayer()
> > for feat in lyr:
> >     *** raises RuntimeError: Non increasing tile_id ***
> >
> > Things seem good when I specify higher zooms (e.g. Z12 or not
> > specified at all), but I can't get features out of the coarser ones.
> > Using the "pmtiles tiles" command, I can access the 0/0/0 tile just
> > fine though.
> >
> > Any thoughts on what could be wrong?  The file was translated from a
> > mbtiles file via the "pmtiles convert" tool.  ogrinfo is happy with it
> > as well:
> >
> > INFO: Open of `/vsis3/.../tileset.pmtiles'
> >       using driver `PMTiles' successful.
> > Metadata:
> >   description=mvts for landcover layer
> >   format=pbf
> >   maxzoom=16
> >   minzoom=0
> >   name=mvts
> >   scheme=tms
> >   type=overlay
> >   version=2
> >   ZOOM_LEVEL=16
> > 1: landcover
> >
> > Thanks,
> > Patrick
> >
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> --
> http://www.spatialys.com
> My software is free, but my time generally not.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240223/372be5c9/attachment.htm>


More information about the gdal-dev mailing list