Commit a01efbeb by Antonio

Added support for hierarchical data organization in a point model.

parent 78574d30
Showing with 131 additions and 53 deletions
...@@ -3,14 +3,11 @@ swagger: "2.0" ...@@ -3,14 +3,11 @@ swagger: "2.0"
info: info:
description: > description: >
Simple REST API for access to massive clouds repositories in the project SPSLidar. Simple REST API for access to massive clouds repositories in the project SPSLidar.
Point clouds are spatially indexed using the coordinates of their
bounding boxes. Each model has an associated data (raw point data or in laz format).
Point cloud models are spatially indexed using the coordinates of their bounding boxes. Each model has its data organized in a hierarchical structure of data blocks. Each data block represents a region of space and provides an approximated view of model for that region (a sampling or level of detail). Data associated to a data block is encoded in LAZ format.
This version only supports a level-of-detaIl (data in a single block). Future
versions will organize data using a hierarchy of LODs (e.g., using an octree).
version: "0.1" version: "0.2"
title: SPSLidar API title: SPSLidar API
contact: contact:
email: ajrueda@ujaen.es email: ajrueda@ujaen.es
...@@ -175,11 +172,52 @@ paths: ...@@ -175,11 +172,52 @@ paths:
404: 404:
description: Unknown workspace or model description: Unknown workspace or model
/workspace/{workspaceName}/model/{modelName}/data: /workspace/{workspaceName}/model/{modelName}/data/{id}:
get: get:
tags: tags:
- "data" - "data"
summary: Returns the given model associated data in raw or laz format (to decide) summary: Returns metadata asociated to a data block
description: >
A model is organized into a hierarchical structure of
data blocks. Each data block represents a region of space enclosed in a box. This region is subdivided into a fixed number of region (usually 8) that are also represented by data blocks, and so forth.
Each data block represents a level of detail (LOD) of the model in the associated region. In the case of a point model, this is a sampling of the points in the region. Data must not be redundant, i.e. data stored at a given data block must not be replicated in descendants.
This endpoint does not provide the actual data but the metadata (i.e., bounding box, descendant data blocks etc.). Data block 0 represents the first LOD of the entire model. Its descendants have ids 0..7 (considering 8 descendants), and in general descendants ids are computed as 8 * <parent_data_block_id> + <num_descendant> where <num_descendant> varies between 0 and 7.
The data associated to the data block is provided different endpoint, and several formats could be available. By now only LAZ format (for point data) is supported by .../data/{id}/laz endpoint.
produces:
- application/json
parameters:
- in: path
name: workspaceName
description: Workspace name
required: true
type: string
- in: path
name: modelName
description: Model name
required: true
type: string
- in: path
name: id
description: Data block id
required: true
type: string
responses:
200:
description: Successful operation
schema:
$ref: '#/definitions/DataBlock'
404:
description: Unknown workspace, model or data block id
/workspace/{workspaceName}/model/{modelName}/data/{id}/laz:
get:
tags:
- "data"
summary: Returns data associated to the data block in LAZ format
produces: produces:
- application/octet-stream - application/octet-stream
parameters: parameters:
...@@ -193,6 +231,12 @@ paths: ...@@ -193,6 +231,12 @@ paths:
description: Model name description: Model name
required: true required: true
type: string type: string
- in: path
name: id
description: Data block id
required: true
type: string
responses: responses:
200: 200:
description: Successful operation description: Successful operation
...@@ -200,12 +244,15 @@ paths: ...@@ -200,12 +244,15 @@ paths:
type: string type: string
format: binary format: binary
404: 404:
description: Unknown workspace or model description: Unknown workspace, model or data block id
post: /workspace/{workspaceName}/model/{modelName}/data/laz:
put:
tags: tags:
- "data" - "data"
summary: Uploads a model in raw or laz format (to decide) summary: Defines the point data of the model in LAZ format
description: >
After creating a model, data should be supplied using this endpoint. By now only LAZ format is supported. Internally, the server should open the original LAZ file and build a hierarchy of data blocks of the predefined size also in LAZ format.
consumes: consumes:
- application/octet-stream - application/octet-stream
parameters: parameters:
...@@ -271,6 +318,9 @@ definitions: ...@@ -271,6 +318,9 @@ definitions:
description: Date and time of acquisition description: Date and time of acquisition
bbox: bbox:
$ref: '#/definitions/GeorefBox' $ref: '#/definitions/GeorefBox'
dataBlockSize:
type: integer
description: Maximum size of a datablock (i.e., maximum number of points per datablock).
required: required:
- name - name
- bbox - bbox
...@@ -285,20 +335,49 @@ definitions: ...@@ -285,20 +335,49 @@ definitions:
north: 3.804588 north: 3.804588
west: 37.767032 west: 37.767032
south: -3.798777 south: -3.798777
dataBlockSize: 10000
# LOD: DataBlock:
# type: object type: object
# descrition: Representation of a model with a given level of detail description: >
# properties: Medatada associated to a data block. The bounding box of the data block is in normalized coordinates with respect to the bounding box of the entire model.
# bbox:
# $ref: '#/definitions/GeomBox' properties:
# description: > id:
# Bounding box of the LOD. Should use semi-normalized cartesian coordinates type: integer
# to avoid precision errors (avoid UTM or degrees). bbox:
# dataId: $ref: '#/definitions/GeomBox'
# type: integer size:
# description: Id to access data type: integer
description: Size of data (i.e, number of points)
subDataBlocks:
type: array
items:
type: integer
required:
- id
- bbox
- size
- subDatablocks
example:
id: 0
bbox:
minX: 0
minY: 0
minZ: 0
maxX: 1
maxY: 1
maxZ: 1
size: 10000
nextLevel:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
GeorefBox: GeorefBox:
type: object type: object
description: Box defined by latitude and longitude description: Box defined by latitude and longitude
...@@ -321,33 +400,32 @@ definitions: ...@@ -321,33 +400,32 @@ definitions:
- east - east
- south - south
# GeomBox: GeomBox:
# type: object type: object
# description: Box defined in 3D space description: Box defined in 3D space using normalized coordinates
# properties: properties:
# minX: minX:
# type: number type: number
# description: Minimal X coordinate description: Minimal X coordinate
# minY: minY:
# type: number type: number
# description: Minimal Y coordinate description: Minimal Y coordinate
# minZ: minZ:
# type: number type: number
# description: Minimal Z coordinate description: Minimal Z coordinate
# maxX: maxX:
# type: number type: number
# description: Maximum X coordinate description: Maximum X coordinate
# maxY: maxY:
# type: number type: number
# description: Maximum Y coordinate description: Maximum Y coordinate
# maxZ: maxZ:
# type: number type: number
# description: Minimal Z coordinate description: Minimal Z coordinate
required:
# required: - minX
# - minX - minY
# - minY - minZ
# - minZ - maxX
# - maxX - maxY
# - maxY - maxZ
# - maxZ
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment