R 包 SF |从 NAD83 转换不工作
R package sf | Conversion from NAD83 is not working
我想绘制特定点(商店)并查看它们是否位于密苏里州圣路易斯学校周围的缓冲区中。
无论出于何种原因,在以下示例中我都没有得到商店的明确转换(至少没有显示点)。
商店的坐标描述为:“XCoord 和 YCoord 字段是 I/Leads 商店位置的 X 和 Y 坐标,采用 State Plane North American Datum 1983 (NAD83) 格式。这是用于显示 regional/local 地理数据的标准坐标系
任何桌面地图应用程序。 " 这是给密苏里州的圣路易斯的。
商店的两个数据点:
XCoord | YCoord
900378.4 | 1033497
882296.1 | 1034238
这是我的代码:
county.sf <- get_acs(state = "MO",
county = c("St. Louis County", "St. Louis City"),
geography = "tract",
variables = "B03002_001",
output="wide",
geometry = TRUE) %>%
sf::st_transform(crs = "ESRI:102003")
school <- read.csv("C:\file1.csv")
school.sf <- st_as_sf(school, coords = c("long", "lat"), crs = "epsg:4326")
school.sf.utm <- st_transform(school.sf, crs = "ESRI:102003")
#^^^This all works fine and graphs with appropriate buffer
store <- import("C:file2.csv")
store.sf <- st_as_sf(store, coords = c("XCoord", "YCoord"), crs ="epsg:6512")
store.sf.utm <- st_transform(store.sf, crs = "ESRI:102003")
#These points are not showing up. There is more code but I think it is this code ^^^ that is wrong. 6512 is supposedly MO East, but something is wrong.
经过大量实验,我发现正确的代码是
"ESRI:102696"
而不是
共 "espg:6512."
我想绘制特定点(商店)并查看它们是否位于密苏里州圣路易斯学校周围的缓冲区中。
无论出于何种原因,在以下示例中我都没有得到商店的明确转换(至少没有显示点)。
商店的坐标描述为:“XCoord 和 YCoord 字段是 I/Leads 商店位置的 X 和 Y 坐标,采用 State Plane North American Datum 1983 (NAD83) 格式。这是用于显示 regional/local 地理数据的标准坐标系 任何桌面地图应用程序。 " 这是给密苏里州的圣路易斯的。
商店的两个数据点:
XCoord | YCoord
900378.4 | 1033497
882296.1 | 1034238
这是我的代码:
county.sf <- get_acs(state = "MO",
county = c("St. Louis County", "St. Louis City"),
geography = "tract",
variables = "B03002_001",
output="wide",
geometry = TRUE) %>%
sf::st_transform(crs = "ESRI:102003")
school <- read.csv("C:\file1.csv")
school.sf <- st_as_sf(school, coords = c("long", "lat"), crs = "epsg:4326")
school.sf.utm <- st_transform(school.sf, crs = "ESRI:102003")
#^^^This all works fine and graphs with appropriate buffer
store <- import("C:file2.csv")
store.sf <- st_as_sf(store, coords = c("XCoord", "YCoord"), crs ="epsg:6512")
store.sf.utm <- st_transform(store.sf, crs = "ESRI:102003")
#These points are not showing up. There is more code but I think it is this code ^^^ that is wrong. 6512 is supposedly MO East, but something is wrong.
经过大量实验,我发现正确的代码是
"ESRI:102696"
而不是
共 "espg:6512."