here-api - Here-API:反向地理编码中的负距离
问题描述
我正在使用来自 HERE-API 的(多请求)反向地理编码并请求地标(最后我想知道某个位置是否在水面之上)。一切都很好,但我经常得到与地标的负距离(特别是当地标是河流时):
{'Distance': -86.3,
'Location': {'Address': {'AdditionalData': [{'key': 'CountryName',
'value': 'United States'},
{'key': 'StateName',
'value': 'New York'}],
'Country': 'USA',
'Label': 'NY, United States',
'State': 'NY'},
'DisplayPosition': {'Latitude': 40.75038, 'Longitude': -73.95749},
'LocationId': 'NT_AkVytIiMG.HuEjq23NLorC',
'LocationType': 'river',
'MapReference': {'CountryId': '21000001',
'PlaceId': '35543547',
'StateId': '21010819'},
'MapView': {'BottomRight': {'Latitude': 40.68625,
'Longitude': -73.79247},
'TopLeft': {'Latitude': 40.8145,
'Longitude': -74.01498}},
'Name': 'East River'},
'MatchLevel': 'landmark',
'MatchQuality': {'Country': 1.0, 'Name': 1.0, 'State': 1.0},
'Relevance': 1.0}
有人能告诉我应该如何解释这个距离吗?
解决方案
反向地理编码器管理区域结果的距离是从提供的点到多边形边界计算的。因此,当指定点在区域内时,距离为负数。这与具有里程碑意义的结果一致。当 gen<6 时,管理区域结果的距离为从指定点到区域中心的距离。
推荐阅读
- hibernate - 警告:在 Hibernate 中找不到缓存命名消息的特定 ehcache 配置
- azure-devops - 使用 Rest API 在 Azure DevOps 中创建新用户
- wordpress - 为什么我在尝试访问 localhost/phpmyadmin 时突然收到 Access Forbidden Error 403?
- ruby - 包括来自黄瓜内部 rspec 的共享示例
- database - 在 Firestore 中查询没有映射键的文档
- android - 无论如何要为整个应用程序而不是每个活动处理 onPause() 吗?
- c# - 无法转换 C# .Net Core 类型的对象
- python - 有没有一种简单的方法可以在 python 中模拟指针?
- reactjs - 将 React 客户端和 Rails API 推送到 Heroku,我在构建脚本中遇到错误
- junit4 - 使用“空手道”并行运行器时,Junit xml 报告不报告每个测试用例