使用从笛卡尔空间和世界文件生成的纬度和经度计算多边形面积 [英] Polygon area calculation using Latitude and Longitude generated from Cartesian space and a world file

查看:26
本文介绍了使用从笛卡尔空间和世界文件生成的纬度和经度计算多边形面积的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给定一系列 GPS 坐标对,我需要计算多边形 (n-gon) 的面积.这是相对较小的(不大于 50,000 平方英尺).地理编码是通过对世界文件中的数据应用仿射变换来创建的.

Given a series of GPS coordinate pairs, I need to calculate the area of a polygon (n-gon). This is relatively small (not larger than 50,000 sqft). The geocodes are created by applying an affine transform with data from a world file.

我尝试通过将地理编码转换为笛卡尔坐标来使用两步法:

I have tried to use a two step approach by doing converting the geocodes to cartesian coordinates:

double xPos = (lon-lonAnchor)*( Math.toRadians( 6378137 ) )*Math.cos( latAnchor );
double yPos = (lat-latAnchor)*( Math.toRadians( 6378137 ) );

然后我使用交叉积计算来确定面积.

then I use a cross product calculation to determine the area.

问题是结果的准确性有点偏差(大约 1%).有什么可以改进的吗?

The issue is that the results are a bit off in accuracy (around 1%). Is there anything I can look into to improve this?

谢谢.

推荐答案

1% 的错误似乎有点高,因为只是您的近似值.您是在与实际测量值还是一些理想计算进行比较?请记住,GPS 中也存在可能造成的误差.

1% error seems a bit high due to just your approximation. Are you comparing against actual measurements or some ideal calculation? Remember that there is error in the GPS as well that might be contributing.

如果你想要一个更准确的方法来做这件事,这个 问题.如果您想要更快的方法,您可以使用 WGS84 大地水准面而不是参考球体来转换为笛卡尔坐标 (ECEF).这是该转换的 wiki 链接.

If you want a more accurate method for doing this there's a good answer at this question. If you're going for a faster way you can use the WGS84 geoid instead of your reference sphere for converting to cartesian coordinates (ECEF). Here's the wiki link for that conversion.

这篇关于使用从笛卡尔空间和世界文件生成的纬度和经度计算多边形面积的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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