-
Notifications
You must be signed in to change notification settings - Fork 16
/
mask_polygon.json
107 lines (107 loc) · 3.95 KB
/
mask_polygon.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{
"id": "mask_polygon",
"summary": "Apply a polygon mask",
"description": "Applies a (multi) polygon mask to a raster data cube. To apply a raster mask use ``mask()``.\n\nAll pixels for which the point at the pixel center **does not** intersect with any polygon (as defined in the Simple Features standard by the OGC) are replaced. This behavior can be inverted by setting the parameter `inside` to `true`. The pixel values are replaced with the value specified for `replacement`, which defaults to `null` (no data). No data values in `data` will be left untouched by the masking operation.",
"categories": [
"cubes",
"masks"
],
"parameters": [
{
"name": "data",
"description": "A raster data cube.",
"schema": {
"type": "object",
"subtype": "datacube",
"dimensions": [
{
"type": "spatial",
"axis": [
"x",
"y"
]
}
]
}
},
{
"name": "mask",
"description": "A GeoJSON object or a vector data cube containing at least one polygon. The provided vector data can be one of the following:\n\n* A `Polygon` or `MultiPolygon` geometry,\n* a `Feature` with a `Polygon` or `MultiPolygon` geometry, or\n* a `FeatureCollection` containing at least one `Feature` with `Polygon` or `MultiPolygon` geometries.\n* Empty geometries are ignored.",
"schema": [
{
"title": "Vector Data Cube",
"type": "object",
"subtype": "datacube",
"dimensions": [
{
"type": "geometry",
"geometry_type": [
"Polygon",
"MultiPolygon"
]
}
]
},
{
"title": "GeoJSON",
"type": "object",
"subtype": "geojson",
"description": "Deprecated in favor of ``load_geojson()``. The GeoJSON type `GeometryCollection` is not supported.",
"deprecated": true
}
]
},
{
"name": "replacement",
"description": "The value used to replace masked values with.",
"schema": [
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"optional": true
},
{
"name": "inside",
"description": "If set to `true` all pixels for which the point at the pixel center **does** intersect with any polygon are replaced.",
"schema": {
"type": "boolean"
},
"default": false,
"optional": true
}
],
"returns": {
"description": "A masked raster data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged.",
"schema": {
"type": "object",
"subtype": "datacube",
"dimensions": [
{
"type": "spatial",
"axis": [
"x",
"y"
]
}
]
}
},
"links": [
{
"href": "http://www.opengeospatial.org/standards/sfa",
"rel": "about",
"title": "Simple Features standard by the OGC"
}
]
}