Hi,
I think there is a problem with the AATSR tie-point to pixel interpolation in the epr_api. It appears that when reading the pixel longitude and latitude, the epr_api is returning a point on the edge of the pixel below the one expected.
i.e. if you use epr_api to get the lat/lon of pixels A,B,C,D in the raster below, you actually get points a,b,c,d
1+---+---+
2| | |
3| C | D |
4| | |
5+---+---+
6| | |
7c A d B |
8| | |
9+---+---+
10| | |
11a b |
12| | |
13+---+---+
Looking at the epr_read_band_annotation_data function, the scan_offset_x/y for AATSR are:
scan_offset_y = 0.5F;
scan_offset_x = -19.0F; // geolocation tie-points
scan_offset_x = 6.0F; // view-angle tie-points
To return the pixel centres (A,B,C,D) I think these should be:
scan_offset_y = -0.5F;
scan_offset_x = -19.5F; // geolocation tie-points
scan_offset_x = 5.5F; // view-angle tie-points
Or, to return the 'lower-left' pixel corners these should be:
scan_offset_y = 0.0F;
scan_offset_x = -19.0F; // geolocation tie-points
scan_offset_x = 6.0F; // view-angle tie-points