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

Even Rouault even.rouault at mines-paris.org
Thu Apr 12 17:35:29 EDT 2012


Le mercredi 11 avril 2012 14:21:09, Jukka Rahkonen a écrit :
> Hi,
> 
> Do we have anything that could be used for injecting GMLJP2 georeferencing
> metadata from a text file into an existing JPEG2000 image? I found a tool
> called "JP2 Meta Editor" by a company j2k-codec which is usable for
> individual images. However, only way to use it is through GUI and I have a
> need to run a large batch. Hints about suitable tools for this task, free
> or commercial, are welcome.

Jukka,

Your question made me look more closely at the capabilities of the JP2Box 
support in GDAL, and I discovered that I had to write just a few lines of code 
to add support for writing georeferencing in the existing openjpeg driver. See 
http://trac.osgeo.org/gdal/changeset/24220#file2 . Basically you just need to 
write the boxes at the end of the existing file.

So adding georeferencing to a new file should be easily done by a small 
standalone utility using GDAL, not necessarily requiring to have support for 
JPEG2000 itself, or adding an implementation of SetGeoTransform() / 
SetProjection() methods in one of the existing JPEG2000 drivers.

As far as updating an existing georeferencing is concerned, this might be more 
complex because it might require invalidating the existing GMLJP2 or GeoJP2 
boxes.

> 
> -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