[gdal-dev] Geolocation arrays - location interpretation

Even Rouault even.rouault at spatialys.com
Thu Sep 28 02:56:01 PDT 2017


On jeudi 28 septembre 2017 02:14:53 CEST Agram, Piyush S (334D) wrote:
> Hi,
>      Iā€™m trying to track down systematic pixel shift effects observed with
> warping data using geolocation arrays:
> https://trac.osgeo.org/gdal/ticket/6959
> 
> Essentially, the same data (image and location) provided as geolocation
> arrays is warped to a different output depending on how the arrays are laid
> out ā€“ WESN, WENS, EWSN, EWNS.
 Gdalwarp produces least shift in warped data
> when the input arrays themselves are oriented WENS. 
> Is there a definitive definition for interpretation of lat,lon,value when
> geolocation arrays ā€“ i.e, are the lat/lon representative of pixel center
> (which I think should be the intent)?

That's a good question. I would assume that center of pixel would be what is expected in the 
gdalgeoloc code. I don't see anything explicitly said about that in
https://trac.osgeo.org/gdal/wiki/rfc4_geolocate

During your examination of the code, could you find what was expected ?

I assume you are using geolocation transformer with one of the drivers that support 
reporting geolocation arrays ? One possibility would be an inconsistency in the convention 
this driver (or the datasource itself) reports the lon,lat values with what the geolocation 
transformer expects.


 Does GDAL by default assume that the
> geolocation value corresponds to the top/left of the pixel? Could this
> confusion result in the observed systematic shift? 
> Alternately, could the input arrays be reoriented to WENS using VRTs instead
> of rewriting large raster files?

X_DATASET and Y_DATASET can point to any valid GDAL dataset, so a VRT should be possible 
(and you'll need a VRT to modify the values of X_DATASET and Y_DATASET ;-))

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170928/818ffc33/attachment.html>


More information about the gdal-dev mailing list