[R-sig-Geo] Projections and Transformations with Garmin GPS Coordinates?

Breitbach, Nils breitbach at uni-mainz.de
Wed Nov 3 17:43:08 CET 2010


Dear Community,

I am faced with the problem of using coordinates downloaded from a Garmin GPS receiver in R using different projections (WGS1984, Gauss Krueger Zone 2 and Zone 3, UTM 32 N). The receiver preferences are as follows:

Grid	Breite/Länge hddd.ddddd°
Datum	WGS 84

As I said above it is a Garmin receiver, as it is somehow important to judge what the receiver is using internally. Coordinates should be unprojected in decimal degrees.


I am already at the point where I have the coordinates in a data frame:

# create data frame with coordinates
map <- data.frame(x = Fielddata$Longitude, y = Fieldata$Lattitude, s = 1:length(rownames(Fielddata)))

# convert numbers in "real" coordinates; still without spatial reference
coordinates(map) <- ~ x + y


I now need to project the data correctly, but I am not sure if I did it in the right way (there are many EPSG codes available). Here is my version:

# assign spatial reference; via EPSG code set to WGS84
proj4string(map)<- CRS("+init=epsg:4326")

Does anybody of you know if this is the same definition as in the Garmin GPS receivers? Should result in correct WGS1984 coordinates.


I now tried to reproject the WGS1984 coordinates into the different other datums and projections that I need:

# transform/reproject from WGS84 to UTM32N
map2 <- spTransform(map,CRS("+init=epsg:32632"))

Is 32632 the correct ESPG code for "WGS 1984 / UTM Zone 32N" ? Or is should I use something differnt?
And now I also need some more conversions for land-use data sets (CORINE 2006 and German ATKIS) that I use and which were delivered in different datums and transformations. It is easier to convert my point coodrinates than the spatial polygons of the huge land-use data sets, so here is my version for that:

# transform/reproject from WGS84 to Gauss Krueger Zone 3 (for use with CORINE land-use data)
map3a <- spTransform(map,CRS("+init=epsg:2166"))

Again, is 2166 the correct ESPG code for "Gauss Kruger zone 3"? I did not find anything for Gauss Krueger Zone 2 on http://spatialreference.org/ref/ (you need to serch for Gauss Kruger)?! This fact lets me also doubt that my Zone 3 code is correct?! But I found an alternative for the two Gauss Krueger Zones --> "DHDN / 3-degree gauss-kruger zone 2 and 3":

# transform/reproject from WGS84 to Gauss Krueger Zone 3 (for use with CORINE land-use data); DHDN means Deutsches Hauptdreiecksnetz
map3b <- spTransform(map,CRS("+init=epsg:31467"))

# transform/reproject from WGS84 to Gauss Krueger Zone 2 (for use with ATKIS land-use data); DHDN means Deutsches Hauptdreiecksnetz
map4 <- spTransform(map,CRS("+init=epsg:31466")) 

I am almost sure, that this is the better/correct one. Which is the better suited transformation? Any comments on this?
Is it okay with spTransform to simply give the new datum/projection and use the unprojected WGS 1984 data as input? Or do I need to do anything with the input data or give some information to the function?

Many questions ... thanks a lot ...!
Best wishes,

Nils Breitbach

_________________________________________________________

Nils Breitbach, Dipl.-Biol.
Institut für Zoologie, Abt. 5: Ökologie
J.-J.-Becher-Weg 13
Johannes Gutenberg-Universität
55128 Mainz
Germany

phone: +49 6131 39-22718
fax:   +49 6131 39-23731
WWW: www.community-ecology.uni-mainz.de/126_ENG_HTML.php



More information about the R-sig-Geo mailing list