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

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

问题描述

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



我尝试使用两步法将地理编码转换为笛卡尔坐标: / p>

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

然后我使用一个交叉产品计算来确定该区域。



问题是结果精确度有点偏差1%)。有没有什么可以研究来改善这个?



谢谢。

解决方案

由于您的近似,1%的错误似乎有点高。您是否与实际测量或某些理想计算进行比较?请记住,GPS中有错误也可能有助于。



如果您想要一个更准确的方法来做到这一点,那么在这个问题。如果你想要更快的方式,你可以使用WGS84大地水准面而不是参考球来转换为笛卡尔坐标(ECEF)。以下是该转换的维基链接


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.

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

Thanks.

解决方案

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.

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天全站免登陆