<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div>Hi,</div><div><br></div>In the <a href="https://github.com/OSGeo/gdal/blob/65dea1c999b6b5f692c945ea074b04cb5e43eca4/gdal/ogr/ogrsf_frmts/gpkg/ogrgeopackagedatasource.cpp#L1819" target="_blank">GDALGeoPackageDataset</a> 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 <a href="https://github.com/OSGeo/gdal/blob/65dea1c999b6b5f692c945ea074b04cb5e43eca4/gdal/ogr/ogrsf_frmts/gpkg/ogrgeopackagedatasource.cpp#L4079" target="_blank">CreateCopy</a> function.  The zoom level calculation in the CreateCopy appears to work as I would expect.<div><br></div><div>The transform I am using to test is:</div><div>[-20037508.342789248, 6176.637812966647, 0.0, 19971868.880408563, 0.0, -6177.590116052211]</div><div><br><div>The CreateCopy zoom level logic produces level 5.  Which is what I would expect.</div><div><br></div><div>The SetGeoTransform zoom level logic is not able to identify a zoom level.</div><div><br></div><div>Is the SetGeoTransform zoom level calculation logic wrong?</div><div><br></div><div>Thanks,</div><div>Roarke</div><div class="m_-2110041875624388536gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><span style="font-family:arial,helvetica,sans-serif"></span></div></div></div></div></div>
</div></div>
</div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div><div><br>
</div></div></div></div></div></div></div>
</div>