2.0
OAS3
DJI TerraAPI reconstruction is to use algorithms to generate map tiles from images captured by the aircraft within a specified area. Each API calling of TerraAPI should be authorized through Developer Website application.
1. File
The file type can be an image file captured by the aircraft or a point cloud file.
2. Resource
A set of files form a resource. Files in one resource can be downloaded and deleted in batches. In general, the images generated from a single flight operation should be attributed to one resource.
3. Job
One reconstruction task is a job. A job requires an input resource as data source. Therefore, there also has a out resource after the job is finished.
1 & 2. Apply Token and upload file
Apply Token for uploading files to the cloud storage. For Chinese mainland developers, please use Ali OSS. For developers from other regions, please use AWS S3. The returned STS Token is time-sensitive. Please pay attention to the returned "expireTime" field and callback timely. Otherwise, you need to obtain the STS Token again.
/v2/store/obtain_token
3. Create resource
After the files is uploaded, call interface to create resource and return "resource_uuid".
/v2/resources
4. Link resource and file
After the resource is created, call "uploadCallback" interface to link the uploaded files to resource. Specify resource through the returned "resource_uuid" from step 3.
/v2/store/upload_callback
5. Create reconstruction job
Call "createJob" interface to create a job, and a "job_uuid" will be returned.
/v2/jobs
6 & 7. Start job and cyclically check the status
Call "startJob" interface to start job of specified "job_uuid". "resource_uuid" should be input as source data for this job. After the job is start, job status can be queried according to the "job_uuid". After the job is finished, the result is stored in an output resource. The files in this resource is the reconstruction result.
/v2/jobs/:uuid/start
, /v2/jobs/:uuid
8. Obtain job output result and download the model to your local environment