非凸多边形面积计算出地理坐标 [英] Calculate area out of geo-coordinates on non-convex polygons

查看:258
本文介绍了非凸多边形面积计算出地理坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想计算,我从一个GPS轨迹得到一个多边形的面积。所以基本上我存放一段时间后的设备/用户的位置,让我们说5秒。

I would like to calculate the area of a polygon that I get from a GPS track. So basically I store the position of the device/user after a period of time, let's say 5 seconds.

走出这条赛道的多边形我想计算的轨道是该地区。 对于凸多边形这不应该是因为我想我只是需要计算三角形的面积(当每个triangly在第一点起点之一)的一个问题。基本上,因为它是所示的左图像。 (黄多边形是由GPS的位置的,暗线显示为三角形面积计算多边形,浅黄色是所需面积)

Out of this track polygon I would like to calculate the area the track is in. For convex polygons this shouldn't be a problem since I guess I just need to calculate the area of the triangles (when each triangly has one starting point in the first point). Basically as it's shown in the left image. (Yellow Polygon is the polygon made of the GPS-Locations, dark lines show triangles for area calculation, light-yellow is the desired area)

但昨晚我发现了这个想法也就是当多边形不是凸的一个backdraw。不仅将一个部分,它是多边形(左上侧)的外侧进行计算的地区,也将多边形的一些区域来测量多于一次(看在底部重叠的三角形左侧)。

But last night I discovered a backdraw on that idea which is when the polygon is not convex. Not only will a part that is outside the polygon (upper left side) being calculated in the area, also will some area of the polygon be measured more than once (look at the overlapping triangles in the bottom left).

没有任何人对我如何能做到这一点的想法?我的意思是,它仍然很难知道哪个区域,如果我的面像S形应计算......(但我可以忍受的......只要得到足够一个公平的结果多边形(几乎)关闭。

Does anybody have an idea on how I can achieve this? I mean it's still difficult to even know which area should be calculated if my polygon is like S-shaped... (but I could live with that... as long as it gets a fair enough result on polygons that are (almost) closed.

我的其他计算所述多边形的凸包,然后做上述面积计算上是行不通的孔的想法或者如果多边形是非凸的。然后,我就不能指望某些领域超过一次,但如右图我会计算一个更大的面积比它。

My other idea of calculating the convex hull of the polygon and then doing the area calculation on that won't work well either if the polygon is non-convex. I then wouldn't count some areas more than once but as in the right image I would calculate a bigger area than it is.

将是巨大的,如果有人可以帮助我解决这个!谢谢!

Would be great if anyone could help me with this! Thanks!

推荐答案

您可能有一个看一下多边形区域通式:<一href="http://mathworld.wolfram.com/PolygonArea.html">http://mathworld.wolfram.com/PolygonArea.html.这也包括非凸多边形的情况下(只要它们不自相交)。

You might have a look at the general formula for polygon area: http://mathworld.wolfram.com/PolygonArea.html. This also covers the case of non-convex polygons (as long as they are not self-intersecting).

这篇关于非凸多边形面积计算出地理坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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