<div dir="ltr">Hi all,<div><br></div><div>I have problems with the footprint of GPKG raster data, as it varies with zoom level.<br><div><br></div><div>1) Data creation</div><div>I need a color-relied'ed DTED in GPKG format. I create it with the following commands:<br><br>gdaldem  color-relief  E017N30.DT2 colormap.lut  E017N30_lut.tif<br>gdal_translate -of GPKG -co TILING_SCHEME=InspireCRS84Quad -co ZOOM_LEVEL_STRATEGY=UPPER -co RASTER_TABLE=tiles -r bilinear  E017N30_lut.tif E017N30_lut.gpkg<br>gdaladdo E017N30_lut.gpkg</div><div><br></div><div>2) Observed</div><div>UL and LR corners are given with (where zoom max is ZOOM_LEVEL=12):<br>gdalinfo.exe E017N30_lut.gpkg | grep -E "Upper Left|Lower Right"<br>Upper Left  (  16.9998611,  31.0001389) ( 16d59'59.50"E, 31d 0' 0.50"N)<br>Lower Right (  18.0001320,  29.9998680) ( 18d 0' 0.48"E, 29d59'59.52"N)<br><br>I noticed that the GPKG footprint depends on zoom level:<br>gdalinfo.exe E017N30.gpkg -oo ZOOM_LEVEL=7| grep -E "Upper Left|Lower Right"<br>Upper Left  (  16.9998611,  31.0001389) ( 16d59'59.50"E, 31d 0' 0.50"N)<br>Lower Right (  17.9996170,  30.0003830) ( 17d59'58.62"E, 30d 0' 1.38"N)<br><br><br>We observe:<br>UL corner are identical<br>LR corner "moves" northward and westward from Z=12 to Z=8<br><br>Is it as expected?</div><div><br></div><div>3) Impact:<br>When computing the pyramid (gdaladdo), one column (on the east side) and one line (on the south side) are not generated.<br>In our system, we can see this artefact when when requesting tiles with WMTS requests.</div></div><div><br></div><div>4) Workaround</div><div>Our generation script is currently based on gdal_translate/gdaldem/gdaladdo (and not mapcache_seed). In order to get all the expected pixels, I implemented a workaround:<br>* generate the highest zoom level layer with standard gdadem/gdal_translate commands (see above)<br>* sqlite command: increase max_x and decrease min_y in table gpkg_contents<br>* gdaladdo: pyramid computation<br>* sqlite command: reset max_x and min_y to original values</div><div><br></div><div>Thank you for any help / explanation</div><div>Philippe</div></div>
<font style="font-size: 9px;">The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised.<br>If you are not the intended recipient, please notify Airbus immediately and delete this e-mail.<br>Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately.<br>All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.</font>