[GRASS5] r.in.gdal - precision problem in lib/gis/adj_cellhd.c

Brad Douglas rez at touchofmadness.com
Tue Apr 12 14:37:23 EDT 2005


On Tue, 2005-04-12 at 18:37 +1200, Hamish wrote:
> On Mon, 11 Apr 2005 17:05:57 +0200
> Markus Neteler <neteler at itc.it> wrote:
> 
> > 
> > However, in this case it was r.in.gdal which caused problems:
> > 
> >  http://grass.itc.it/pipermail/grass5/2005-April/017946.html
> >  "r.in.gdal SRTM_GTOPO_u30_n090w020.tif out=srtm90_gtopo30
> >   ...
> >   D0/0: North: 90.0000000002
> >   WARNING: G_set_window(): Illegal latitude for North
> >  "
> > 
> > Would be nice to accept such subtle deviations as shown above.
> ..
> > Corner Coordinates:
> > Upper Left    ( 20d 0' 0.00"W, 90d 0' 0.00"N)
> 
> 
> Note that is 22e-06 meters. We can make the test 0.1mm above 90deg lat,
> 0.0001 / (60*1852.) = 8.9993e-10
> 
> but will doing this allow weird segfaults with e.g. *.proj etc. down the
> road? I think it might; better to fix the GDAL casting?

I did some comparisons between GRASS, listgeo and GDAL yesterday with
the above image.

In this case, GRASS is reporting wrong values (however small the
difference is).  The projection handling needs to be reviewed.


-- 
Brad Douglas <rez at touchofmadness.com>




More information about the grass-dev mailing list