Details Ticket 1465


Comment | Reply | Take | Open


Serial Number 1465
Subject v.proj datum conversion fails. Typo in code main.c
Area bug
Queue grass
Requestors jgillette@rfmd.com
Owner none
Status resolved
Last User Contact Thu Dec 5 16:17:43 2002 (6 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Thu Dec 5 16:22:12 2002 (6 yr ago)
Created Mon Dec 2 18:18:52 2002 (6 yr ago)

Transaction History Ticket 1465


Mon, Dec 2 2002 18:18:52    Request created by guest  
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 



Wed, Dec 4 2002 10:33:15    Mail sent by mneteler  
Eric has submitted the C changes.
I have submitted the tcltkgrass changes, thanks.

It's true (but wanted?) that -l doesn't work in tcltkgrass.
Reason is

 if(isatty(0))  /* check if on command line */
(line 217).

Should we remove that if condition?

 Markus
Wed, Dec 4 2002 19:08:36    Mail sent by glynn.clements@virgin.net  
Return-Path <glynn.clements@virgin.net>
Delivered-To grass-bugs@lists.intevation.de
From Glynn Clements <glynn.clements@virgin.net>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Message-ID <15854.17170.570270.469702@cerise.nosuchdomain.co.uk>
Date Wed, 4 Dec 2002 18:01:54 +0000
To Markus Neteler via RT <grass-bugs@intevation.de>
Cc jgillette@rfmd.com, grass5@grass.itc.it
Subject Re: [GRASS5] [bug #1465] (grass) v.proj datum conversion fails. Typo in code main.c
In-Reply-To <20021204093315.CABE213AD0@lists.intevation.de>
References <20021204093315.CABE213AD0@lists.intevation.de>
X-Mailer VM 6.94 under 21.4 (patch 10) "Military Intelligence" XEmacs Lucid
X-Spam-Status No, hits=-2.4 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES, SIGNATURE_SHORT_DENSE,SPAM_PHRASE_00_01 version=2.43
X-Spam-Level
Markus Neteler via RT wrote:

> Eric has submitted the C changes.
> I have submitted the tcltkgrass changes, thanks.
> 
> It's true (but wanted?) that -l doesn't work in tcltkgrass.
> Reason is
> 
>  if(isatty(0))  /* check if on command line */
> (line 217).
> 
> Should we remove that if condition?

Yes.

-- 
Glynn Clements <glynn.clements@virgin.net>


Thu, Dec 5 2002 16:17:43    Mail sent by guest  
Fixed in CVS.

Markus
Thu, Dec 5 2002 16:22:12    Status changed to resolved by mneteler  
Comment | Reply | Take | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request