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

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

问题描述

我正在寻找一种准确的算法或服务来计算基于 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 Map 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#sphereal

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

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