[gdal-dev] ENVI datasets with rotation

Even Rouault even.rouault at mines-paris.org
Thu Jan 3 13:09:38 PST 2013


Le jeudi 03 janvier 2013 15:05:15, Carl Godkin a écrit :
> Happy 2013 everyone,
> 
> We've come across some ENVI data sets (.bsq + .hdr files) in which the "map
> info" keyword of the .hdr file looks like this:
> 
> map info = {UTM, 1, 1,  408953.26, 3290904.2,  3.400, 3.400, 17,  North,
>  WGS-84,  units=Meters,  rotation=-6.00000}
> 
> It's interesting because we have a collection of seven such files and only
> two of them have rotation values other than 0.
> 
> We're using GDAL 1.9.2 and frmts/raw/envidataset.cpp, which seems to parse
> the .hdr file in this case, ignores the rotation.
> The code that captures the geotransform sets the two rotation terms to 0
> unconditionally so it seems like it might not be
> too difficult to fix this.
> 
> Besides adjusting the geotransform, it looks like the code at bottom
> of ENVIDataset::ProcessMapinfo() would need to be fixed since the "units="
> term is not actually always last in the map info array.
> 
> Has someone else already done anything about this already?  (E.g., is there
> a patch awaiting approval somewhere?)

A quick search in the Trac database doesn't show any pending patch (so you're 
welcome to work on that if you wish), but there's a related old ticket ( 
http://trac.osgeo.org/gdal/ticket/1778 ) about rotation being ignored, but 
when writing the ENVI header too


More information about the gdal-dev mailing list