Guest User

Untitled

a guest
Feb 5th, 2018
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. username = "<your user name>"
  2. password = "<your password>"
  3. cf_service = "https://www.arcgis.com".format(username, password)
  4.  
  5.  
  6. #Add the geoprocessing service as a toolbox. Use an alias when importing
  7. arcpy.ImportToolbox(cf_service, "agol")
  8.  
  9. #Set the variables to call the tool
  10. facilities = r"C:/data/Inputs.gdb/Stores"
  11. incidents = r"C:/data/Inputs.gdb/Customers"
  12. output_routes = "C:/data/Results.gdb/Routes"
  13. output_directions = "C:/data/output/Results.gdb/Directions"
  14.  
  15. #Call the tool
  16. result = arcpy.agol.FindClosestFacilities(incidents, facilities, "Minutes", "", 2)
Add Comment
Please, Sign In to add comment