计算在Google地图上绘制的多边形的面积 [英] Calculating area of a polygon drawn on google map

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

问题描述

我正在寻找一个准确的算法或服务来计算地球上基于GPS坐标点计算点的表面积。

I am looking for an accurate algorithm or a service to calculate surface area on earth where points are calculated on the basis of GPS Coordinates.

我正在使用Google地图Api版本3,并且正在绘制基于记录的坐标的多边形,但我不认为多边形的计算面积的标准方法将考虑到斜率(山)。我是否需要处理这样的事情的轮廓?

I am using Google Map Api version 3 and are drawing polygons based on recorded coordinates but I don't think the standard ways of calculating area of the polygon will take into account of slopes(hills). Do I need to work on contours for such thing?

是否有任何第三方服务可能是ArcGis或其他考虑到斜坡的其他服务。 >

Are there any third party services may be ArcGis or some other that takes into account of slopes as well.

推荐答案

是的,这绝对是可能的。有一个快速教程,其中包含示例代码:

Yes, this is definitely possible. There is a quick tutorial with example code here:

https://web.archive.org/web/20130301120148/http://geojason.info/demos/line-length-polygon-area -google-maps-v3

相关部分是这样的:

google.maps.geometry.spherical.computeArea(yourPolygon.getPath());

官方文档:

http://code.google.com/apis/maps/documentation/javascript/reference.html#spherical

这篇关于计算在Google地图上绘制的多边形的面积的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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