[GRASSLIST:3823] Re: Projection lat/lon (gps) to local system

Morten Sickel morten at sickel.net
Wed Jul 7 09:04:40 EDT 2004


Thanks again, Paul, I  did believe that I had given all relevant info, but 
here you are:

PROJ_INFO in the local data set:

GRASS 5.7.cvs:~/NinaSather/Kart > \ 
cat /home/grassdata/ninahs/PERMANENT/PROJ_INFO
name: Transverse Mercator
datum: ngo48
towgs84: 278.3,93.0,474.5,7.889,0.050,-6.610,6.21
proj: tmerc
ellps: modif_bessel
a: 6377492.0175999999
es: 0.0066743722
f: 299.1528128500
lat_0: 58.0000000000
lon_0: 8.3895830000
k_0: 1.0000000000
x_0: 0.0000000000
y_0: 0.0000000000

and in the from-dataset:
GRASS 5.7.cvs:~/NinaSather/Kart > \ 
cat /home/grassdata/ninahsgps/PERMANENT/PROJ_INFO
name: Latitude-Longitude
proj: ll
ellps: wgs84

(Should there be a datum here as well?)

the command-line:

GRASS 5.7.cvs:~/NinaSather/Kart > v.proj input=skogstad070702 \ 
location=ninahsgps


The gps-data were originating from a Magellan GPS315 with files like:
GRASS 5.7.cvs:~/NinaSather/Kart > head ../gps/071002Skogstad.txt
Datum,WGS84,WGS84
TP,DM, 61.03175, 008.51871,07/09/2002,14:57:37 ,1,0000000M,A,TRAK01
TP,DM, 61.03178, 008.51823,07/09/2002,14:57:37 ,0,0000000M,A,TRAK01
TP,DM, 61.03180, 008.51777,07/09/2002,14:57:37 ,0,0000000M,A,TRAK01
TP,DM, 61.03193, 008.51710,07/09/2002,14:57:37 ,0,0000000M,A,TRAK01
TP,DM, 61.03210, 008.51659,07/09/2002,14:57:37 ,0,0000000M,A,TRAK01
TP,DM, 61.03214, 008.51709,07/09/2002,14:57:37 ,0,0000000M,A,TRAK01
TP,DM, 61.03174, 008.51708,07/09/2002,14:57:37 ,0,0000000M,A,TRAK01
TP,DM, 61.03154, 008.51724,07/09/2002,14:57:37 ,0,0000000M,A,TRAK01
TP,DM, 61.03145, 008.51771,07/09/2002,14:57:37 ,0,0000000M,A,TRAK01

And have been piped through: 
GRASS 5.7.cvs:~/NinaSather/Kart > cat ~/perl/gps2sites.pl
#!/usr/bin/perl -w
sub deg2dec{
  my $in =  shift;
  $deg=int($in);
  $in -= $deg;
  $in /=0.6;
  $in +=$deg;
}


my $i;
while(<>){
  my @fields=split /,\s*/;
  next if $#fields<3;
  next if $field[1] ne 'DM';
  local $,=' ';
  print deg2dec($fields[3]),deg2dec($fields[2]),++$i,"\n";
}

(the DM in the GPS-file shows that the data are on the form degrees and 
decimal minutes)

I cannot recall any other data treatment that should be of significance., but 
wold love to be corrected.

In case that should matter, my versjon of proj is 
GRASS 5.7.cvs:~/NinaSather/Kart > proj
Rel. 4.4.7, 31 March 2003
usage: proj [ -beEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files ]

Well, one possible problem that I suddeny recognice, (I do not believe it has 
happended, but you newer know) is that the data-collectors might have managed 
to change the datum of the GPS, as you can see from the dates in the file, 
the data have been "maturing" for a while, so it is not possible to see if 
that is the case, but I do believe that the GPS in all cases outputs data 
reffered to WGS84.

Morten

-- 
Morten Sickel
http://sickel.net/
Drøbak, Norway




More information about the grass-user mailing list