简体   繁体   English

如何使用REST邻近搜索来查找速度限制和道路信息?

[英]How to use a REST proximity search to find speed limits and roadway information?

I am new to using here.com and am struggling with what I believe is a basic query. 我是使用here.com的新手,我正在努力解决我认为的基本查询。 I have a series of gps coordinates from roadways in the Southern US and I would like to pair the coordinate data with associated speed limits and road information (eg, functional class). 我有一系列来自美国南部道路的GPS坐标,我想将坐标数据与相关的速度限制和道路信息(例如,功能类别)配对。

I am trying to use the proximity search function but I keep getting an error that I am not able to clearly trace. 我试图使用邻近搜索功能,但我一直收到一个我无法清楚地追踪的错误。

The base of my query is using 我的查询的基础是使用

https://pde.api.here.com/1/search/proximity.json

I then append my app_id and code, and set proximity to a GPS coordinate. 然后我附加我的app_id和代码,并设置接近GPS坐标。 For example: 例如:

proximity=29.70127,-95.40907

Then per the api instructions at: Here.com proximity search 然后根据api说明: Here.com邻近搜索

I enter a layer ID and key attributes. 我输入图层ID和关键属性。 For example to find the speed limit: 例如,要查找速度限制:

layer_ids=SPEED_LIMITS_FC1&key_attributes=FROM_REF_SPEED_LIMIT

When I submit the query I get the following error: 当我提交查询时,我收到以下错误:

{
  "faultCode": "704a79f6-20f3-4fa6-874c-5741dcaf1feb",
  "responseCode": "400",
  "message": "Provided layer does not contain geometries."
}

It seems based on the message that I may be using the incorrect layer, however, I do know that the attributes I am asking for are present with the layer. 似乎基于消息我可能正在使用不正确的图层,但是,我知道我要求的属性与图层一起出现。 Also, I have tried other FC (1-5) variants of the layer without success. 此外,我尝试过该层的其他FC(1-5)变体但没有成功。 It is not clear to me what "geometries" is referring to in the error message. 我不清楚错误消息中的“几何”是指什么。

I have also checked with other more basic queries to ensure that my app_id and app_code are correctly entered and that there are no network connectivity issues. 我还检查了其他更基本的查询,以确保我的app_id和app_code输入正确,并且没有网络连接问题。

The error messages is saying. 错误消息说。 SPEED_LIMITS_FC1 is not a thematic Layer containing geometries. SPEED_LIMITS_FC1不是包含几何的主题图层。 You can confirm the detail Layers in below link. 您可以在下面的链接中确认详细信息图层。 layer type must be "geom" for /search/proximity. 图层类型必须为/ search / proximity的“geom”。 https://pde.api.here.com/1/doc/layers.json?app_id= {{app_id}}&app_code={{app_code}}&region=WEU https://pde.api.here.com/1/doc/layers.json?app_id= {{app_id}}&app_code = {{app_code}}&region = WEU

Here is a sample. 这是一个例子。

https://pde.api.here.com/1/search/proximity.json?app_code={{app_code}}&app_id={{app_id}}&layer_ids=LINK_FC1&proximity=29.680334933229688,-95.39327178890237,100&key_attributes=LINK_ID

I hope this help. 我希望这有帮助。

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

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