[gdal-dev] SDTS elevation values
Frank Warmerdam
warmerdam at pobox.com
Thu Aug 7 11:19:26 EDT 2008
Karthik wrote:
> Frank,
>
> Thanks for your suggestion. I tried it out and I get the exact value
> as expected. If I understand correctly, you are referring to the
> intracell-reference-location field. It's used to denote whether the top left
> coordinates are off by half a pixel or not. I have taken care of this
> situation also. I think the variation is due to reading the wrong record. I
> think I am somehow reading the one record below or above the required
> record. I am also not sure whether Global mapper is using other
> interpolations like Bicubic or Trilinear interpolation which can give more
> accuracy.
>
> Also, I want a reassurance on the math I used. I have attached a
> JPEG image that explains the math I used to get the four surrounding points.
Karthik,
The image skips some of the core math you use to do the interpolation
but it seems generally reasonable.
> One more basic question I have here. How can one be sure of the
> values they are getting after interpolation? Is there some other
> verification tool available other than Global Mapper to cross verify?
When I write interpolators I do test points and then manually compute the
results I would expect. In particular I do some test at pixel center (should
get the exact value of the original pixel) and on a grid corner (should get
a simple average of the four surrounding pixels).
I'm sorry I don't have more time to dig into this.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org
More information about the gdal-dev
mailing list