Trimble GPS input

Darrell McCauley mccauley at ecn.purdue.edu
Fri Oct 22 12:56:47 EDT 1993


Ronald Thomas (ront at niwot.CFNR.ColoState.EDU) writes on 22 Oct 93:
>The format produced by Pfinder has an error; the coordinates come out
>easting - northing instead of the northing - easting that v.in.ascii
>requires.  All other parts of the Pfinder produced ascii vector file 
>are correct.  

>I have heard that a simple adjustment of the v.in.ascii code (and
>recompilation) can result in a version of v.in.ascii that will correctly

This may be all that is necessary:

% diff asc_to_bin.c asc_to_bin.c.old
81c81
<                       sscanf(buff, "%1c%lf%lf", &ctype, x, y) ;
---
>                       sscanf(buff, "%1c%lf%lf", &ctype, y, x) ;


> I have thought of trying an AWK script, but the structure  of the ascii

piece of cake :-)

% awk '{if (NF == 2 && ($1 != "A" && $1 != "L" && $1 != "MAP" && $1 != "OTHER" 
&& $1 != "ZONE:" )) printf " %s %s\n",$2,$1; else print $0}' file

Good luck (usual disclaimers apply - I just cooked these answers up in
2 minutes or so).

--Darrell

James Darrell McCauley, Purdue Univ, West Lafayette, IN 47907-1146, USA
mccauley at ecn.purdue.edu, mccauley%ecn at purccvm.bitnet, pur-ee!mccauley
*** avail. for full time employment 9/94-inquiries welcome (no hh, plz) ***



More information about the grass-user mailing list