I created a shapefile (TESTPOLY) in R and set the projection using:
proj4string(TESTPOLY) <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs+ towgs84=0,0,0")
when I read it into ArcMap and checked the properties, it said 'GCS_Unknown:
I checked the projection in R with:
crs(TESTPOLY)
And it returned:
Coordinate Reference System: Deprecated Proj.4 representation: +proj=longlat +datum=WGS84 +no_defs WKT2 2019 representation: GEOGCRS["unknown", DATUM["World Geodetic System 1984", ELLIPSOID["WGS 84",6378137,298.257223563, LENGTHUNIT["metre",1]], ID["EPSG",6326]], PRIMEM["Greenwich",0, ANGLEUNIT["degree",0.0174532925199433], ID["EPSG",8901]], CS[ellipsoidal,2], AXIS["longitude",east, ORDER[1], ANGLEUNIT["degree",0.0174532925199433, ID["EPSG",9122]]], AXIS["latitude",north, ORDER[2], ANGLEUNIT["degree",0.0174532925199433, ID["EPSG",9122]]]]
And even though it does seem to 'know' that I set the coordinate system to WGS 84, there still seems to be an aspect of the projection missing.
What have I neglected to do here to give this shapefile a proper projection?
sp
,rgdal
and maybe alsoraster
packages, but you don't say. I'd strongly recommend you ditch this approach and look for a tutorial with the newsf
package for spatial data.