Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- username = "<your user name>"
- password = "<your password>"
- cf_service = "https://www.arcgis.com".format(username, password)
- #Add the geoprocessing service as a toolbox. Use an alias when importing
- arcpy.ImportToolbox(cf_service, "agol")
- #Set the variables to call the tool
- facilities = r"C:/data/Inputs.gdb/Stores"
- incidents = r"C:/data/Inputs.gdb/Customers"
- output_routes = "C:/data/Results.gdb/Routes"
- output_directions = "C:/data/output/Results.gdb/Directions"
- #Call the tool
- result = arcpy.agol.FindClosestFacilities(incidents, facilities, "Minutes", "", 2)
Add Comment
Please, Sign In to add comment