In order to achieve Latitude and Longitude coordinates you need to go from you projected coordinate system (NAD 83) to a geographic coordinate system (WGS 84). In the case of your data you are using a projection in feet, so your West Illinois projection is correct. However, your mistake in the orignal post and highlighted below was that you spTransform
from NAD83 to NAD83 giving you erroneous data. More information on the difference between projected and geographic coordinate systems can be found here. Instead you need to use a WGS84 projection in your transformation, as follows: ** as noted by Jim, the conversion from feet to meters is now incorporated.
library(rgdal)
nad83_coords <- data.frame(x=c(577430), y=c(2323270)) # My coordinates in NAD83
nad83_coords <- nad83_coords *.3048 ## Feet to meters
coordinates(nad83_coords) <- c('x', 'y')
proj4string(nad83_coords)=CRS("+init=esri:102272") # West Illinois
## Erroneous code, NAD83 to NAD83
## coordinates_deg <- spTransform(nad83_coords,CRS("+init=epsg:3436"))
## Corrected with WGS84 to yield Lat/Long
coordinates_deg <- spTransform(nad83_coords,CRS("+init=epsg:4326"))
coordinates_deg
SpatialPoints:
x y
[1,] -96.57822 42.86484
Coordinate Reference System (CRS) arguments: +init=epsg:4326 +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0
In the event you did not want to convert we can use the following projection EPSG: 3531
library(rgdal)
nad83_coords <- data.frame(x=c(577430), y=c(2323270)) # My coordinates in NAD83
coordinates(nad83_coords) <- c('x', 'y')
proj4string(nad83_coords)=CRS("+init=EPSG:3531") # West Illinois
## Erroneous code, NAD83 to NAD83
## coordinates_deg <- spTransform(nad83_coords,CRS("+init=epsg:3436"))
## Corrected with WGS84 to yield Lat/Long
coordinates_deg <- spTransform(nad83_coords,CRS("+init=epsg:4326"))
coordinates_deg
SpatialPoints:
x y
[1,] -96.57821 42.86485
Coordinate Reference System (CRS) arguments: +init=epsg:4326 +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0
I see what you're saying about where the coordinates should be, looking at the spatial reference site, your coordinates are within the window of that projection, but they aren't coming out as expected. Still digging.