Opened 15 years ago

Closed 6 years ago

Last modified 6 years 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


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 15 years ago.
LN7-10-From_ENVI.img.hdr (497 bytes ) - added by mariocavicchi 15 years ago.

Download all attachments as: .zip

Change History (10)

by mariocavicchi, 15 years ago

Attachment: LN7-10-From_GDAL.hdr added

by mariocavicchi, 15 years ago

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

comment:1 by warmerdam, 15 years ago

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


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 by warmerdam, 15 years ago

Owner: changed from warmerdam to chowell

comment:3 by antonio, 10 years ago

Cc: antonio added

comment:4 by Jukka Rahkonen, 8 years ago

Some findings: Document 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 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 and a ticket that is closed as invalid but which probably is still valid

comment:5 by Even Rouault, 8 years ago

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 by Even Rouault, 7 years ago

Milestone: 1.8.1

Removing obsolete milestone

comment:7 by Even Rouault, 6 years ago

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 by Even Rouault, 6 years ago

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