From 19be188c760ad2b225a93967eb6298d04a855b16 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Wed, 1 Mar 2017 17:06:55 -0500 Subject: [PATCH] Docs additions, changed site title --- app/api/processingnodes.py | 6 +- app/templates/app/base.html | 2 +- slate/source/images/logo.png | Bin 2278 -> 4286 bytes slate/source/includes/_introduction.md | 2 + slate/source/includes/_quickstart.md | 9 +- .../source/includes/reference/_permissions.md | 36 ++++++ .../includes/reference/_processingnode.md | 119 ++++++++++++++++++ slate/source/includes/reference/_task.md | 75 ++++++++--- slate/source/includes/reference/temp.md | 1 - slate/source/index.html.md | 3 + 10 files changed, 224 insertions(+), 29 deletions(-) create mode 100644 slate/source/includes/reference/_permissions.md create mode 100644 slate/source/includes/reference/_processingnode.md delete mode 100644 slate/source/includes/reference/temp.md diff --git a/app/api/processingnodes.py b/app/api/processingnodes.py index a8b1d469..ed4fe6d7 100644 --- a/app/api/processingnodes.py +++ b/app/api/processingnodes.py @@ -44,10 +44,7 @@ class ProcessingNodeViewSet(viewsets.ModelViewSet): class ProcessingNodeOptionsView(APIView): """ - Display the intersection of all ProcessingNode's available_options fields. - Each ProcessingNode has its own set of available_options. When a user relies on the - automatic node selection feature, it's better to have a list of available_options that - is common among all ProcessingNode. + Display the common options available among all online processing nodes. This is calculated by intersecting the available_options field of all online processing nodes visible to the current user. """ queryset = ProcessingNode.objects.all() @@ -55,7 +52,6 @@ class ProcessingNodeOptionsView(APIView): def get(self, request): nodes = get_objects_for_user(request.user, 'view_processingnode', ProcessingNode, accept_global_perms=False) - common_options = [] for node in nodes: diff --git a/app/templates/app/base.html b/app/templates/app/base.html index a3a8b698..ccbf1d1e 100644 --- a/app/templates/app/base.html +++ b/app/templates/app/base.html @@ -63,7 +63,7 @@ {% block navbar-top-links %}{% endblock %} WebODM - + {% block navbar-sidebar %}{% endblock %} diff --git a/slate/source/images/logo.png b/slate/source/images/logo.png index 559c4d0dd4a8ee7eddd97ea445cda583e263a43f..826f0bbf9586f985ef914b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n`Bo-mv&XsiI*Y(UPTY}v42U9 zkhZhFSZ#gCg`9OhMPEC|lEppte^;+Z;-v_H7m!hJ*OKcfS8o?QWd&H_DeR)Y3t79X zdKo-l9Kbu)q0X_fSBZ%RI4Y@&pC@$Wb#PR|nhUSLmt)moU49=WAHXV4qQXfID5iAd zcFr~&^Sqhte%5UBFx*+OswllVz)33bOn$b=S4J&v(};bHw|~JlU8Rc?e{nL!!cD~} zXg+<<#&GxF4S#Pb+D!1awrpESqXtmxN ijis(^wvBCL+xQQigYV_E&dgT;0000RbIgW diff --git a/slate/source/includes/_introduction.md b/slate/source/includes/_introduction.md index eaf5d8f0..35b8b86a 100644 --- a/slate/source/includes/_introduction.md +++ b/slate/source/includes/_introduction.md @@ -3,3 +3,5 @@ [WebODM](https://github.com/OpenDroneMap/WebODM) is a free, user-friendly, extendable application and API for drone image processing. It generates georeferenced maps, point clouds and textured 3D models from aerial images. Developers can leverage this API to extend the functionality of [WebODM](https://github.com/OpenDroneMap/WebODM) or integrate it with existing software like [QGIS](http://www.qgis.org/) or [AutoCAD](http://www.autodesk.com/products/autocad/overview). + +![Point Cloud](https://raw.githubusercontent.com/OpenDroneMap/WebODM/master/screenshots/pointcloud.png) \ No newline at end of file diff --git a/slate/source/includes/_quickstart.md b/slate/source/includes/_quickstart.md index c40ea830..36f62607 100644 --- a/slate/source/includes/_quickstart.md +++ b/slate/source/includes/_quickstart.md @@ -2,7 +2,7 @@ ## How To Process Images -In this tutorial we'll explore how to process an orthophoto from a set of aerial images. To do that we'll need to: +In this tutorial we'll explore how to process an orthophoto from a set of aerial images using Python. To do that we'll need to: - Authenticate - Create a [Project](#project). Projects are a way to group together related [Task](#task) items @@ -49,8 +49,7 @@ images = [ # ... ] options = json.dumps([ - {'name': "use-opensfm-pointcloud", 'value': True}, - {'name': "orthophoto-resolution", 'value': 24}, + {'name': "orthophoto-resolution", 'value': 24} ]) res = requests.post('http://localhost:8000/api/projects/{}/tasks/'.format(project_id), @@ -64,7 +63,7 @@ task_id = res['id'] ``` We can then create a [Task](#task). The only required parameter is a list of multiple, multipart-encoded `images`. Processing will start automatically -as soon as a [Processing Node](#processingnode) is available. It is possible to specify additional options by passing an `options` value, which is a JSON-encoded list of name/value pairs. Several other options are available. See the [Task](#task) reference for more information. +as soon as a [Processing Node](#processing-node) is available. It is possible to specify additional options by passing an `options` value, which is a JSON-encoded list of name/value pairs. Several other options are available. See the [Task - Processing Options](#processing-options) reference for more information.
```python @@ -97,7 +96,7 @@ with open("orthophoto.tif", 'wb') as f: print("Saved ./orthophoto.tif") ``` -Our orthophoto is ready to be downloaded. A variety of other assets, including a dense 3D point cloud and a textured model [are also available](#download). +Our orthophoto is ready to be downloaded. A variety of other assets, including a dense 3D point cloud and a textured model [are also available](#download-assets). Congratulations! You just processed some images. diff --git a/slate/source/includes/reference/_permissions.md b/slate/source/includes/reference/_permissions.md new file mode 100644 index 00000000..a6fea15d --- /dev/null +++ b/slate/source/includes/reference/_permissions.md @@ -0,0 +1,36 @@ +# Reference + +## Authentication + +> Get authentication token: + +```bash +curl -X POST -d "username=testuser&password=testpass" http://localhost:8000/api/token-auth/ + +{"token":"eyJ0eXAiO..."} +``` + +> Use authentication token: + +```bash +curl -H "Authorization: JWT " http://localhost:8000/api/projects/ + +{"count":13, ...} +``` + +`POST /api/token-auth/` + +Field | Type | Description +----- | ---- | ----------- +username | string | Username +password | string | Password + +To access the API, you need to provide a valid username and password. You can create users from WebODM's Administration page. + +If authentication is successful, you will be issued a token. All API calls should include the following header: + +Header | +------ | +Authorization: JWT `your_token` | + +The token expires after a set amount of time. The expiration time is dependent on WebODM's settings. You will need to request another token when a token expires. diff --git a/slate/source/includes/reference/_processingnode.md b/slate/source/includes/reference/_processingnode.md new file mode 100644 index 00000000..c62c352e --- /dev/null +++ b/slate/source/includes/reference/_processingnode.md @@ -0,0 +1,119 @@ +## Processing Node + +> Example processing node: + +```json +{ + "id": 2, + "hostname": "nodeodm.masseranolabs.com", + "port": 80, + "api_version": "1.0.1", + "last_refreshed": "2017-03-01T21:14:49.918276Z", + "queue_count": 0, + "available_options": [ + { + "help": "Oct-tree depth at which the Laplacian equation is solved in the surface reconstruction step. Increasing this value increases computation times slightly but helps reduce memory usage. Default: 9", + "name": "mesh-solver-divide", + "type": "int", + "value": "9", + "domain": "positive integer" + }, + ... +``` + +Processing nodes are associated with zero or more tasks and +take care of processing input images. Processing nodes are computers or virtual machines running [node-OpenDroneMap](https://github.com/OpenDroneMap/node-OpenDroneMap/) or any other API compatible with it. + +Field | Type | Description +----- | ---- | ----------- +id | int | Unique Identifier +hostname | string | Hostname/IP address +port | int | Port +api_version | string | Version of node-OpenDroneMap currently running +last_refreshed | string | Date and time this node was last seen online. This value is typically refreshed every 15-30 seconds and is used to decide whether a node is offline or not +queue_count | int | Number of [Task](#task) items currently being processed/queued on this node. +available_options | JSON[] | JSON-encoded list of name/value pairs that represent the list of options that this node is capable of handling. + + +### Add a processing node + +`POST /api/processingnodes/` + +Parameter | Required | Default | Description +--------- | -------- | ------- | ----------- +hostname | * | "" | Hostname/IP address +port | * | | Port + +All other fields are automatically populated, and shouldn't generally be specified. + +### Update a processing node + +`PATCH /api/processingnodes/` + +Parameters are the same as above. + +### Delete a processing node + +`DELETE /api/processingnodes/` + +Upon deletion, all [Task](#task) items associated with the node will continue to exist. You might get errors (duh!) if you delete a processing node in the middle of processing a [Task](#task). + + +### Get list of processing nodes + +`GET /api/processingnodes/` + +Parameter | Required | Default | Description +--------- | -------- | ------- | ----------- +id | | "" | Filter by id +hostname | | "" | Filter by hostname +port | | "" | Filter by port +api_version | | "" | Filter by API version +queue_count | | "" | Filter by queue count +ordering | | "" | Ordering field to sort results by +has_available_options | | "" | Return only processing nodes that have a valid set of processing options (check that the `available_options` field is populated). Either `true` or `false`. + +#### Example: Show only nodes that have a valid set of options + +`GET /api/processingnodes/?has_available_options=true` + +#### Example: Sorting + +`GET /api/processingnodes/?ordering=-hostname` + +Sort by hostname, descending order. + + + + +### Processing Options + +> Processing options example: + +```json +[ + { + "help": "Oct-tree depth at which the Laplacian equation is solved in the surface reconstruction step. Increasing this value increases computation times slightly but helps reduce memory usage. Default: 9", + "name": "mesh-solver-divide", + "type": "int", + "value": "9", + "domain": "positive integer" + }, + { + "help": "Ignore matched keypoints if the two images share less than percent of keypoints. Default: 2", + "name": "matcher-threshold", + "type": "float", + "value": "2", + "domain": "percent" + }, + ... +``` + +`GET /api/processingnodes/options/` + +Display the common options available among all online processing nodes. This is calculated by intersecting the `available_options` field of all online processing nodes visible to the current user. + +Use this list of options to check whether a particular option is supported by all online processing nodes. If you use the automatic processing node assignment feature for processing tasks, this is the list you want to display to the user for choosing the options to use during processing. + + + diff --git a/slate/source/includes/reference/_task.md b/slate/source/includes/reference/_task.md index 77e4d85f..47b5d4ab 100644 --- a/slate/source/includes/reference/_task.md +++ b/slate/source/includes/reference/_task.md @@ -32,15 +32,15 @@ Field | Type | Description ----- | ---- | ----------- id | int | Unique identifier project | int | [Project](#project) ID the task belongs to -processing_node | int | The ID of the [Processing Node](#processingnode) this task has been assigned to, or `null` if no [Processing Node](#processingnode) has been assigned. +processing_node | int | The ID of the [Processing Node](#processing-node) this task has been assigned to, or `null` if no [Processing Node](#processing-node) has been assigned. images_count | int | Number of images -uuid | string | Unique identifier assigned by a [Processing Node](#processingnode) once processing has started. +uuid | string | Unique identifier assigned by a [Processing Node](#processing-node) once processing has started. name | string | User defined name for the task processing_time | int | Milliseconds that have elapsed since the start of processing, or `-1` if no information is available. Useful for displaying a time status report to the user. -auto_processing_node | boolean | Whether WebODM should automatically assign the next available [Processing Node](#processingnode) to process this [Task](#task). A user can set this to `false` to manually choose a [Processing Node](#processingnode). +auto_processing_node | boolean | Whether WebODM should automatically assign the next available [Processing Node](#processing-node) to process this [Task](#task). A user can set this to `false` to manually choose a [Processing Node](#processing-node). status | int | One of [Status Codes](#status-codes), or `null` if no status is available. -last_error | string | The last error message reported by a [Processing Node](#processingnode) in case of processing failure. -options | JSON[] | JSON-encoded list of name/value pairs, where each pair represents a command line option to be passed to a [Processing Node](#processingnode). +last_error | string | The last error message reported by a [Processing Node](#processing-node) in case of processing failure. +options | JSON[] | JSON-encoded list of name/value pairs, where each pair represents a command line option to be passed to a [Processing Node](#processing-node). ground_control_points | string | Currently unused. See [#37](https://github.com/OpenDroneMap/WebODM/issues/37) created_at | string | Creation date and time pending_action | int | One of [Pending Actions](#pending-actions), or `null` if no pending action is set. @@ -54,10 +54,10 @@ pending_action | int | One of [Pending Actions](#pending-actions), or `null` if Parameter | Required | Default | Description --------- | -------- | ------- | ----------- images[] | * | "" | List of multipart-encoded images (2 minimum) -processing_node | | null | The ID of the [Processing Node](#processingnode) this [Task](#task) should be assigned to. If not specified, and auto_processing_node is `true`, a [Processing Node](#processingnode) will be automatically assigned. +processing_node | | null | The ID of the [Processing Node](#processing-node) this [Task](#task) should be assigned to. If not specified, and auto_processing_node is `true`, a [Processing Node](#processing-node) will be automatically assigned. name | | "" | User defined name for the task -auto_processing_node | | true | Whether WebODM should automatically assign the next available [Processing Node](#processingnode) to process this [Task](#task). -options | | "[]" | JSON-encoded list of name/value pairs, where each pair represents a command line option to be passed to a [Processing Node](#processingnode). +auto_processing_node | | true | Whether WebODM should automatically assign the next available [Processing Node](#processing-node) to process this [Task](#task). +options | | "[]" | JSON-encoded list of name/value pairs, where each pair represents a command line option to be passed to a [Processing Node](#processing-node). You assign a [Task](#task) to a [Project](#project) by passing the proper `project_id` path in the URL. @@ -107,31 +107,72 @@ Retrieves all [Task](#task) items associated with `project_id`. ### Download assets -TODO +`GET /api/projects/{project_id}/tasks/{task_id}/download/{asset}/` -### Download assets (raw) +After a task has been successfully processed, the user can download several assets from this URL. -TODO +Asset | Description +----- | ----------- +all | Archive (.zip) containing all assets, including an orthophoto, TMS tiles, a textured 3D model and point cloud in various formats. +geotiff | GeoTIFF orthophoto. +las | Point cloud in .LAS format. +ply | Point cloud in .PLY format. +csv | Point cloud in .CSV format. + +### Download assets (raw path) + +`GET /api/projects/{project_id}/tasks/{task_id}/assets/{path}/` + +After a task has been successfully processed, its assets are stored in a directory on the file system. This API call allows direct access to the files in that directory (by default: `WebODM/app/media/project/{project_id}/task/{task_id}/assets`). This can be useful to those applications that want to stream a `Potree` dataset, or render a textured 3D model on the fly. + + ### Retrieve console output -TODO +> Console output example: + +```bash +curl -H "Authorization: JWT " http://localhost:8000/api/projects/2/tasks/1/output/?line=5 + +[DEBUG] /var/www/data/e453747f-5fd4-4654-9622-b02727b29fc5/images\n[DEBUG] Loaded DJI_0219.JPG | camera: dji fc300s ... +``` + + +`GET /api/projects/{project_id}/tasks/{task_id}/output/` + +As a [Task](#task) is being processed, processing nodes will return an output string that can be used for debugging and informative purposes. Output is only available after processing has started. + +Parameter | Required | Default | Description +--------- | -------- | ------- | ----------- +line | | 0 | Only display the output starting from a certain line number. This can be useful to display output in realtime to the user by keeping track of the number of lines that have been displayed to the user so far and thus avoiding to download all output at every request. ### Cancel task -TODO +`POST /api/projects/{project_id}/tasks/{task_id}/cancel/` + +Stop processing a [Task](#task). Canceled tasks can be restarted. ### Remove task -TODO +`POST /api/projects/{project_id}/tasks/{task_id}/remove/` + +All assets associated with it will be destroyed also. If the [Task](#task) is currently being processed, processing will stop. ### Restart task -TODO +`POST /api/projects/{project_id}/tasks/{task_id}/restart/` + +If a [Task](#task) has been canceled or has failed processing, or has completed but the user decided to change processing options, it can be restarted. If the [Processing Node](#processing-node) assigned to the [Task](#task) has not changed, processing will happen more quickly compared to creating a new [Task](#task), since the [Processing Node](#processing-node) remembers the `uuid` of the [Task](#task) and will attempt to reuse previous results from the computation pipeline. ### Orthophoto TMS layer -TODO +`GET /api/projects/{project_id}/tasks/{task_id}/tiles.json` + +`GET /api/projects/{project_id}/tasks/{task_id}/tiles/{Z}/{X}/{Y}.png` + +After a task has been successfully processed, a TMS layer is made available for inclusion in programs such as [Leaflet](http://leafletjs.com/) or [Cesium](http://cesiumjs.org). ### Pending Actions @@ -147,7 +188,7 @@ RESTART | 3 | [Task](#task) is being restarted Status | Code | Description ----- | ---- | ----------- -QUEUED | 10 | [Task](#task)'s files have been uploaded to a [ProcessingNode](#processingnode) and are waiting to be processed. +QUEUED | 10 | [Task](#task)'s files have been uploaded to a [#processing-node](#processing-node) and are waiting to be processed. RUNNING | 20 | [Task](#task) is currently being processed. FAILED | 30 | [Task](#task) has failed for some reason (not enough images, out of memory, Piero forgot to close a parenthesis, etc.) COMPLETED | 40 | [Task](#task) has completed. Assets are be ready to be downloaded. diff --git a/slate/source/includes/reference/temp.md b/slate/source/includes/reference/temp.md deleted file mode 100644 index 93ad6c7b..00000000 --- a/slate/source/includes/reference/temp.md +++ /dev/null @@ -1 +0,0 @@ -At this point a TMS layer is also made available at `http://localhost:8000/api/projects/{project_id}/tasks/{task_id}/tiles.json` for inclusion in programs such as [Leaflet](http://leafletjs.com/) or [Cesium](http://cesiumjs.org). \ No newline at end of file diff --git a/slate/source/index.html.md b/slate/source/index.html.md index d8047076..6906ab48 100644 --- a/slate/source/index.html.md +++ b/slate/source/index.html.md @@ -7,6 +7,7 @@ language_tabs: toc_footers: - WebODM on GitHub - OpenDroneMap on GitHub + - node-OpenDroneMap on GitHub search: true @@ -16,4 +17,6 @@ includes: - reference/authentication - reference/project - reference/task + - reference/processingnode + ---