我已经在ArcMap中使用7个点(纬度,经度)创建了一个多边形shapefile,然后将此shapefile读入R以获取CRS。然后,我使用sf包(和7个点)在R中创建了一个形状文件,并使用了从ArcMap shapefile获得的CRS。将R中创建的shapefile导入ArcMap时,会收到有关不同坐标系的警告。为什么会这样?
我的步骤:
7个点(lon和lat),其中点1 =点7(闭环)。在ArcMap中创建一个多边形shapefile并显示。 ArcMap中的属性显示: 地理坐标系:GCS_North_American_1983 基准:D_North_American_1983
在R中,我使用rgdal读取shapefile并获取CRS
cashes <- rgdal::readOGR(dns="path",layer="shapefile")
cashes@proj4string
结果为:“ + proj = longlat + datum = NAD83 + no_defs + ellps = GRS80 + towgs84 = 0,0,0”
Rshapefile <- readxl::read_xlsx(path,sheet="cashes")
Rshapefile <- sf::st_as_sf(Rshapefile,coords=c("lon","lat"),crs="+proj=longlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0 ")
Rshapefile <- dplyr::summarize(Rshapefile,geometry = sf::st_combine(geometry))
Rshapefile <- sf::st_cast(Rshapefile,"POLYGON")
sf::st_write(Rshapefile,dns=path,layer="Rshapefile",driver="ESRI Shapefile")
然后我将此Rshapefile带入ArcMap,并且坐标系不同。当我在ArcMap中查看属性时,它们显示: 地理坐标系:GRS 1980(IUGG,1980) 基准:D_unknown
这是为什么?我一定做错了,但我不知道该怎么办!