Socrata SODA within polygon is too complex -


using socrata soda api within_polygon error thrown stating complex.

https://www.dallasopendata.com/resource/x9pz-kdq9.json?$where=within_polygon(location,%20%27multipolygon%20(((-96.79920%2032.77946,-96.807768%2032.7751,-96.7999%2032.76999,-96.79920%2032.77946)))%27)

{   "code" : "query.execution.querytoocomplex",   "error" : true,   "message" : "only simple comparison filters allowed",   "data" : {     "reason" : "validation.complex-filter"   } } 

here working version:

https://data.cityofchicago.org/resource/yama-9had.json?$where=within_polygon(location,%20%27multipolygon%20(((-87.63742446899414%2041.871733907393164,-87.64720916748047%2041.8687938398043,-87.6540756225586%2041.86080384272637,-87.64214515686035%2041.85287677909342,-87.63467788696289%2041.859141797891915,-87.62866973876953%2041.86329682898112,-87.63038635253906%2041.86789900978502,-87.64317512512207%2041.86380819876315,-87.64326095581055%2041.86591755588323,-87.63742446899414%2041.871733907393164)))%27)

you're using old api endpoint, rather new 1 supports within_polygon(...). you'll want use this 1 instead. query works expected against new endpoint:

https://www.dallasopendata.com/resource/5nug-crr9.json?$where=within_polygon(location,%20%27multipolygon%20(((-96.79920%2032.77946,-96.807768%2032.7751,-96.7999%2032.76999,-96.79920%2032.77946)))%27) 

for more details on migration process, check out this entry in api changelog.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -