使用 hurl.it,我正在尝试对西雅图市开放数据进行 API 调用。
这是 GET 目标:
https://data.seattle.gov/resource/82su-5fxf.json?$where=within_polygon(location, 'MULTIPOLYGON(((-122.345239999941 47.7339842230969,-122.344670705637 47.7051200031236, -122.35540073991 47.7051536806063,-122.355548433321 47.7340195160745, -122.345239999941 47.7339842230969)))')
我收到的错误:
Error: function within_polygon is not defined in SoQL.
然而,inside_box 和 inside_circle 都在这个端点上工作——只是不在 within_polygon 上。数据来源于西雅图市的开放数据文档——这个特定的数据集称为 My Neighborhood:
https://data.seattle.gov/Community/My-Neighborhood-Map/82su-5fxf
这是“within_polygon”的一个工作示例,但使用了不同的端点:
https://data.seattle.gov/resource/pu5n-trf4.json?
$where=within_polygon(incident_location,
'MULTIPOLYGON(((-122.345239999941 47.7339842230969,-122.344670705637 47.7051200031236, -122.35540073991 47.7051536806063,-122.355548433321 47.7340195160745, -122.345239999941 47.7339842230969)))')
在此先感谢您的帮助。