Reputation: 1
I am new to the mapping functions in R. I am trying to plot points onto a map, however, I need them in degrees (they are currently in feet). I'm trying to figure out the code for transforming coordinates that are in feet to degrees, would anyone know the code or formula for this?
Upvotes: 0
Views: 256
Reputation: 322
Not sure what you mean by this exactly, but in general to transform the projection of a spatial object you can use:
data.transformed <- spTransform(data, CRS("+proj=longlat +datum=WGS84"))
spTransform()
is from the rgdal
package, and the CRS()
argument can be replaced with whichever particular projection you need. If this isn't helpful or if you are new to mapping and the concept of projections in general, I would suggest trying to ask a question on https://gis.stackexchange.com/.
Upvotes: 1