我正在尝试使用此数据集来确定地址(传递给API调用)所在的区域边界。
端点返回每个区或理事会的对象数组。多边形位于“the_geom”属性中,具有2个属性 - 类型和坐标。我尝试过使用$ where,但是我收到了错误。
[
{
"comments": "Inaugurated 2015-06-22",
"council": "1",
"councilper": "Scott Griggs",
"district": "1",
"objectid": "1",
"shape_area": "343352603.892",
"shape_leng": "88541.3042539",
"the_geom": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
-96.80995700065864,
32.77138899977414
],
[
-96.80969800043205,
32.77121999997131
],
[ ...
我尝试使用下面的查询,但它给了我一个错误:
https://www.dallasopendata.com/resource/h9ws-fqcn.json?$where=within_polygon(the_geom, 'MULTIPOLYGON (((-96.800270, 32.779091)))')
这是页面参考页面 - https://www.dallasopendata.com/Geography-Boundaries/Adopted-Council-Districts/6dcw-hhpj
这是端点 - https://www.dallasopendata.com/resource/dgxr-hmze.json
任何帮助将不胜感激。
答案 0 :(得分:0)
我怀疑你是开发者进入我们的IRC频道,但我也会在这里回答!
你离这儿很近!你想要做的是使用intersects(...)
SoQL函数和一个众所周知的文本(WKT)POINT
。
以下是适用于您的用例的示例:
https://www.dallasopendata.com/resource/h9ws-fqcn.json?$where=intersects(the_geom,%20%27POINT%20(-96.7994007%2032.775765)%27)