Skip to content

SSabu/DroneDeploy-Flight-Path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DroneDeploy - Flight Path App

The challenge is to create an app that can be deployed on the Drone Deploy App Market that allows a user to submit a .shp, .kml, or .zip file of an area of interest and generate a drone flight plan for that area.

Solution Outline

Creating the app required taking the following steps:

  1. Finding external libraries that would successfully convert the different file formats into usable geoJSON
  2. Converting the files and verifying the geoJSON data within them was acceptable and did in fact reflect a geographic feature
  3. Standardizing the data returned from the different conversion libraries to pass on to the DroneDeploy API
  4. Calling the DroneDeploy API to create the Flight Plan, pan to the vicinity of the plan, and track success of the app

Conversion Libraries

The following conversion libraries were used:

  1. Tom MacWright has produced a library to convert KML files to geoJSON. jQuery's ajax method was used in the case of the KML to geoJSON converter since the the function required an xml object to process to return the geoJSON data.

  2. Mike Bostock has produced a library called Shapefile to convert SHP files to geoJSON.

  3. Calvin Metcalf has produced a library called shapefile-js to convert ZIP files to geoJSON.

Each library produced geoJSON data in slightly different formats.

For example, in the KML to geoJSON converter, the geojson object looked like this:

{type: "FeatureCollection", features: [ {type:"Feature", geometry: {..}, properties: {..} } ] };

The SHP to geoJSON converter yielded a data object that looked like this:

[{coordinates:[[...]], type: "Polygon"}];

The ZIP to geoJSON converter yielded this data object:

{type:"Feature", features: [ {type:"Feature", geometry: {..}, properties: {..} } ], fileName:"Limits of flight"}

Due to the varying nature of the geoJSON object returned from each file converter, steps were taken to create a standard geoData object that captured relevant data from the GeoJSON object for processing later.

Other libraries used

GeoJSON.js was used to convert data retrieved from the GeoJSON objects back into standard geojson formats that could begin to be used by functions regardless of the filetype submitted.

Turf.js was used to process and analyze the geoJSON objects. Methods used from the Turf.js library included turf.centroid, turf.booleanContains, and turf.bbox. In previous iterations of the app, more Turf.js methods were used, but it eventually became evident that they were extraneous.

Drone Deploy API

The DroneDeploy API provides methods to turn a shape geometry into a flight path and to zoom into the flight plan view.

The Flight Plan app can be found here.


User submits a .kml, .shp, or a .zip file of a geographic area of interest:

screen shot 2017-10-29 at 12 43 28 pm


Once flight plan is created, map view pans to vicinity of plan: screen shot 2017-10-29 at 12 43 56 pm


User can click on Flight Plan icon to view detailed drone flight path: screen shot 2017-10-29 at 12 45 13 pm

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published