[GRASS5] Re: [bug #1052] (grass) [rsv].proj are crashing
Markus Neteler
neteler at itc.it
Thu May 23 05:46:21 EDT 2002
On Thu, May 23, 2002 at 10:32:20AM +0200, Markus Neteler wrote:
> On Thu, May 23, 2002 at 10:26:14AM +0200, Markus Neteler wrote:
> [...]
> > But...
> > Then the next bug occurs due to the new NAD datum support:
> > In r.proj/main.c line 279 is the function G_database_datum_name() used:
> > strncpy(in_datum,G_database_datum_name(),sizeof(in_datum));
> > For my existing locations it returns NULL which causes a crash
> > of strncpy(). The function G_database_datum_name() is in
> > src/libes/gis/proj3.c
> >
> > How to solve that one (hi Roger)? Therefore [vs].proj are also affected.
>
> A followup:
> After using 'g.setproj' in the source location (for r.proj) to define
> the map datum, r.proj works fine.
>
> Means: we need a change in case no map datum is present in the
> PROJ_INFO file (which will be the case for many locations out there,
> especially since the definition of a map datum is not forced).
Next followup: After applying the datum to the source location I
get the next trap (sigh).
r.proj in=dtm.10meters loc=pat map=dtm.10meters dbase=/ssi0/ssi/neteler/grassdata
cannot initialize pj
cause: unknown elliptical parameter name
ERROR: Can't get projection key values of output map
Tracking down the problem, I have found that in pj_get_kv() in
src/libes/proj/get_proj.c
the "ellips=name" is not put into the structure "in_proj_keys".
Looking into the Changelog, I found:
2001-10-23 03:33 frankw
* get_proj.c: dont pass through ellps= if we have defining
parameters
The former version of PROJ4 in GRASS was able to deal with this case,
I recall that the change done by Frank was required to work around
problems with r.in.gdal.
However, after update of PROJ4 (or another reason), the "ellps"
seems to be required again.
Is a modification needed around line 71 in get_proj.c?
Markus
More information about the grass-dev
mailing list