I am creating an application that needs to query a bunch of layers over REST to see which layers a point or line is within.
At the moment I have a local ArcGIS server set up with some feature services published. I can successfully connect to the services and retrieve results - I'm actually doing this from a C# application using a URL to query to feature service, then deserialising the JSON result.
Here is an example of how I am querying one of my services now: http://LocalArcGisServer.local.com:6080/arcgis/rest/services/SW/SW_2/FeatureServer/0/query?f=json&where=PROJECT='EP'
Now the bit I am struggling with. I have points and lines defined that I want to test against some layers in various feature services. For example, I want to see if my point is within a particular polygon, or if my line crosses a polygon.
How can I formulate a query to a REST service, passing in my point or line, and asking if that point is within the layer or not?
I think I need to pass in info to describe my input point or line, and ask the feature service to do a 'Within' or 'Intercepts' query. What are the parameters I need to set, or how would I reformulate that query?