[gdal-dev] Fwd: GeoPKG Zoom Level Calculation

Roarke Gaskill roarke.gaskill at weather.com
Wed Sep 13 13:38:55 PDT 2017


Hi,

In the GDALGeoPackageDataset
<https://github.com/OSGeo/gdal/blob/65dea1c999b6b5f692c945ea074b04cb5e43eca4/gdal/ogr/ogrsf_frmts/gpkg/ogrgeopackagedatasource.cpp#L1819>
class it appears the zoom level in the SetGeoTransform function does not
calculate the zoom level correctly.  Also, it is different from the zoom
level calculation in CreateCopy
<https://github.com/OSGeo/gdal/blob/65dea1c999b6b5f692c945ea074b04cb5e43eca4/gdal/ogr/ogrsf_frmts/gpkg/ogrgeopackagedatasource.cpp#L4079>
function.  The zoom level calculation in the CreateCopy appears to work as
I would expect.

The transform I am using to test is:
[-20037508.342789248, 6176.637812966647, 0.0, 19971868.880408563, 0.0,
-6177.590116052211]

The CreateCopy zoom level logic produces level 5.  Which is what I would
expect.

The SetGeoTransform zoom level logic is not able to identify a zoom level.

Is the SetGeoTransform zoom level calculation logic wrong?

Thanks,
Roarke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170913/8a186131/attachment.html>


More information about the gdal-dev mailing list