Opened 10 years ago

Closed 3 months ago

Last modified 3 months ago

#1778 closed defect (fixed)

Problem with conversion from GeoTIFF to ENVI

Reported by: mariocavicchi Owned by: chowell
Priority: normal Milestone: 2.2.0
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: ENVI
Cc: dmarino, warmerdam, antonio

Description

I have converted a GeoTIFF image with gdal_translate to ENVI and i have obtained a header file without rotation information, and it's wrong, instead ENVI program make a header file right.

I made a simple program that uses function GDALCreateCopy, but the result is equal. I can send original image if it may help.

I use this version og GDAL:

$ gdal_translate --version
GDAL 1.5dev, released 2007/04/01

Attachments (2)

LN7-10-From_GDAL.hdr (311 bytes) - added by mariocavicchi 10 years ago.
LN7-10-From_ENVI.img.hdr (497 bytes) - added by mariocavicchi 10 years ago.

Download all attachments as: .zip

Change History (10)

Changed 10 years ago by mariocavicchi

Attachment: LN7-10-From_GDAL.hdr added

Changed 10 years ago by mariocavicchi

Attachment: LN7-10-From_ENVI.img.hdr added

comment:1 Changed 9 years ago by warmerdam

Cc: dmarino warmerdam added
Component: defaultGDAL_Raster
Keywords: ENVI added
Milestone: 1.5.2

Chris,

Could you confirm this problem (in trunk)? If the problem is confirmed as still present, we can either turn it over to Donnie Marino (dmarino) (who maintains this driver) or you could fix it with some support from him.

If the changes to support it are not too disruptive we should try to retrofit to 1.5 branch, otherwise fix only in trunk.

comment:2 Changed 9 years ago by warmerdam

Owner: changed from warmerdam to chowell

comment:3 Changed 4 years ago by antonio

Cc: antonio added

comment:4 Changed 2 years ago by Jukka Rahkonen

Some findings: Document http://www.exelisvis.com/docs/ENVIHeaderFiles.html does not list "rotation" as an info item of ENVI header file in the "map info" section but that must be an error in the documentation. A page linked from the header file section http://www.exelisvis.com/docs/enteroptionalheaderinformation.html#Enter2 describes the usage of rotation as "If North is not up in the image, enter a rotation angle in degrees in the Map Rotation field. Measure the angle in a clockwise direction where zero degrees is straight up."

For me this ticket feels a bit like invalid because it handles the case when GDAL is used for converting tiff file into ENVI. I do not know how where the original tiff file could hold the info about rotation and based on the latter document above even in ENVI user interface user must feel the rotation parameter by hand. It could be suitable for a case when original GeoTIFF is georeferenced with GCPs in such a way that rotating the image would be enough and no warping would be needed which feels like a special case.

There is a perhaps more critical issue with reading ENVI images with rotation. See http://lists.osgeo.org/pipermail/gdal-dev/2013-January/035146.html and a ticket that is closed as invalid but which probably is still valid http://trac.osgeo.org/gdal/ticket/4342.

comment:5 Changed 2 years ago by Even Rouault

GDAL could use the rotation to set the proprer values in the gt[1], gt[2], gt[4] and gt[5] terms of the geotransform matrix. And reciprocaly if those terms are rotational only, the rotation keyword could be written.

comment:6 Changed 21 months ago by Even Rouault

Milestone: 1.8.1

Removing obsolete milestone

comment:7 Changed 3 months ago by Even Rouault

Resolution: fixed
Status: newclosed

In 37506:

ENVI: add read/write support for rotated geotransform (read support from Taylor Alexander Brown github #197, write support by myself, fixes #1778)

comment:8 Changed 3 months ago by Even Rouault

Milestone: 2.2.0
Note: See TracTickets for help on using tickets.