Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201867

How to I convert coordinates keeping all the info from the dataframe

$
0
0

I have a list of coordinates in Lambert78 coordinate system which I want to convert to WGS84. I want these converted coordinates added as 2 additional columns to my dataframe so I can keep labelnames. This is the dataset:

label   Ycoord    Xcoord    
AB_01   227426.9  199559.0  
AB_02   227426.9  199559.0
...

What I would like is a dataframe like this:

label   Ycoord    Xcoord    Ycoord_wgs   Xcoord_wgs
AB_01   227426.9  199559.0  5.92          58.56
AB_02   227316.9  199859.0  5.74          57.68

Converting the coordinates is no problem with something like spTransform but then I loose the connection to the labelnames. Does someone have a suggestion?


Viewing all articles
Browse latest Browse all 201867

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>