I'd like to write a script that will call out to 3 separate Geocode Services online and run a user defined CSV through them...

The CSV will contain records in three states and each state has a GeocodeServer:

VA: https://gismaps.vita.virginia.gov/arcgis/rest/services/Geocoding/VGIN_Composite_Locator/GeocodeServer

DE: https://firstmap.delaware.gov/arcgis/rest/services/Location/DE_CompositeLocator/GeocodeServer

MD: http://geodata.md.gov/imap/rest/services/GeocodeServices/MD_CompositeLocator/GeocodeServer

When I run a test I get an error saying the Geocode Service does not exist...

inputCSV = "//nas/geog/esrgc/projects_inprocess/esrgc/carbon_footprint/2017/fall/processing/fall2016students.csv"
addrLocator = "http://geodata.md.gov/imap/rest/services/GeocodeServices/MD_CompositeLocator/GeocodeServer"
addrFields =  "Address1; City; State; Zip Code"
outClass = "//nas/geog/esrgc/projects_inprocess/esrgc/carbon_footprint/2017/fall/processing/fall2016students.shp"
arcpy.GeocodeAddresses_geocoding(inputCSV, addrLocator, addrFields, outClass, 'STATIC')

Is it even possible to use a Geocode Service on ArcServer as an input? arcpy.GeocodeAddresses_geocoding

I could just geocode these in ArcMap and continue the script from there for the rest of the analysis, but if I could get this to work it would be pretty cool.


Try using the Geocode Addresses URL for that service: http://geodata.md.gov/imap/rest/services/GeocodeServices/MD_CompositeLocator/GeocodeServer/geocodeAddresses

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.