Skip to content

convert point and map coordinates UTM to WSG

2 messages · Marc Marí Dell'Olmo, Paul Hiemstra

#
Dear R-users,

Can anyone tell me how to convert point coordinates from WSG84 (google
maps coordinates) format to UTM HUSO-31 ED-50. And if I have a map
(shp format) with UTM HUSO-31 ED-50 coordinates, how can I convert to
WSG84 (google maps coordinates) coordinates. Should I install some
external software?

Can anyone tell me the instructions?

Thank you,

Marc
2 days later
#
Hi,

To transform coordinates you can use the spTransform function from the 
rgdal pacakge. It uses proj4 to do the transformations. Proj uses a 
string to describe a certain projection, the so called proj4string. If 
you can determine the proj4string for both your projections you can 
transform between them. The first string (WGS84) looks like this:

"+proj=longlat +datum=WGS84"

The second (UTM) something like:

"+proj=utm +zone=yourzone +datum=yourdatum"

See the documentation of spTransform for more information on how to use 
the function.

cheers and hth,
Paul
Marc Mar? Dell'Olmo wrote: