Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#5408 closed enhancement (fixed)

Expose Jpeg2000 metadata.

Reported by: jcztery Owned by: warmerdam
Priority: normal Milestone: 2.0.0
Component: default Version: svn-trunk
Severity: normal Keywords: ECWJP2
Cc:

Description

Expose the following JP2 metadata using ECWJP2 driver: ALL_COMMENTS
PROFILE
TILES_X
TILES_Y
TILE_WIDTH
TILE_HEIGHT
PRECINCT_SIZE_X
PRECINCT_SIZE_Y
CODE_BLOCK_SIZE_X
CODE_BLOCK_SIZE_Y
PRECISION
RESOLUTION_LEVELS
QUALITY_LAYERS
PROGRESSION_ORDER
TRANSFORMATION_TYPE
USE_SOP
USE_EPH
GML_JP2_DATA

Update documentation(metadata and branding).

Attachments (4)

Expose_JP2_Metadata_Plus_Documentation.patch (16.1 KB ) - added by jcztery 10 years ago.
Fixed SDK version skip conditions in autotest.
Expose_JP2_Metadata_Plus_Documentation_in_JPEG2000_domain.patch (16.9 KB ) - added by jcztery 9 years ago.
jp2metadata.patch (27.6 KB ) - added by jcztery 9 years ago.
Jp2 metadata with more doco.
jp2metadata_doco_updates.patch (28.3 KB ) - added by jcztery 9 years ago.
Yet another patch.

Download all attachments as: .zip

Change History (17)

by jcztery, 10 years ago

Fixed SDK version skip conditions in autotest.

comment:1 by jcztery, 10 years ago

I forgot to introduce myself. I am Hexagon Geospatial employee and i work in ECW JP2 SDK team and we are close to releasing version 5.1 of the SDK.

comment:2 by Even Rouault, 10 years ago

Is there a point to "pollute" the default metadata domain with such technical details that most users will not understand ? Other GDAL JPEG2000 drivers don't do that. Perhaps put them in a JPEG2000 metadata domain ?

comment:3 by jcztery, 10 years ago

That is right. Other JPEG2000 drivers do not expose this information.
Is JPEG2000 metadata domain printed out by gdalinfo?
If so i can move it to JPEG2000 domain.

comment:4 by Even Rouault, 10 years ago

It is printed out by gdalinfo if you specify "-mdd JPEG2000" or "-mdd all"

comment:5 by Even Rouault, 10 years ago

Any update on this if you want it to go to 1.11 ?

comment:6 by Jukka Rahkonen, 9 years ago

Repeating what Even asked 9 months ago: Any update on this if you want it to go to [next version]?

comment:7 by jcztery, 9 years ago

The metadata are now exposed under JPEG2000 metadata domain.

comment:8 by Even Rouault, 9 years ago

I've reviewed the latest patch and I think it would be appropriate to enhance the documentation to tell a bit more about each metadata item, and particularly the format of the value and/or the values that can be taken. e.g. :

<li>PROFILE=0/1/2</li>
<li>PROGRESSION_ORDER=RPCL/...<li>

by jcztery, 9 years ago

Attachment: jp2metadata.patch added

Jp2 metadata with more doco.

comment:9 by Jukka Rahkonen, 9 years ago

I have a couple of small suggestions which could perhaps make some things in JPEG2000 more understandable for occasional JP2 users. Consider if they make sense and include and improve them if you think they do.

76	<li> <b>LEVELS=n</b>: Resolution levels in pyramid (by default so many that the size of the smallest thumbnail image is 64x64 pixels at maximum)<p> 
80	<li> <b>TILE_WIDTH=n</b>: Tile Width (default, image width eg. 1 tile). Apart from GeoTIFF, in JPEG2000 tiling is not critical for speed if precincts are used. The minimum tile size allowed by the standard is 1024x1024 pixels.<p> 
81	<li> <b>TILE_HEIGHT=n</b>: Tile Height (default, image height eg. 1 tile)<p>

I wonder if it would be better to use any other axis names than X and Y or at least clarify them once: X (horizontal), Y (vertical). Otherwise someone will tell you that what X and Y mean depends on the coordinate system.

How about editing also this line in existing documentation: "JPEG2000 format does not support creation of overviews since the format is already considered to be optimized for "arbitrary overviews"" into something like

"JPEG2000 format does not support creation of GDAL overviews since the format is already considered to be optimized for "arbitrary overviews". JP2ECW driver also arranges JP2 codestream to allow optimal access to power of two overviews. This is controlled with the creation option LEVELS."

Finally, I would like to know also something about the meaning of PROFILE creation option without going to SDK documentation.

by jcztery, 9 years ago

Yet another patch.

comment:10 by jcztery, 9 years ago

Thank you guys for the comments.
I added new patch version.
I hope that this patch will make you happy. I wish the JPEG2000 spec was easy and had only a few pages. Unfortunately that is not the case and I think the world cannot be saved in a ticket that says: "Expose JPEG2000 metadata".
I think an RFC about JPEG2000 metadata would be a good way to ensure that JPEG2000 metadata can be returned in a reliable ways across various drivers. That could also be a good spot for pointing to relevant parts of the JPEG2000 spec.
In any case. Lets not delay closing this ticket which may convey functionality that can be useful for super power awesome users.

comment:11 by Jukka Rahkonen, 9 years ago

You forgot to mention Leica in the list of former companies behind ECW :)

Seriously, after writing my last comment I thought it was unnecessary and nit-picky but comments to tickets in the trac can't be deleted. Meaning was not to make me happy but the actual and potential users of ECW/JP2 SDK. I noticed that you have now added a sentence which suggests not to fiddle with the parameters at all which is good advice. Because of the pricey licenses of all the best JPEG2000 read/write SDKs one could imagine that everybody who can use any of the JP2 creation options is super power awesome user who knows what to do but in real life that is not so.

Even will tell if the patch is technically OK but I am satisfied with the documentation and it is easy to improve documentation later if needed. Perhaps it would be good to have a special wiki page about GDAL and JPEG2000. At least the great number of JPEG2000 drivers is baffling users and common misunderstanding after having a try with some JasPer driver is that the whole JPEG2000 format is close to useless.

comment:12 by Even Rouault, 9 years ago

Milestone: 2.0
Resolution: fixed
Status: newclosed

For other drivers we could hopefully reuse the same items and values.

trunk r28345 "JP2ECW: add metadata about JPEG2000 codestream and boxes (patch by jcztery, with some adjustments, #5408)"

Adjustments :

  • indentation fixes to remove tabulations
  • the new test in autotest was broken
  • documentation mentionned 0 or 1 for the filter, but the code is 5x3 or 9x7 --> documentation fixed
  • documentation mentionned TRUE/FALSE for GML_JP2_DATA, but code was CONTAINED/NOT_FOUND --> code fixed

trunk r28346 "JP2ECW: uppercase fix in doc (#5408)"

comment:13 by Even Rouault, 9 years ago

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.