Docs additions, changed site title

pull/111/head
Piero Toffanin 2017-03-01 17:06:55 -05:00
rodzic e14fc574a6
commit 19be188c76
10 zmienionych plików z 224 dodań i 29 usunięć

Wyświetl plik

@ -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:

Wyświetl plik

@ -63,7 +63,7 @@
</button>
{% block navbar-top-links %}{% endblock %}
<a class="navbar-brand" href="/"><img src="{% static 'app/img/logo36.png' %}" alt="WebODM" /></a>
<a class="navbar-link" href="/"><p class="navbar-text">OpenDroneMap</a></p>
<a class="navbar-link" href="/"><p class="navbar-text">WebODM</a></p>
</div>
{% block navbar-sidebar %}{% endblock %}

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 2.2 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 4.2 KiB

Wyświetl plik

@ -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)

Wyświetl plik

@ -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.
<div class="clear"></div>
```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.

Wyświetl plik

@ -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 <your_token>" 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.

Wyświetl plik

@ -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.
<aside class="notice">Only processing nodes visible to the current user are returned. If you added a processing node, but your non-admin users can't see it, make sure that they have been assigned the proper permissions. Administration -- Processing Nodes -- Select Node -- Object Permissions -- Add User/Group and check CAN VIEW PROCESSING NODE.</aside>
### 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 <float> 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.
<aside class="notice">While WebODM is capable of handling processing nodes running different versions of node-OpenDroneMap, we don't recommend doing so. When all processing nodes use the same node-OpenDroneMap version, the output of this API call will be identical to the <b>available_options</b> field of any node.</aside>

Wyświetl plik

@ -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.
<aside class="notice">
These paths could change in future versions of WebODM. If the asset you need can be reached via <b>/api/projects/{project_id}/tasks/download/{asset}/</b>, use that instead.
</aside>
### Retrieve console output
TODO
> Console output example:
```bash
curl -H "Authorization: JWT <your_token>" 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.

Wyświetl plik

@ -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).

Wyświetl plik

@ -7,6 +7,7 @@ language_tabs:
toc_footers:
- <a href='https://github.com/OpenDroneMap/WebODM'>WebODM on GitHub</a>
- <a href='https://github.com/OpenDroneMap/OpenDroneMap'>OpenDroneMap on GitHub</a>
- <a href='https://github.com/OpenDroneMap/node-OpenDroneMap'>node-OpenDroneMap on GitHub</a>
search: true
@ -16,4 +17,6 @@ includes:
- reference/authentication
- reference/project
- reference/task
- reference/processingnode
---