Combination View Flat View Tree View
Threads [ Previous | Next ]
epr_api: interpolation of geolocation ADS
toggle
epr_api: interpolation of geolocation ADS
aatsr c api epr_api tie points
6/22/12 3:24 PM
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
Flag Flag
RE: epr_api: interpolation of geolocation ADS
6/25/12 11:35 AM as a reply to Owen Embury.
You are correct, many thanks! You can fetch the corrected source from git://github.com/bcdev/epr-api.git. Would you like to double check that it is indeed correct?
Flag Flag
RE: epr_api: interpolation of geolocation ADS
6/26/12 10:04 AM as a reply to Ralf Quast.
Hi,
Was this problem also affecting MERIS ?
If so, can you confirm that the result was an offset in lat/lon by about a pixel ?
Thanks,
François
Flag Flag
RE: epr_api: interpolation of geolocation ADS
6/26/12 10:17 AM as a reply to François Steinmetz.
Sorry, a quick look at the source code shows that it was not affecting MERIS.
Flag Flag
RE: epr_api: interpolation of geolocation ADS
6/26/12 10:21 AM as a reply to François Steinmetz.
The issue was not affecting MERIS and ASAR, only AATSR was affected.
Flag Flag
RE: epr_api: interpolation of geolocation ADS
6/27/12 4:43 PM as a reply to Ralf Quast.
Thanks Ralf,

I have checked a centre-pixel version: https://github.com/oembury/epr-api against the independent reader which Gary uses and we get the same results. So your version will be returning the pixel corners now.
Flag Flag
RE: epr_api: interpolation of geolocation ADS
6/28/12 11:04 AM as a reply to Owen Embury.
Thanks Owen!
Flag Flag

 

Welcome to the BEAM Forum!

We encourage you to sign in our forum and participate in the BEAM community. The forum is maintained by the BEAM project team who will most likely answer your questions within 24 hours (except during common holidays) - if not done by other community members. Collaborate, share your knowledge and learn from other users!

If you don't find what you are looking for, please also consider the following external forums: