查找两个给定点之间的中间纬度经度 [英] Finding intermediate Lattitude Longitude between two given points

查看:26
本文介绍了查找两个给定点之间的中间纬度经度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已收到此信息 -

  1. 来源的经纬度
  2. 目的地的经纬度

我需要在从源到目的地的路径上找到 Lat-Long 对.这些 Lat-Long 对必须在某个给定的粒度上彼此不同.

I need to find the Lat-Long pairs on the path from source to destination. These Lat-Long pairs must differ from each other by some given granularity.

是否有一些 Google API 可以用来获取这些信息?

Is there some Google API using which I can get this information ?

推荐答案

Google Maps APIElevation Service 正是这样做的.给定路径(由源和目标 LatLng 对定义),您还可以指定样本数,它将返回沿该路径的特定 LatLng 点的高程.忽略海拔信息.

The Google Maps API Elevation Service does exactly that. Given a path (defined by your source and destination LatLng pair), you also specify the number of samples and it will return elevation for specific LatLng points along that path. Just ignore the elevation information.

高程网络服务可与 Google Maps API v3 分开使用.但请确保您的使用仍符合服务条款.

The Elevation Web Service is available for use separate from the Google Maps API v3. However make sure that your usage still falls within the terms of service.

要沿行驶路径检索细化点,请使用 Google Maps API 路线服务获取完整的行驶路径并将该路径用作高程服务的输入.

To retrieve granular points along a driving path, use the Google Maps API Directions Service to obtain the full driving path and use that path as the input to the Elevation Service.

这篇关于查找两个给定点之间的中间纬度经度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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