[GRASS5] Re: [bug #1052] (grass) [rsv].proj are crashing
Glynn Clements
glynn.clements at virgin.net
Thu May 23 11:43:06 EDT 2002
Roger Miller 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.
>
> Uhh. I guess I did know about that problem. A check is easily added. My
> preference would be also to change G_database_datum_name() so that it does
> not return NULL (maybe returning a pointer to "unknown" instead) and/or
> ensuring that the datum is never blank.
That will only work if the value is acceptable to set_datumshift(), or
you explicitly check the value within *.proj. Ditto for the ellipse
name.
proj_f should probably be initialised to pj_do_proj, so that you can
just omit the call to set_datumshift() if you don't have the necessary
parameters.
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev
mailing list