[R-sig-Geo] Using spTransform() to reproduce another software package's transformation

Frede Aakmann Tøgersen frtog at vestas.com
Wed Sep 3 19:40:21 CEST 2014


Thanks guys.

I'm a novice but still learning and your expertise is very much appreciated.

Thank you very much.

Br. Frede


Sendt fra Samsung mobil


-------- Oprindelig meddelelse --------
Fra: Hermann Peifer
Dato:03/09/2014 19.27 (GMT+01:00)
Til: "MacQueen, Don" ,Roger.Bivand at nhh.no
Cc: r-sig-geo at r-project.org,Frede Aakmann Tøgersen
Emne: Re: [R-sig-Geo] Using spTransform() to reproduce another software package's transformation

On 2014-09-03 19:02, MacQueen, Don wrote:
> Roger, Hermann, Frede,
>
> My thanks to all who took a look at this. Your responses, including
> Roger¹s re-expression using cs2cs on the proj list and the discussion
> there (subject: NAD_1983_To_WGS_1984_5), are very helpful.
>
> The proj.4 parameters that Roger has provided do better than I had been
> able to achieve, such that I am completely comfortable telling my
> co-workers that I can reproduce their coordinate transformations. And at a
> programmatic level, that is what I really needed, so thanks!
>
>
> -Don
>

You are welcome. Just a final thought: one could reduce the 2-step
transformation to a singe step by reverting the signs of all 7
transformation parameters. This would basically change the "towgs84"
parameters into "fromwgs84" parameters. See the example below.

Regards, Hermann


Input coordinates (locs.xy):
-121.524764291826 37.6600366036405
-121.523480804667 37.6543604613483

Expected output in EPSG:26743, if I understood it right
1703671.30566227 424014.398045834
1704020.20113366 421943.708664294

$ cs2cs -f "%16.9f" +init=epsg:4326
+towgs84=0.991,-1.9072,-0.5129,-0.025789908,-0.0096501,-0.0116599,0.0
+to +init=epsg:26743 locs.xy

1703671.305668926       424014.397713636      1.854101732
1704020.201140860       421943.708332143      1.854560674

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list