我坚持认为这是一个不知道如何为我的州平面(阿拉斯加州平面区域 4 NAD83 英尺)找到正确的投影输入以与 function 一起使用的问题sp::CRS
。
我正在遵循从州平面转换的说明: 将纬度/经度转换为州平面坐标
我已经查看了 ?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()
请帮我找到转换投影所需的输入。我是使用地图投影的新手。