【发布时间】:2023-03-16 08:28:01
【问题描述】:
我不知道如何为我的州平面(阿拉斯加州平面区域 4 NAD83 英尺)找到正确的投影输入以与函数 sp::CRS 一起使用,这是一个问题。
我正在遵循从州平面转换的说明: Convert latitude/longitude to state plane coordinates
我已经查看了 ?CRS,它把我带到了参考资料中的http://trac.osgeo.org/proj/,但我什至无法判断这个网站是否会有我需要的东西。
我正在使用 Hadley Wickham 的教程来绘制 shapefile: https://github.com/hadley/ggplot2/wiki/plotting-polygon-shapefiles
我可以绘制任何我喜欢的 shapefile: http://munimaps.muni.org/moagis/download.htm
我的代码:
require(rgdal)
require(maptools)
require(ggplot2)
require(plyr)
my_dsn <- "directory where the shapefile is"
Assembly = readOGR(dsn=my_dsn, layer="assembly")
Assembly@data$id = rownames(Assembly@data)
Assembly.points = fortify(Assembly, region="id")
Assembly.df = join(Assembly.points, Assembly@data, by="id")
Assembly@data$id = rownames(Assembly@data)
Assembly.points = fortify(Assembly, region="id")
Assembly.df = join(Assembly.points, Assembly@data, by="id")
#Assembly.df$DISTRICT <- factor(Assembly.df$DISTRICT)
ggplot(Assembly.df) +
aes(long,lat,group=group) +
geom_path(color="black") +
coord_equal()
请帮我找到转换投影所需的输入。我是使用地图投影的新手。
【问题讨论】:
-
proj4string(Assembly) 在 readOGR 行之后直接报告什么?如果不是 NA,您最好使用 ?spTransform,所有其他内容都无济于事
-
输出为 "+proj=tmerc +lat_0=54 +lon_0=-150 +k=0.9999 +x_0=500000.0000000001 +y_0=0 +datum=NAD83 +units=us-ft +no_defs + ellps=GRS80 +towgs84=0,0,0"
-
我猜 googlemaps 使用墨卡托投影。我如何找到这个投影的 CRS() 输入?