koopjs / FeatureServer

An open source Geoservices Implementation (deprecated)
https://geoservices.github.io
Other
101 stars 32 forks source link

geometryType of esriGeometryPoint not supported #76

Closed jkerr5 closed 1 year ago

jkerr5 commented 6 years ago

According to the Esri documentation https://resources.arcgis.com/en/help/rest/apiref/fsservicequery.html, queries like

query?geometryType=esriGeometryPoint&geometry=-122.2465038,37.5073428

should be supported but they result in the following stacktarce :

Error: bbox must be an Array of 4 or 6 numbers
at Object.validateBBox (/Projects/github/ESRI/koop44/koop-provider-marklogic/build/koop/node_modules//main.js:694:55)
at bboxPolygon (/Projects/github/ESRI/koop44/koop-provider-marklogic/build/koop/node_modules//main.js:20:13)
at module.exports (/Projects/github/ESRI/koop44/koop-provider-marklogic/build/koop/node_modules/winnow/dist/geometry/transform-array.js:3:10)
at normalizeGeometry (/Projects/github/ESRI/koop44/koop-provider-marklogic/build/koop/node_modules/winnow/dist/options/normalizeOptions.js:66:16)
at Object.prepare (/Projects/github/ESRI/koop44/koop-provider-marklogic/build/koop/node_modules/winnow/dist/options/index.js:23:15)
at Model.getData (/Projects/github/ESRI/koop44/koop-provider-marklogic/build/koop/marklogic.js:25:28)
at /Projects/github/ESRI/koop44/koop-provider-marklogic/build/koop/node_modules/koop/dist/models/index.js:13:14
at Cache.retrieve (/Projects/github/ESRI/koop44/koop-provider-marklogic/build/koop/node_modules/koop-cache-memory/dist/index.js:75:38)
at Model.pull (/Projects/github/ESRI/koop44/koop-provider-marklogic/build/koop/node_modules/koop/dist/models/index.js:9:14)
at Controller.Geoservices.featureServer (/Projects/github/ESRI/koop44/koop-provider-marklogic/build/koop/node_modules/koop-output-geoservices/index.js:7:14)
at Layer.handle [as handle_request] (/Projects/github/ESRI/koop44/koop-provider-marklogic/build/koop/node_modules/express/lib/router/layer.js:95:5)
at next (/Projects/github/ESRI/koop44/koop-provider-marklogic/build/koop/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/Projects/github/ESRI/koop44/koop-provider-marklogic/build/koop/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/Projects/github/ESRI/koop44/koop-provider-marklogic/build/koop/node_modules/express/lib/router/layer.js:95:5)
at /Projects/github/ESRI/koop44/koop-provider-marklogic/build/koop/node_modules/express/lib/router/index.js:281:22
at param (/Projects/github/ESRI/koop44/koop-provider-marklogic/build/koop/node_modules/express/lib/router/index.js:354:14)

Note that spatialRel is not specified so it should default to esriSpatialRelIntersects

rgwozdz commented 6 years ago

Hey @jkerr5, I'm taking a look at this. I don't get the bbox error above, but that might be because of the updates to winnow and featureserver that have been made since this issue was posted. Could you confirm you still get the bbox error? That said, while it doesn't error, I'm not sure I'm getting the expected results. I get an empty array even when the geometry I pass in is equivalent to one of the points in the data set. I've reproduced this query behavior with a dataset on AGOL, so not sure if there is anything necessarily wrong. The link you posted above seems to redirect, so I haven't been able to learn more about what this type of query attempts to do.

jkerr5 commented 6 years ago

Yeah, the Esri docs moved. The new location is here https://developers.arcgis.com/rest/services-reference/query-feature-service-.htm There is an example like the one I posted in this issue under the geometry parameter.

I'll have to test this out again with the latest versions of everything to see if the behavior has changed.

BillFarber commented 1 year ago

I've verified that this is no longer a problem on the develop branch of the koop-provider-marklogic project, so I believe this issue may be closed.