rgdal软件包lat/long-> UTM [英] rgdal package lat/long -> UTM

查看:94
本文介绍了rgdal软件包lat/long-> UTM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以看到这是怎么回事:

Can someone see what's wrong with this:

library(rgdal)

# Make a two-column matrix, col1 = long, col2 = lat
xy <- cbind(c(-107), c(26))
# Convert it to UTM coordinates (in units of meters)
project(xy, "+proj=utm +zone=51 ellps=WGS84")

我知道纬度大于84和小于80都是无效的,但为什么会出现:

I understand that Latitude greater than 84 and smaller than 80 are invalid but why do I get:

In project(xy, "+proj=utm +zone=51 ellps=WGS84") :
  1 projected point(s) not finite

谢谢!

推荐答案

使用正数表示经度(107,而不是-107).对西半球是负面的

use positive number for longitude (107, instead of -107). negative is for western hemisphere

这篇关于rgdal软件包lat/long-&gt; UTM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆