0

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:

enter image description here

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?

2
  • 1
    There isn't an EPSG code for WGS 84 CRS with long/lat axis order, which may be the issue behind the 'warning'. If you set the axes to be lat/long then the EPSG code would be 4326. However there is sufficient information in the WKT2 to define the CRS to allow the data to be correctly portrayed.
    – nmtoken
    May 25, 2023 at 15:28
  • 1
    Hard to tell without seeing what you've done and how you've constructed the polygons and how you've saved them to a shapefile. For example, this looks like you are using the sp, rgdal and maybe also raster packages, but you don't say. I'd strongly recommend you ditch this approach and look for a tutorial with the new sf package for spatial data.
    – Spacedman
    May 25, 2023 at 16:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.