[R-sig-Geo] Coordination Transformation from Gauss Kruger to LongLat
Tom Gottfried
tom.gottfried at tum.de
Mon Jan 30 16:39:06 CET 2012
Am 27.01.2012 12:46, schrieb Johannes Radinger:
> Dear R-Geo List!
>
> This is my first post on this list as I have a geographical task/problem
> to solve.
> I want to perform Species Distribution Models (SDM) and therefore
> I have the points of occurence of several Species.
> Unforunately all the environmental maps (climatic maps etc.) are in long-lat projection but my points are in the German Gauss Krüger System.
> So I have to transform the points correctly but I don't know how exactly that works.
>
> I compiled a sample script of what I did so far:
>
> Species<- c("A","B","C")
> X_GK<- c(3518665,3523424,3525506)
> Y_GK<- c(6052307,6040485,6042275)
>
> df<- data.frame(Species,X_GK,Y_GK) # That's how my occurence points look like
>
>
> #library(proj4)
>
> # reassemble coordinates as matrix (don't know it that is really necessary
> # or if I can work with the orig. dataframe)
>
> coord_GK<- cbind(df$X_GK, df$Y_GK)
> coord_longlat<- transform(coord_GK,'+proj=tmerc +ellps=?','+proj=latlong +ellps=sphere') # Here I don't know what I have to specify, or if that method is the one to use?
First time I get to know the proj4 package, so no idea whether you are using the correct function.
But considering the proj4 strings I use "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0
+ellps=bessel +units=m +no_defs +nadgrids=BETA2007.gsb +wktext" for Gauss-Krüger and "+proj=longlat
+ellps=WGS84 +datum=WGS84 +no_defs" for WGS84. But beware that Gauss-Krüger is not unique. You need
to no know the zone (+lon_0), the reference ellipsoid (mostly +ellps=bessel) and the datum in any of
the ways you can specify it (i.e. +nadgrids=BETA2007.gsb. See
http://crs.bkg.bund.de/crseu/crs/descrtrans/BeTA/de_dhdn2etrs_beta.php). GRASS knows the datum
transformation parameters that seem to be best for the three zones used commonly in Germany. Maybe
you find them this way.
In general, http://www.spatialreference.org/ seems to be a good source for proj4 strings of many
reference systems.
regards,
Tom
> I am working on R.2.14.1 on Windows and Mac.
>
>
> Maybe someone of you can help me in this case as I am not a geographer nor a professional R user at all...
>
> Thanks!
>
> best regards,
> Johannes Radinger
>
--
Technische Universität München
Department für Pflanzenwissenschaften
Lehrstuhl für Grünlandlehre
Alte Akademie 12
85350 Freising / Germany
Phone: ++49 (0)8161 715324
Fax: ++49 (0)8161 713243
email: tom.gottfried at wzw.tum.de
http://www.wzw.tum.de/gruenland
More information about the R-sig-Geo
mailing list