我有一系列的形式在我的Android应用多边形位置
/ 的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