[Gdal-dev] modis sinusoidal tiles: bug in gdal?

Andrey Kiselev dron at ak4719.spb.edu
Tue Nov 6 10:00:48 EST 2007


On Tue, Nov 06, 2007 at 03:24:23PM +0100, Vincent Schut wrote:
> > I see the pixels are just very slightly not-square.  The actually
> > bounds in sinusoidal projection are apparently computed from the
> > lat/long bounds for the image so they are sensitive to small
> > differences due to floating point error, and issues in the
> > sinusoidal equations.  I see the differences are roughly 12 digits
> > into the pixel size and represent a difference in pixel size of
> > roughly one billionth of a meter or (I think) roughly one millionth
> > of a meter in the origin/corner values.
> And as an extra example to the not-so-good metadata that NASA apparently
> ships with their products:
> - they say they use a spheroid of 6371007.181.
> - md says GLOBALGRIDCOLUMNS=86400
> - md says CHARACTERISTICBINSIZE=463.312716527778
> - (6371007.181 * 2pi) / 86400 = 463.31271656938469
> Now which one is non-accurate, their spheroid or their pixel size? OK,
> we are still talking below-mm scales, but still I think it is a bit
> embarassing... Or maybe they have a more accurate pi than my python
> has... :-)

Vincent,

Note, that projection and georeferencing parameters reported by GDAL
are not fetched from the metadata (well, let say they are not fetched
from anything visible). So you can find difference between metadata
records and projection info, that is not necessary a serious problem.

Another source of differences is a way how these data stored in HDF. All
parameters are serialized in ASCII strings, so we will always have
conversion/rounding/encoding errors with this stuff. Personally, I do
not care about so subtle errors. 

Best regards,
Andrey

-- 
Andrey V. Kiselev
ICQ# 26871517



More information about the gdal-dev mailing list