koopjs / koop-socrata

Socrata provider for Koop.
Other
8 stars 7 forks source link

Koop Not Handling Bad Values #11

Closed pholleran closed 9 years ago

pholleran commented 9 years ago

FeatueServices in Koop are not responding when bad/out of range values are present in the Socrata table.

Example: http://detroitkoop-268609380.us-east-1.elb.amazonaws.com/socrata/detroitmi/uhnf-v2zs

{"coordinates":[999998.9998,999999],"type":"Point",

The resulting featureService refuses to draw in a map: http://www.arcgis.com/home/webmap/viewer.html?url=http://detroitkoop-268609380.us-east-1.elb.amazonaws.com/socrata/detroitmi/uhnf-v2zs/featureserver/0

chelm commented 9 years ago

@pholleran Is this a koop issue or an AGOL issue? Seems like if its a koop issue and we could reasonably catch such values and invalidate the geometries (set to null) at insert time.

chelm commented 9 years ago

basically just check for lat/long values outside of +/- 180 and +/- 90

pholleran commented 9 years ago

Chris, good question on where the real issue lies. I will try testing with some other clients first.

My gut is that is probably an issue at both the Koop and client levels - ArcGIS Desktop/Server/etc. should not allow for the creation of this invalid geometry through the various checks and restraints in their editing environments, which would mean the bad geometry would have to be generated programmatically. That said, AGOL and the JSAPI do not appear to be handling invalid values properly (which they should as other, non-core products can and do serve data using GeoServices REST that is not created in an Esri-centric workflow).

chelm commented 9 years ago

this is fixed in master