FIWARE Orion Context Broker:如何搜索坐标附近的实体?
FIWARE Orion Context Broker: How do I search for entities that are near a coordinate?
我正在使用 Orion Context Broker v1.7,并且一直在尝试使用 Postman 上的 GET 列出距特定坐标 1000 米以内的实体:
/v2/entities?georel=near&maxDistance=1000&geometry=point&coords=52.3766134;4.8971626
我得到的回复是:
{
"error": "BadRequest",
"description": "Invalid query: georel /near/ without either minDistance nor maxDistance"
}
我做错了什么?
我认为您的查询中存在语法错误。来自 NGSIv2 specification 部分 "Geographical Queries":
georel=near;maxDistance:1000&geometry=point&coords=-40.4,-3.5
所以您的查询应该是:
GET /v2/entities?georel=near;maxDistance:1000&geometry=point&coords=52.3766134;4.8971626
我正在使用 Orion Context Broker v1.7,并且一直在尝试使用 Postman 上的 GET 列出距特定坐标 1000 米以内的实体:
/v2/entities?georel=near&maxDistance=1000&geometry=point&coords=52.3766134;4.8971626
我得到的回复是:
{
"error": "BadRequest",
"description": "Invalid query: georel /near/ without either minDistance nor maxDistance"
}
我做错了什么?
我认为您的查询中存在语法错误。来自 NGSIv2 specification 部分 "Geographical Queries":
georel=near;maxDistance:1000&geometry=point&coords=-40.4,-3.5
所以您的查询应该是:
GET /v2/entities?georel=near;maxDistance:1000&geometry=point&coords=52.3766134;4.8971626