简体   繁体   English

谷歌的距离矩阵api是否也考虑“高程”?

[英]Does google's Distance matrix api consider “Elevation” too?

Does google's distance matrix api considers "elevation" while showing distance between two latitude-longitude points? google的距离矩阵api是否在显示两个纬度 - 经度点之间的距离时会考虑“高程”?

Suppose first person is at upper level at an airport, second person is standing at lower level on same airport in same line, will the distance shown by google's distance matrix api be considering this vertical distance between both persons? 假设第一个人在机场的上层,第二个人站在同一线路的同一个机场的较低层,谷歌的距离矩阵api所示的距离是否会考虑两个人之间的这个垂直距离?

No, but it sounds like you're considering using this API for something it was not built for. 不,但听起来你正在考虑将这个API用于它没有构建的东西。

The Google Distance Matrix API will return route distances, be it driving, walking, bicycling or public transportation. Google Distance Matrix API将返回路线距离,无论是驾驶,步行,骑自行车还是公共交通。 The distance (and duration) in each element in a response Distance Matrix API would be that of the route found by the Google Directions API . 响应距离矩阵API中每个元素的距离(和持续时间)将是Google Directions API找到的路径的距离(和持续时间)。

It does not calculate straight-line (or geodesic) distances. 它不计算直线(或测地)距离。 You can use the Haversine formula . 您可以使用Haversine公式

While the Directions API does find indoor routes for walking directions, this is only available for directions to/from Google MAps places , those that have a Place ID . 虽然Directions API确实可以找到步行路线的室内路线,但这仅适用于往返于Google MAps 地点的路线,这些地点具有地方ID An arbitraty position in an arbitrary building level cannot be expressed in a Place ID. 任意建筑物级别的任意位置不能用地点ID表示。

Distances from Google Maps (and APIs) do take elevation into account, eg this route is 2.1 Km even though it looks like barely 1.5 Km. 谷歌地图(和API)的距离确实考虑了高程,例如这条路线是2.1公里,即使它看起来只有1.5公里。 on the map. 在地图上。

Besides all that, the elevation differences within a building would be tiny compared to the driving distance between them. 除此之外,建筑物内的高度差异与它们之间的行驶距离相比会很小。 If you are looking for distances between people inside buildings, you're better off with straight-line distances corrected with average floor elevation (3-5 m.) factored in. 如果您正在寻找建筑物内部人员之间的距离,那么您最好使用平均楼层高度(3-5米)校正的直线距离。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM