3

我正在尝试使用以下代码将全球地图 shapefile 从地理坐标系(纬度/经度,WGS84)转换为 UTM 投影:

setwd = "~/Desktop/Maps"
wmap = readOGR(dsn="world_map", layer="world_map") 
wmap_utm = spTransform(wmap, CRS("+proj=utm"))

不幸的是,我不断收到以下错误代码:

non finite transformation detected:
[1] 111.01052  19.68381       Inf       Inf
Error in .spTransform_Polygon(input[[i]], to_args = to_args, from_args = from_args,  : 
  failure in Polygons 3 Polygon 1 points 1
In addition: Warning message:
In .spTransform_Polygon(input[[i]], to_args = to_args, from_args = from_args,  :
  686 projected point(s) not finite

我已阅读有关此主题的以下两个问题,但都与小数据示例有关,而不是与具有大量数据点的 shapefile 有关: rgdal package lat/long -> UTMrgdal R Package 中 spTransform 中的“检测到非有限变换”。我有一些 UTM 格式的多边形文件希望添加到地图中,我真的需要 UTM 投影。任何关于我可能做错了什么或纠正问题的方法的建议将不胜感激。

4

0 回答 0