ArcGIS REST Services Directory Query Function

9154
12
09-11-2014 02:19 PM
GeorgeStrebel
New Contributor III

I have been using the ArcGIS REST Services Directory query function to build a query string step by step so I can then relay the process to our web developer who has limited knowledge of GIS.  I have gotten stuck when I am trying to query a layer using Input Geometry and the Geometry type as a Polygon.

All the features that are being queried are in the same service; polygon for parcel, polygon for fema flood hazards.

The current process is as follows, take a valid address and use the Find Address Candidates operation in a GeocodeService to get the xy, take the address xy and use the Query operation on the parcel polygon to return the xy of the vertex of the associated parcel polygon.  Since HTML doesn't give me a full list of all the vertex that make up the polygon I have to return the JSON which does (see attached jasonXYReturnFromPolyon.txt).  This is where I am getting hung up, I an now trying to take the xy of the returned JSON and use it in the Query operation on the fema flood hazard polygon to return all flood zones that intersect the parcel polygon.  I can get it to work if I use the default Geometry Type: Envelope with Spatial Relationship: Intersect but it does not return accurate data.  When I try and change the Geometry Type to Polygon I get an Invalid or missing input parameters.  My guess is that either my Input Geometry is formatted wrong or the xy that is returned to represent the parcel polygon vertex is not seen as a polygon.  Any help, insight or suggestions on a better way would be appreciated.

0 Kudos
12 Replies
GeorgeStrebel
New Contributor III

Thanks Paul, our developer is using C# but I am going to share the JavaScript sample with him to see if he can figure something out.

0 Kudos
PaulCrickard1
Occasional Contributor II

If he is using C# it should require

  • ESRI.ArcGIS.Geodatabase
  • ESRI.ArcGIS.Geometry

This is for 9.3 but should be able to find for 10.x too.

How to execute spatial queries

Good luck.

0 Kudos
GeorgeStrebel
New Contributor III

Thanks Paul, this should be very helpful!

0 Kudos