I have two spatial objects (coordinates in .shp
files) that I want to draw together in R
, it is using the same CRS (i.e. to map these using an identical, appropriate, projection)
(The R
code to define a projection is similar to:
SpatialPoints(coords, proj4string=CRS('+init=epsg:4326'))
)
First shape file has an associated .proj
that contains:
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
Second shape file has an associated .proj
that contains:
PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]
I tried to do a search using key terms in this .proj
such as https://spatialreference.org/ref/?search=WGS_1984 but don't know which of the several projections to pick.
Any help to find the proper argument to CRS()
would be very useful.