[GRASS5] GRASS and lat/long with sphere
Markus Neteler
neteler at itc.it
Tue Oct 1 06:00:06 EDT 2002
On Tue, Oct 01, 2002 at 10:54:10AM +0100, Glynn Clements wrote:
>
> Markus Neteler wrote:
>
> > > while trying to define a lat/long location with Sphere instead
> > > of WGS84, I found in
> > >
> > > src/libes/gis/ellipse.table
> > > # earth as a sphere:
> > > # There is a bug in libes/gis/get_ellipse.c, where a function
> > > # return e=0.0 in any case. So do not use sphere!
> > > # sphere "Spherical Earth" a=6370997.000
> > >
> > > Is there no/any hope to fix the code (I don't know how...).
> >
> > [Note that also for Mars planet GIS activities the sphere is
> > required. So we should really support it]
> >
> > ... of course I tried it by activating the "sphere" line. What happens:
> >
> > - select lat/long
> >
> > Please enter a one line description for location <sphere>
> >
> > > sphere test
> > =====================================================
> > sphere test
> > =====================================================
> > ok? (y/n) [y]
> > WARNING: Line 144 of ellipsoid table file
> >
> > </mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/etc/ellipse.table>
> > is invalid
> >
> > Please specify ellipsoid name
> > Enter 'list' for the list of available ellipsoids
> > Hit RETURN to cancel request
> > >
> >
> > The warning occurs at
> > src/libes/gis/get_ellipse.c
> > line 329
>
> The function get_a_e2_f() in get_ellipse.c requires that e2 (the
> eccentricity-squared) is greater than zero (otherwise it returns zero,
> indicating an error).
>
> Changing it to allow e2 to be equal to zero doesn't result in any
> problems which are immediately obvious. However, it may be that some
> code can't cope with this (e.g. computing the reciprocal). In all
> probability, the only way to find out is to make the change and wait
> for bug reports.
May I ask you to apply the change? As far as I understand it should
only users of "sphere" ellipsoid. So it is no severe change (I have
already another tester in mind, hi Alessandro F.!).
Thanks,
Markus
More information about the grass-dev
mailing list