Opened 17 years ago
Closed 16 years ago
#1794 closed defect (fixed)
AAIGRID - error calculating yllcorner in ascii header
Reported by: | jdemone | Owned by: | Mateusz Łoskot |
---|---|---|---|
Priority: | normal | Milestone: | 1.4.5 |
Component: | GDAL_Raster | Version: | 1.4.1 |
Severity: | normal | Keywords: | AAIGRID, yllcorner |
Cc: | Mateusz Łoskot |
Description
There is an error in the creation of the header in the AAIGRID format. 'yllcorner' is calculated using the dx instead of the dy. A proposed patch is attached.
Attachments (1)
Change History (7)
by , 17 years ago
Attachment: | aaigriddataset.cpp.patch added |
---|
comment:1 by , 17 years ago
Cc: | added |
---|---|
Component: | default → GDAL_Raster |
Milestone: | → 1.4.3 |
Owner: | changed from | to
Priority: | low → normal |
Severity: | trivial → normal |
Mateusz,
Could you look into this? I have a vague recollection that this may have been fixed since 1.4.1.
comment:2 by , 17 years ago
Status: | new → assigned |
---|
As I see, only half of the fix (line 816 in r10146) have been applied since 1.4.1.
comment:3 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I've applied the second part of the fix (r12453).
Frank, Do we have any aaigrid datasets with features specific to Golden Surfer, that we could add to the autotest?
comment:5 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
The applied patch is incorrect. It computes YLLCORNER improperly. In normal cases adfGeoTransform[5] is negative while adfGeoTransform[1] was positive. This basically means that yllcorner is written as being as far above the top left corner as it ought to be below the top left corner.
sprintf( szHeader, "ncols %d\n" "nrows %d\n" "xllcorner %.12f\n" "yllcorner %.12f\n" "dx %.12f\n" "dy %.12f\n", nXSize, nYSize, adfGeoTransform[0], adfGeoTransform[3] - nYSize * adfGeoTransform[5], adfGeoTransform[1], fabs(adfGeoTransform[5]) );
proposed patch