[GRASS5] [bug #1465] (grass) v.proj datum conversion fails. Typo in code main.c

this bug's URL: http://intevation.de/rt/webrt?serial_num=1465
-------------------------------------------------------------------------

Subject: v.proj datum conversion fails. Typo in code main.c

Platform: Solaris2.X/Sparc
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
GRASS Version: 5.0.0

v.proj does not work for datum conversions because of a bug in the code in main.c. Changing:
/* for datum conversion find output location datum and ellipse */
      *out_datum='\0';
      if((hold=G_database_datum_name()))
         strncpy(out_datum,hold,sizeof(out_datum));
      *in_datum='\0';
      if((hold=G_database_datum_name()))
         strncpy(in_datum,hold,sizeof(in_datum));
to:

          *out_datum='\0';
      if((hold=G_database_datum_name()))
         strncpy(out_datum,hold,sizeof(out_datum));
    *out_ellipse='\0'; <------
      if((hold=G_database_ellipse_name())) <------
         strncpy(out_ellipse,hold,sizeof(out_ellipse)); <------
appears to fix problem.
You will see "Shifting NAD83->NAD27" or "Shifting NAD27->NAD83" message if shift occurs (from datum_shift.c). Currently this doesn't happen because the output datum information doesn't get set correctly.

Also, I modified v.proj tcltk module to:
interface_build {
    {v.proj} 0
    {Allows projection conversion of vector files.}
    {entry input {Input vector map:} 0 vector}
    {entry output {Output vector map [input name]:} 0 vector}
    {entry dbase {GRASS database containing INPUT location [current database]:} 0 ""}
    {entry mapset {GRASS mapset containing INPUT vector map [current mapset]:} 0 ""}
    {entry location {Location containing INPUT vector map:} 0 ""}
    {checkbox -s {Automatically run v.support} "" -s}
    {checkbox -l {list vector files in input location} "" -l}
}

but the -l feature does NOT work in tcltk. It does work on command line.

John Gillette

-------------------------------------------- Managed by Request Tracker