-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
{ | ||
"id": "raster_to_points", | ||
"summary": "Sample points from rasters", | ||
"description": "The given raster data cubes is converted into a set of point samples per geometry given. The samples are always taken at the pixel center.", | ||
"categories": [ | ||
"cubes", | ||
"vector" | ||
], | ||
"experimental": true, | ||
"parameters": [ | ||
{ | ||
"name": "data", | ||
"description": "The raster data cube to extract a sample from.", | ||
"schema": { | ||
"type": "object", | ||
"subtype": "raster-cube" | ||
} | ||
}, | ||
{ | ||
"name": "geometries", | ||
"description": "Geometries to extract samples for. If not given or `null`, the bounding box of the raster data cube is used as the Polygon to sample for.\n\nTo maximize interoperability, a nested `GeometryCollection` should be avoided. Furthermore, a `GeometryCollection` composed of a single type of geometries should be avoided in favour of the corresponding multi-part type (e.g. `MultiPolygon`).", | ||
"optional": true, | ||
"default": null, | ||
"schema": [ | ||
{ | ||
"type": "null" | ||
}, | ||
{ | ||
"type": "object", | ||
"subtype": "geojson" | ||
}, | ||
{ | ||
"type": "object", | ||
"subtype": "vector-cube" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "num_samples", | ||
"description": "The number of samples.\n\nThe number of samples can be given in three different ways:\n\n* An integer >= 1: The absolute number of samples to take.\n* A number > 0 and < 1: The fraction of samples to take, e.g. 0.5 to take a sample for 50% of the data. To take a sample for 100% of the data (i.e. each pixel) see the next point.\n* If not given or `null`, it takes a sample for each pixel.", | ||
"optional": true, | ||
"default": null, | ||
"schema": [ | ||
{ | ||
"title": "Absolute", | ||
"type": "integer", | ||
"minimum": 1 | ||
}, | ||
{ | ||
"title": "Fraction", | ||
"type": "number", | ||
"minimumExclusive": 0, | ||
"maximumExclusive": 1 | ||
}, | ||
{ | ||
"title": "All", | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "seed", | ||
"description": "A randomization seed to use for random sampling. If not given or `null`, no seed is used and results may differ on subsequent use.", | ||
"optional": true, | ||
"default": null, | ||
"schema": { | ||
"type": [ | ||
"integer", | ||
"null" | ||
] | ||
} | ||
} | ||
], | ||
"returns": { | ||
"description": "Returns a vector data cube with the sampled points as `MultiPoint` per geometry given.", | ||
"schema": { | ||
"type": "object", | ||
"subtype": "vector-cube" | ||
} | ||
} | ||
} |