【问题标题】:Reverse Geocode an intersection对交叉点进行反向地理编码
【发布时间】:2020-02-14 03:05:33
【问题描述】:

我正在使用地理编码 API 来检索点地址和交叉点的位置。当尝试对交叉点的确切位置进行反向地理编码时,反向地理编码 API 端点仅返回匹配级别“街道”但不返回“交叉点”。是否可以配置 REVERSE 地理编码器以返回交叉点?

https://geocoder.api.here.com/6.2/geocode.json?app_id={YOUR_APP_ID}&app_code={YOUR_APP_CODE}&city=Chicago&street=State%20%40%20Madison&gen=9

上面的 API 调用返回以下结果: 匹配级别:“交叉点” Label="S State St & W Madison St, Chicago, IL 60602, 美国" 纬度/经度:41.88206,-87.6278

https://reverse.geocoder.api.here.com/6.2/reversegeocode.json?app_id={YOUR_APP_ID}&app_code={YOUR_APP_ID}&prox=41.88206,-87.6278&mode=retrieveAddresses&gen=9

上面带有交叉点“S State St & W Madison St”的纬度/经度的反向地理编码调用返回以下结果: 比赛级别:“街道” 标签="E麦迪逊街,芝加哥,IL 60602,美国" 纬度/经度:41.88206,-87.6278

反向地理编码器 API 返回的结果均不包含有关交叉点的信息。我是否有机会在反向地理编码器 API 中使用 label="S State St & W Madison St, Chicago, IL 60602, United States" 检索位置?

我已经尝试过使用“gen”和“mode”请求参数,但不幸的是没有成功。

【问题讨论】:

    标签: here-api


    【解决方案1】:

    您能否尝试以下请求,该请求将在响应中返回交叉点作为匹配级别。

    https://geocoder.api.here.com/6.2/geocode.json?app_id={YOUR_APP_ID}&app_code={YOUR_APP_CODE}&city=Chicago&street=State%20%40%20Madison
    

    https://developer.here.com/documentation/geocoder/topics/example-geocoding-intersection.html

    还检查文本的组合以找到交集。 https://developer.here.com/documentation/geocoder/topics/resource-geocode.html

    【讨论】:

    • 我正在尝试从 REVERSE GEOCODER API 获取相交结果。请参阅上面我更新的问题。
    【解决方案2】:

    有一个专用参数可以返回反向地理编码中的交叉点:

    &additionaldata=IntersectionSnapTolerance,1
    

    IntersectionSnapTolerance:N(在 [0, 1] 中浮动)。对坐标进行反向地理编码时,该值控制地址匹配与下一个交叉点对齐的严格程度。值 0 表示链接上没有任何点捕捉到交叉点;值 1 表示最有可能将街道交叉口作为匹配项返回。默认值为 0。

    关于附加数据的更多信息:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-01-26
      • 2018-05-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多