Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArcGIS Drone Route Report Automation

This project contains an ArcGIS Pro Python toolbox (.pyt) for drone route automation reporting.

The tool reads route information from an Excel file, geocodes origin and destination addresses, creates drone flight paths and road driving routes, compares travel distance and time, checks whether drone delivery is possible, and generates a route report table inside ArcGIS Pro.

Project Purpose

The purpose of this project is to create a custom ArcGIS Pro Python toolbox for automating drone route comparison and reporting.

Main Tasks Performed

  • Creates an ArcGIS Pro Python toolbox using a .pyt file
  • Reads route records from an Excel spreadsheet
  • Populates the Excel sheet name parameter automatically
  • Geocodes origin and destination addresses using Google Maps API
  • Creates straight-line drone flight paths
  • Creates road driving routes using Google Directions API
  • Calculates drone route distance and estimated flight time
  • Calculates driving distance and driving time
  • Checks drone feasibility based on maximum distance and payload
  • Calculates time saved by drone route compared with driving route
  • Estimates greenhouse gas savings based on avoided driving distance
  • Creates a route report table
  • Adds route layers to the current ArcGIS Pro map
  • Applies different symbology for drone and driving routes

Required Inputs

The tool requires the following inputs in ArcGIS Pro:

Input Description
Input Workspace Workspace where output feature classes and report table will be created
Input Excel File Excel file containing route records
Input Excel Sheet Name Sheet name selected from the Excel file
Maximum Distance Drone Can Cover Maximum drone flight distance in miles
Maximum Payload Maximum payload the drone can carry
Google API Key API key used for geocoding and driving route requests

Expected Excel Fields

The Excel sheet should contain the following fields:

Field Name Description
Branch__Route_Name_ Route name or branch route identifier
Origin Origin address
Destination Destination address
Departure_Date Original departure date
Departure_Time Departure time
Payload Payload value for the route

How the Tool Works

The tool first converts the selected Excel sheet into an ArcGIS table. It then reads each route record and extracts the route name, origin, destination, departure date, departure time, and payload.

For each route, the tool creates:

  1. A straight-line drone flight path between the origin and destination
  2. A road-based driving route using Google Directions API
  3. A report record comparing drone and driving results

The drone route is checked against the user-defined maximum drone distance and maximum payload. If either limit is exceeded, the route is marked as not possible.

Output

The tool creates the following outputs:

  • Drone flight path polyline feature classes
  • Driving route polyline feature classes
  • A report table named Report
  • Route layers added to the current ArcGIS Pro map

The report table includes:

Output Field Description
Route Route name
Origin Origin address
Destination Destination address
Dep_Date Departure date
Dep_Time Departure time
Flight_Dist Drone flight distance
Drive_Dist Driving distance
Flight_Time Estimated drone flight time
Drive_Time Estimated driving time
Flight_Speed Drone speed used for calculation
Time_Saved Difference between driving time and drone flight time
GHG_Saved Estimated greenhouse gas savings
Payload Payload for the route
Possible Whether drone flight is possible, shown as T or F

Symbology

The tool applies simple symbology in ArcGIS Pro:

Route Type Meaning
Green flight path Drone route is possible
Red flight path Drone route is not possible
Blue drive path Road driving route

Folder Structure

arcgis-drone-route-report-automation/
│
├── README.md
├── .gitignore
│
├── toolbox/
│   └── Routes_Report_Automation.pyt
│
├── sample_data/
│   └── Labcorp Simulated routes (1).xlsx
│
├── scripts/
│   └── Routes Report Automation v1.py
│
└── docs/
    └── pyt_creation_notes.md
    └── Documentation.pdf

Tools and Technologies Used

  • ArcGIS Pro
  • ArcPy
  • Python toolbox (.pyt)
  • Google Maps API
  • Google Directions API
  • pandas
  • polyline
  • python-dateutil
  • Excel route data
  • GIS route visualization
  • Feature class creation
  • Attribute table reporting

Required Python Libraries

This tool uses the following Python libraries:

arcpy
googlemaps
polyline
pandas
python-dateutil

arcpy is included with ArcGIS Pro. The other libraries may need to be installed in the ArcGIS Pro Python environment.

How to Use in ArcGIS Pro

  1. Open ArcGIS Pro.
  2. Open or create a project with a map.
  3. In the Catalog pane, browse to the toolbox folder.
  4. Add Routes_Report_Automation.pyt.
  5. Open the List Route Automate tool.
  6. Select an output workspace.
  7. Select the input Excel file.
  8. Select the Excel sheet name.
  9. Enter the maximum drone distance.
  10. Enter the maximum payload.
  11. Enter a valid Google API key.
  12. Run the tool.
  13. Review the generated flight paths, drive paths, and report table.

Important Notes

A Google API key is required to run the geocoding and driving route parts of this tool. Do not upload API keys to GitHub.

The sample Excel file is included only for showing the expected route input format.

About

ArcGIS Pro Python toolbox for drone route automation, comparing drone flight paths with road driving routes using Excel input and Google Maps API.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages