I have a geocoding service running on my ArcGIS Server Advanced 10.2.2. One of my supervisors tasked me with figuring out if there was a way to use a REST call to return a feature that is located at a certain address.
For example I have a feature service set up with a few polygons, is there a rest call that if I give it an address it would return the polygon or polygons that are at that address JSON.
1 Answer 1
Make your first REST call to a geocoding service, such as ESRI's publically available one, if you do not have one of your own set up (For this example, I am using "6905 Norway Drive, Louisville KY"):
http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find?f=json&sourceCountry=USA&text=6905 norway drive,louisville ky
Then make the call to your map service with the returned XY coordinates (For this example, I am getting the "STATE" from ESRI states map service:
http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5/query?text=&geometry=-85.794106231116871%2C38.159545487235562&geometryType=esriGeometryPoint&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&objectIds=&where=&time=&returnCountOnly=false&returnIdsOnly=false&returnGeometry=true&maxAllowableOffset=&outSR=&outFields=&f=pjson
(Note the input parameters in the URL)
-
That worked great, thank you! Sorry for the late response.GravitaZ– GravitaZ2015年09月14日 22:46:15 +00:00Commented Sep 14, 2015 at 22:46
Explore related questions
See similar questions with these tags.