Open jyutzler opened 2 years ago
On R-Tree, DGIWG P5 decided to keep R-Tree as Mandatory extension without condition because there is not a clear minimum number of features or area threshold to establish and enforce the condition to require the R-Tree extension for performance On Bounding box comparison, DGiWG P5 decided to not specific they error marges On TilleSize, DGIWG to took no position how to populate the missing area's pixels. Last bullet should be- labeled "Tile Size" instead of BBox size.
@jamesresslernga
Something got garbled here: On Bounding box comparison, DGiWG P5 decided to not specific they error marges
Correction On Bounding box comparison. DGIWG P5 decided to not specify any X & Y error margins until a real-world case is found with GeoPackage that requires margins for an accurate query of geospatial layers in GeoPackage.
We discussed these questions during the last SWG meeting. Here are the responses.
Thank you for the response, Jeff. The comments are useful. On #5, the situation raised for am area not divisible by 256 and handles tiles on the edges of the bounding box that are less than 256 pixels. Does the GeoPackage provide null data beyond the edge or black fill the edge tiles outside the bbox? We decided by using Tile Matrix definitions from OGC 17-083r2, the TileWidth and TileHeight are predefined as 256 for each zoom level, so this situation would not arise.
I don't think we specify what the data looks like beyond the boundary. Since PNG allows transparency, it would make sense to use transparency for NO_DATA. For JPG, it would presumably be black. Do you think we should revise any part of the standard to clarify this?
Sections "Tile encoding PNG" and "Tile encoding JPEG" handle this case indirectly. PNG supports transparency/nodata while JPEG does not. A common practice is that the partial tiles are saved as PNG and filled with nodata. The full tiles may be either PNG or JPEG. A better explanation can be found from the GDAL documentation https://gdal.org/drivers/raster/gpkg.html#tiled-rasters. Maybe the GeoPackage standard does not clearly say what was the reason for allowing this:
Requirements 36 and 37 in combination allow a tile pyramid user data table to contain PNG or JPG tiles. They may be mixed and matched within the same table.
However, I do not know if standard should mandate to use PNG filled with transparency for partial tiles. There may be use cases when users want to get just JPEG tiles even they cannot be made transparent in a reliable way because of lossy compression that is sometimes changing the nodata values to something else. Perhaps there could be a Best practice document that describes how it is possible to reach both good compression (JPEG) and support for nodata (PNG) at the same time when dealing with data like orthophotos.