计算在一个Android应用程序覆盖多边形在谷歌地图的区域多边形、应用程序、区域、地图

2023-09-06 05:09:53 作者:我本凡尘

我有一系列的形式在我的Andr​​oid应用多边形位置 / 的GeoPoint 的对象。我不知道是否有任何方法来计算被它覆盖的区域。

I've got a series of Location / GeoPoint objects that form a polygon in my Android app. I wonder if there's any way to calculate the area covered by it.

到目前为止,我在想建立的是,当贴坐标列表中,使用JS谷歌地图API V3计算面积的Web服务。但也有可能是从Android的一些功能,很容易这样做的方式,我不知道,本身。

So far I'm thinking about setting up a web service that, when posted the list of coordinates, uses the JS Google Maps API v3 to calculate the area. But there might be a way of doing this easily with some feature from Android I don't know about, natively.

在此先感谢您的帮助!

推荐答案

一个这样做的方法是张贴在下面的回答:

A method doing this is posted in following answer:

http://stackoverflow.com/a/16210785/891479

这是基于以下公式:

http://mathworld.wolfram.com/PolygonArea.html

http://en.wikipedia.org/wiki/Polygon

使用这个公式plolygon面积计算原则:

Principle of plolygon area calculation using this formula:

HTTP://maruzar.blogspot。 COM / 2011/12 /不规则和正规的多边形区域,by.html

 
精彩推荐
图片推荐