r - 在SF对象上设置正确的crs以绘制坐标点

标签 r gis geospatial map-projections sf

我正在尝试为sf对象定义正确的CRS。我想在以下图层(国家:荷兰)上绘制点:

Simple feature collection with 380 features and 3 fields
geometry type:  MULTIPOLYGON
dimension:      XY
bbox:           xmin: 13565.4 ymin: 306846.2 xmax: 278026.1 ymax: 619232.6
epsg (SRID):    NA
proj4string:    +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs

输出:

该层具有正确的投影。

但是POINT层可能没有正确的CRS项目,大概是因为它没有proj4string吗?
Simple feature collection with 566 features and 5 fields
geometry type:  POINT
dimension:      XY
bbox:           xmin: 3.5837 ymin: 50.86487 xmax: 7.120998 ymax: 53.44835
epsg (SRID):    NA
proj4string:    NA

如何设置与上一张 map 相同的投影,以便可以在其上绘制坐标点?

最佳答案

另外,还有函数st_set_crs(),可以在管道中使用。例如,
points %>% st_set_crs(st_crs(polygons))

关于r - 在SF对象上设置正确的crs以绘制坐标点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50232331/

相关文章:

没有三角函数的 SQL 距离查询

.net - 无法加载 DLL 'SqlServerSpatial140.dll' : The specified module could not be found

java - Solr 3.4 Geodist 函数,不正确/或不需要的结果

r - openxlsx::write.xlsx 覆盖现有工作表而不是追加

r - 使用其他栅格作为指标对栅格堆栈的每个网格单元求和的函数

ruby - 我如何使用 (Ruby) RGeo 转换 (Unproject) 坐标

r - 从 rgeos 包中设置 writeWKT 的精度

r - ggplot 按因子和梯度颜色

r - 如何使R词云以较浅的颜色显示最常用的术语

mysql - 该 Polygon 对象会自行关闭。为什么此插入仍然失败并出现错误 3037 : Invalid GIS data?