[Gdal-dev] ECW "Rotational Coefficients Ignored"

Tom Lynch tflynch at gmail.com
Fri Aug 5 11:31:12 EDT 2005


It's possible to store a rotation value in a JPEG 2000 file using the
ECW JPEG 2000 SDK.  The GeoJP2 header box stores the rotation in the
affine coefficients of a GeoTIFF ModelTransformationTag, and the GML
header box stores the rotation in a GML cell offset vector..

The current GDAL JP2ECW drive sets the conceptual rotation in an
output JPEG 2000 file to zero - see from comment "Georeferencing"
around line 880 of ecwcreatecopy.cpp.  If this value
(psClient->fCWRotationDegrees) is specified using the affine values in
padfGeoTransform nearby when creating a JPEG 2000 file (but not ECW,
see below), it should go some way to resolving the problem.

In the case of the ECW format, an oversight in the original metadata
design means that it cannot store rotated registration info, only a
tie point and pixel scale, so here you will be forced to use a world
file or warp your input data to north-up, as Frank says.

On 8/5/05, Frank Warmerdam <fwarmerdam at gmail.com> wrote:
> On 8/5/05, Dan Greve <grevedan at hotmail.com> wrote:
> > Does this mean the input images need to be warped to North-Up?  What are the
> > rotational coefficients ignored?  I'm trying to convert a NITF into an ECW
> > with gdal_translate and no special switches.  I get the same error for
> > JP2ECW and ECW.
> 
> Dan,
> 
> Yes, it means that either the source file has to be north up, or the
> coordinate information needs to be discarded.
> 
> It might be possible to work around this via use of a world file.
> 
> For JP2 files, the JP2ECW driver could likely be modified to avoid
> emitting the ERMapper GML header and instead generate the
> geotiff-in-jpeg2000 header which can support rotated images.  But
> some potentially non-trivial code changes would be required.
> 
> Best regards,
> 
> --
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Programmer for Rent
> 
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev
> 


-- 
Tom Lynch
Development, ER Mapper
Phone:      +61 8 93882900
Fax:        +61 8 93882901
Email:      tom.lynch at ermapper.com
Web:        http://www.ermapper.com
Forums:     http://forum.ermapper.com




More information about the Gdal-dev mailing list