[Geopackage] Mixing JPEG and PNG tiles ?

Even Rouault even.rouault at spatialys.com
Tue Nov 4 04:38:18 EST 2014


Hi,

TLDR: Can someone confirm if it is allowed to have both JPEG and PNG tiles in 
the same "Tile Pyramid User Data Table" ?

~~~~~~~~

I've read requirements 35 and 36 multiple times, and I'd think so, but 
honestly their language is a bit too convoluted for me to be absolutely 
sure...

"In a GeoPackage that contains a tile pyramid user data table that contains 
tile data that is not MIME type image/jpeg, by default SHALL store that tile 
data in MIME type image/png"

Imagine a user table with 2 tiles: one PNG, one JPEG. That table contains 
tiledata that is not MIME type image/jpeg (the PNG one). And that tile data is 
of MIME type image/png. So requirement satisfied ? But what does the "by 
default" means (="if you don't use the webp extension or a custom one") ?

But I've add a look at the test case 
/opt/tiles/tiles_encoding/data/mime_type_jpeg 
and/opt/tiles/tiles_encoding/data/mime_type_png and I'm even more confused. 
Looking at the test method as it is currently written, it would seem that you 
cannot pass it if you have a mix of formats. Worse, my understanding is that 
you cannot satisfy both /opt/tiles/tiles_encoding/data/mime_type_jpeg 
and/opt/tiles/tiles_encoding/data/mime_type_png as soon as you have tile_data 
content. Step 3b of mime_type_png (resp. mime_type_jpeg) should rather be "For 
each row tile_data from step a THAT IS NOT MIME TYPE IMAGE/JPEG (resp THAT IS 
NOT MIME TYPE IMAGE/PNG)", shouldn't it ?

I've found an old draft of the spec (v0.2.0, 2012-11-15, 
http://portal.opengeospatial.org/files/?artifact_id=51391), that had a very 
clear statement :

"NOTE: Images of multiple MIME types may be stored in given table.  For 
example, in a tiles table, image/png format tiles without compression could be 
used for transparency where there is no data on the tile edges, and image/jpeg 
format tiles with compression could be used for storage efficiency where there 
is image data for all pixels.  Images of multiple bit depths of the same MIME 
type may also be stored in a given table, for example image/png tiles in both 
8 and 24 bit depths."

Does this still apply to the 1.0 version ?

Best regards,

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the Geopackage mailing list