DroneDeploy

Map Engine: map processing as a service

This page describe how to use the DroneDeploy map engine as a service

Our Enterprise customers and developer partners can use DroneDeploy's API to programmatically process high quality 3D maps from your source image sets. We'll take you through setting up your plan, adding images, running exports, and accessing the generated tiles.

First you will need an API Key

More information is also available on our Data API.

The Plan Object

The Plan object is the central element to much of the DroneDeploy process. It is the container for all of the critical information about your map, and is required for many of the other operations you'll be performing with the API. Fortunately, setting up a plan with default values is easy.

/v2/plans

curl -H "Content-Type: application/json" -X POST -d '{"name":"My Plan"}' "https://public-api.dronedeploy.com/v2/plans?api_key=f78b0a0d66274fd5a8684c49deb9d83d"
{"id": "58b0490c95b03d000114a881"}

It is best to name your plan something unique, although it is not required. Each plan is assigned a unique identifier within the DroneDeploy system. That value is returned as the result of the POST operation.

Once a plan has been created, it is time to add some source imagery to the plan.

The Image Transfer Object

The Image Transfer object is the way API clients can indicate which source imagery should be used for a given plan. Once an image transfer object is created, the indicated URL is fetched and the photogrammetry process begins.

While an API client can specify a list of individual images for processing, it is a best practice to create a ZIP archive of all necessary imagery beforehand and specify the compressed file as the URL. This can help ensure completeness of the operation and should reduce overall time taken to fetch the source imagery.

/v1/image_transfer

curl -H "Content-Type: application/json" -X POST -d '{"plan_id":"58b0490c95b03d000114a881", "inputs": ["https://www.dropbox.com/s/nc2okgk83k439pj/dropbox_example.zip?dl=0"]}' "https://public-api.dronedeploy.com/v1/image_transfer?api_key=f78b0a0d66274fd5a8684c49deb9d83d"
{
  "status": "New", 
  "inputs": ["https://www.dropbox.com/s/nc2okgk83k439pj/dropbox_example.zip?dl=0"], 
  "plan_id": "58b0490c95b03d000114a881", 
  "failure_info": {}, 
  "id": "58b056b795b03d000114a882", 
  "run_info": {}, 
  "date_complete": null, 
  "date_started": null, 
  "type": "unprocessed", 
  "date_creation": 1487951543526
}

Monitoring progress

Once the Image Transfer object is received, the DroneDeploy Map Engine will fetch the indicated files based on the account type priority settings. Once the files have been fetched, decompressed (if necessary) and validated, map processing will begin.

You can monitor this process by observing the response from the Image_Transfer, then the Plan object. The status will show "Complete" when the download and photogrammetry processes have concluded respectively.

/v1/image_transfer/{id}

To check the status of your image transfer, request the image_transfer API with the ID you were returned when you posted to the endpoint.

curl "https://public-api.dronedeploy.com/v1/image_transfer/58be0da47915d90001962385?api_key=f78b0a0d66274fd5a8684c49deb9d83d"
{"status": "new", "inputs": ["https://dl.dropboxusercontent.com/1/view/asdaafasdasd/ImageTransfer/roofofDD23.zip"], "plan_id": "58be0d647915d9000196237b", "date_creation": 1488850340459, "date_complete": null, "date_started": null, "type": "unprocessed", "id": "58be0da47915d90001962385"}

/v2/plans/{id}

To check the status of your map processing, request the Plan API with the PlanID.

curl "https://public-api.dronedeploy.com/v2/plans/58b0490c95b03d000114a881?api_key=f78b0a0d66274fd5a8684c49deb9d83d"
{
    "date_creation": 1487948044752,
    "geometry": [],
    "id": "58b0490c95b03d000114a881",
    "image_count": 1,
    "latest_image_transfer_id": "58b056b795b03d000114a882",
    "latest_started_map": {
        "user_status": "Processing"
    },
    "location": {},
    "log": "1487948044_APIGENERATED",
    "name": "My Plan"
}

Map Tiles

After the map processing has completed, you will be able to access the imagery from the DroneDeploy map tiles server. These tiles are available for use in 3rd party applications.

To get a list of tiles for a given plan at a given resolution, use a GET request to the tiles endpoint.

/v1/tiles/{plan_id}/{layer}/{zoom}

curl "https://public-api.dronedeploy.com/v1/tiles/580fd790d5d264a5d8515a73/ortho/20?api_key=f78b0a0d66274fd5a8684c49deb9d83d"
{
    "tiles": [], 
    "expires": 1498423259002, 
    "template": "https://public-tiles.dronedeploy.com/1495294416_PETEROPENPIPELINE_ortho_hhq/{z}/{x}/{y}.png", 
    "signature": "?Policy=xxx_&Signature=yyy&Key-Pair-Id=zzz"
}

Example code

We aim to add an example python script here soon.

Map Engine: map processing as a service

This page describe how to use the DroneDeploy map engine as a service