[gdal-dev] Adding GMLJP2 metadata into existing JPEG2000 file

Even Rouault even.rouault at mines-paris.org
Fri Apr 13 04:30:12 EDT 2012


> Hi,
>
> Alex Sevaliev from j2k-codec.com already wrote such a tool for us. It can be
> used
> in a fast mode when new GML boxes are written at the end of the JPEG2000 file
> and then it is super fast even with however big files.

Yes, in fact, if the GML file to insert is already generated, the tool to insert
the GMLJP2 box might likely be written in a few dozains of lines of any
programming/scripting language, and that doesn't require to know how to decode
JPEG2000 streams, nor link with GDAL.

> In a normal mode it is
> checking
> if there is a GML box already. If yes, then it is replecing it, if not, then
> it adds the
> boxes. Because of possible box replace the app always rewrites the whole
> JPEG2000
> so it is slower. Then it is also placing the GML box before the image
> codestream
> because I thought that one JPEG2000 application I use was not able to read
> the boxes
> which were placed after the codestream. It is absolutely OK according to
> JPEG2000
> standard and I now believe that there was something else wrong with my test
> and
> that application did not really had troubles with the boxes at the end of
> file.

This is interesting. I tested the new capability of the openjpeg driver to add
the georeferencing box and my first tests with GlobalMapper seemed to show that
it doesn't recognize the georeferencing. I was wondering too if it wasn't due to
the fact that the box is written at the end of the file, because with another
JPEG2000 file not produced by GDAL where the box is before the codestream, it
was able to recognize the georeferencing. I'll try to test if placing them
before the codestream doesn't help.

>
> GML metadata standard allows to insert several GML boxes into JPEG2000 file
> inside upper level ASOC boxes. I told Alex not even to try to handle such
> complicated
> cases with the new tiny application.
>
> Alex may publish the tool as freeware in a future but it would be nice to
> have same
> kind of GDAL tool. Our need came from Inspire rules which will demand to
> include
> GML metadata if orthophotos are in JPEG2000 format.
>
> -Jukka Rahkonen-
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>




More information about the gdal-dev mailing list