Opened 15 years ago

Closed 13 years ago

Last modified 13 years ago

#3160 closed defect (fixed)

Incorrect geolocation grids handling for ENVISAT stripline products

Reported by: antonio Owned by: warmerdam
Priority: normal Milestone: 1.8.1
Component: GDAL_Raster Version: 1.6.2
Severity: normal Keywords: ENVISAT, GCPs


GCP line numbers in ENVISAT stripline products seems to be not correct.

The issue can be reproduced using the WSM ENVISAT data ASA_WSM_1PXPDE20020714_100425_000001202007_00380_01937_0053.N1

available at

In this case line number are incorrect from GCP 121 (Id 122) on

$ gdalinfo ASA_WSM_1PXPDE20020714_100425_000001202007_00380_01937_0053.N1 
Driver: ESAT/Envisat Image Format
Files: ASA_WSM_1PXPDE20020714_100425_000001202007_00380_01937_0053.N1
Size is 6290, 11340
Coordinate System is `'
GCP Projection = GEOGCS["WGS 84",DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],
GCP[  0]: Id=1, Info=
          (0.5,0.5) -> (4.914679,44.14525,0)
GCP[  1]: Id=2, Info=
          (629.5,0.5) -> (4.340454,44.239894,0)
GCP[  2]: Id=3, Info=
          (1258.5,0.5) -> (3.763068,44.331858,0)


GCP[119]: Id=120, Info=
          (5661.5,5400.5) -> (-1.140643,41.291837,0)
GCP[120]: Id=121, Info=
          (6289.5,5400.5) -> (-1.695666,41.360988,0)
GCP[121]: Id=122, Info=
          (0.5,0.5) -> (3.698209,40.189692,0)
GCP[122]: Id=123, Info=
          (629.5,0.5) -> (3.158117,40.282228,0)

The issue seems to be related to a bad handling of geolocation grids in case of stripline products: see description of field 2 in

2   	 line_num
Range line number corresponding to the first line of the granule within the slice.

(1) This is not always the record number of the corresponding image MDSR. 
Use the number of lines per granule field to determine the image MDS record 
corresponding to each record of tie points.
(2) For a stripline product, which may consist of multiple slices in a single MDS, 
this number is reset to 1 at the beginning of each slice.(3) For child products, 
which are subsets of a full product, the range line number in the first record may not be 1

Attachments (2)

gdal-envisat-gcp.patch (1.1 KB ) - added by antonio 15 years ago.
patch for fixing dfGCPLine value in ENVISAT stripline products (4.4 KB ) - added by antonio 13 years ago.
Regression test for r22289 and r22290

Download all attachments as: .zip

Change History (5)

by antonio, 15 years ago

Attachment: gdal-envisat-gcp.patch added

patch for fixing dfGCPLine value in ENVISAT stripline products

comment:1 by warmerdam, 13 years ago

Component: defaultGDAL_Raster
Resolution: fixed
Status: newclosed

Patch applied in trunk (r22289) and 1.8 branch (r22290). Tested by a user in #3709, but not actually tested by me.

by antonio, 13 years ago

Attachment: added

Regression test for r22289 and r22290

comment:2 by antonio, 13 years ago

The attached test module (to be included in autotest/gdrivers) performs a regression test for #3160 and #3709.

The test downloads the test dataset (357K compressed) from the ESA web site so the GDAL_DOWNLOAD_TEST_DATA environment variable have to be set in order to enable the test.

comment:3 by Even Rouault, 13 years ago

r22320 /trunk/autotest/gdrivers/ Add regression test for envisat (#3160)

Note: See TracTickets for help on using tickets.