@jupytergis/schema 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/lib/_interface/forms.json +1987 -0
  2. package/lib/_interface/geoTiffSource.d.ts +31 -0
  3. package/lib/_interface/geojsonsource.d.ts +404 -0
  4. package/lib/_interface/hillshadeLayer.d.ts +20 -0
  5. package/lib/_interface/imageLayer.d.ts +20 -0
  6. package/lib/_interface/imageSource.d.ts +20 -0
  7. package/lib/_interface/jgis.d.ts +140 -0
  8. package/lib/_interface/rasterDemSource.d.ts +28 -0
  9. package/lib/_interface/rasterlayer.d.ts +20 -0
  10. package/lib/_interface/rastersource.d.ts +43 -0
  11. package/lib/_interface/shapefileSource.d.ts +34 -0
  12. package/lib/_interface/vectorTileLayer.d.ts +32 -0
  13. package/lib/_interface/vectorlayer.d.ts +32 -0
  14. package/lib/_interface/vectortilesource.d.ts +35 -0
  15. package/lib/_interface/videoSource.d.ts +20 -0
  16. package/lib/_interface/webGlLayer.d.ts +24 -0
  17. package/lib/doc.d.ts +59 -0
  18. package/lib/doc.js +251 -0
  19. package/lib/index.d.ts +4 -0
  20. package/lib/index.js +4 -0
  21. package/lib/interfaces.d.ts +189 -0
  22. package/lib/interfaces.js +1 -0
  23. package/lib/model.d.ts +142 -0
  24. package/lib/model.js +554 -0
  25. package/lib/schema/geoTiffSource.json +37 -0
  26. package/lib/schema/geojsonsource.json +23 -0
  27. package/lib/schema/hillshadeLayer.json +18 -0
  28. package/lib/schema/imageLayer.json +21 -0
  29. package/lib/schema/imageSource.json +30 -0
  30. package/lib/schema/jgis.json +248 -0
  31. package/lib/schema/rasterDemSource.json +33 -0
  32. package/lib/schema/rasterlayer.json +21 -0
  33. package/lib/schema/rastersource.json +66 -0
  34. package/lib/schema/shapefileSource.json +37 -0
  35. package/lib/schema/vectorTileLayer.json +36 -0
  36. package/lib/schema/vectorlayer.json +36 -0
  37. package/lib/schema/vectortilesource.json +40 -0
  38. package/lib/schema/videoSource.json +33 -0
  39. package/lib/schema/webGlLayer.json +41 -0
  40. package/lib/token.d.ts +6 -0
  41. package/lib/token.js +5 -0
  42. package/lib/types.d.ts +19 -0
  43. package/lib/types.js +22 -0
  44. package/package.json +65 -0
@@ -0,0 +1,248 @@
1
+ {
2
+ "type": "object",
3
+ "title": "IJGISContent",
4
+ "required": ["layers", "sources"],
5
+ "additionalProperties": false,
6
+ "properties": {
7
+ "layers": {
8
+ "$ref": "#/definitions/jGISLayers"
9
+ },
10
+ "sources": {
11
+ "$ref": "#/definitions/jGISSources"
12
+ },
13
+ "layerTree": {
14
+ "$ref": "#/definitions/jGISLayerTree"
15
+ },
16
+ "terrain": {
17
+ "$ref": "#/definitions/jGISTerrain"
18
+ },
19
+ "options": {
20
+ "$ref": "#/definitions/jGISOptions"
21
+ }
22
+ },
23
+ "definitions": {
24
+ "layerType": {
25
+ "type": "string",
26
+ "enum": [
27
+ "RasterLayer",
28
+ "VectorLayer",
29
+ "VectorTileLayer",
30
+ "HillshadeLayer",
31
+ "WebGlLayer",
32
+ "ImageLayer"
33
+ ]
34
+ },
35
+ "sourceType": {
36
+ "type": "string",
37
+ "enum": [
38
+ "RasterSource",
39
+ "VectorTileSource",
40
+ "GeoJSONSource",
41
+ "RasterDemSource",
42
+ "VideoSource",
43
+ "ImageSource",
44
+ "ShapefileSource",
45
+ "GeoTiffSource"
46
+ ]
47
+ },
48
+ "jGISLayer": {
49
+ "title": "IJGISLayer",
50
+ "type": "object",
51
+ "additionalProperties": false,
52
+ "required": ["name", "type", "visible"],
53
+ "properties": {
54
+ "name": {
55
+ "type": "string"
56
+ },
57
+ "type": {
58
+ "$ref": "#/definitions/layerType"
59
+ },
60
+ "visible": {
61
+ "type": "boolean",
62
+ "default": true
63
+ },
64
+ "parameters": {
65
+ "type": "object"
66
+ },
67
+ "filters": {
68
+ "$ref": "#/definitions/jGISFilter"
69
+ }
70
+ }
71
+ },
72
+ "jGISSource": {
73
+ "title": "IJGISSource",
74
+ "type": "object",
75
+ "additionalProperties": false,
76
+ "required": ["name", "type"],
77
+ "properties": {
78
+ "name": {
79
+ "type": "string"
80
+ },
81
+ "type": {
82
+ "$ref": "#/definitions/sourceType"
83
+ },
84
+ "parameters": {
85
+ "type": "object"
86
+ }
87
+ }
88
+ },
89
+ "jGISLayerGroup": {
90
+ "title": "IJGISLayerGroup",
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "required": ["name", "layers"],
94
+ "properties": {
95
+ "name": {
96
+ "type": "string"
97
+ },
98
+ "layers": {
99
+ "type": "array",
100
+ "default": [],
101
+ "items": {
102
+ "$ref": "#/definitions/jGISLayerItem"
103
+ }
104
+ },
105
+ "visible": {
106
+ "type": "boolean",
107
+ "default": true
108
+ },
109
+ "parameters": {
110
+ "type": "object"
111
+ }
112
+ }
113
+ },
114
+ "jGISLayerItem": {
115
+ "title": "IJGISLayerItem",
116
+ "oneOf": [
117
+ {
118
+ "type": "string"
119
+ },
120
+ {
121
+ "$ref": "#/definitions/jGISLayerGroup"
122
+ }
123
+ ]
124
+ },
125
+ "jGISLayers": {
126
+ "title": "IJGISLayers",
127
+ "type": "object",
128
+ "default": {},
129
+ "additionalProperties": {
130
+ "$ref": "#/definitions/jGISLayer"
131
+ }
132
+ },
133
+ "jGISSources": {
134
+ "title": "IJGISSources",
135
+ "type": "object",
136
+ "default": {},
137
+ "additionalProperties": {
138
+ "$ref": "#/definitions/jGISSource"
139
+ }
140
+ },
141
+ "jGISLayerTree": {
142
+ "title": "IJGISLayerTree",
143
+ "type": "array",
144
+ "default": [],
145
+ "items": {
146
+ "$ref": "#/definitions/jGISLayerItem"
147
+ }
148
+ },
149
+ "jGISTerrain": {
150
+ "title": "IJGISTerrain",
151
+ "type": "object",
152
+ "default": {},
153
+ "required": ["source", "exaggeration"],
154
+ "additionalProperties": false,
155
+ "properties": {
156
+ "source": {
157
+ "type": "string",
158
+ "description": "The id of the DEM source",
159
+ "default": ""
160
+ },
161
+ "exaggeration": {
162
+ "type": "number",
163
+ "default": 1
164
+ }
165
+ }
166
+ },
167
+ "jGISOptions": {
168
+ "title": "IJGISOptions",
169
+ "type": "object",
170
+ "default": {},
171
+ "required": [],
172
+ "additionalProperties": false,
173
+ "properties": {
174
+ "latitude": {
175
+ "type": "number",
176
+ "default": 0
177
+ },
178
+ "longitude": {
179
+ "type": "number",
180
+ "default": 0
181
+ },
182
+ "zoom": {
183
+ "type": "number",
184
+ "default": 0
185
+ },
186
+ "bearing": {
187
+ "type": "number",
188
+ "default": 0
189
+ },
190
+ "pitch": {
191
+ "type": "number",
192
+ "default": 0
193
+ },
194
+ "extent": {
195
+ "type": "array",
196
+ "default": null,
197
+ "items": {
198
+ "type": "number"
199
+ }
200
+ },
201
+ "projection": {
202
+ "type": "string",
203
+ "default": "EPSG:3857"
204
+ }
205
+ }
206
+ },
207
+ "jGISFilterItem": {
208
+ "title": "IJGISFilterItem",
209
+ "type": "object",
210
+ "default": {},
211
+ "required": ["operator", "feature", "value"],
212
+ "additionalProperties": false,
213
+ "properties": {
214
+ "operator": {
215
+ "type": "string",
216
+ "enum": ["==", "!=", ">", "<", ">=", "<="],
217
+ "default": "=="
218
+ },
219
+ "feature": {
220
+ "type": "string",
221
+ "default": ""
222
+ },
223
+ "value": {
224
+ "type": ["string", "number"]
225
+ }
226
+ }
227
+ },
228
+ "jGISFilter": {
229
+ "title": "IJGISFilter",
230
+ "type": "object",
231
+ "required": ["logicalOp", "appliedFilters"],
232
+ "additionalProperties": false,
233
+ "properties": {
234
+ "logicalOp": {
235
+ "type": "string",
236
+ "default": "all"
237
+ },
238
+ "appliedFilters": {
239
+ "type": "array",
240
+ "default": [],
241
+ "items": {
242
+ "$ref": "#/definitions/jGISFilterItem"
243
+ }
244
+ }
245
+ }
246
+ }
247
+ }
248
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "type": "object",
3
+ "description": "RasterDemSource",
4
+ "title": "IRasterDemSource",
5
+ "required": ["url"],
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "url": {
9
+ "type": "string",
10
+ "description": "The url to the tile provider"
11
+ },
12
+ "tileSize": {
13
+ "type": "number",
14
+ "description": " The tile size",
15
+ "default": 512
16
+ },
17
+ "attribution": {
18
+ "type": "string",
19
+ "description": "The attribution for the raster-dem source"
20
+ },
21
+ "encoding": {
22
+ "type": "string",
23
+ "enum": ["terrarium", "mapbox"],
24
+ "default": "mapbox"
25
+ },
26
+ "urlParameters": {
27
+ "type": "object",
28
+ "additionalProperties": {
29
+ "type": "string"
30
+ }
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "type": "object",
3
+ "description": "RasterLayer",
4
+ "title": "IRasterLayer",
5
+ "required": ["source"],
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "source": {
9
+ "type": "string",
10
+ "description": "The id of the source"
11
+ },
12
+ "opacity": {
13
+ "type": "number",
14
+ "description": "The opacity of the source",
15
+ "default": 1,
16
+ "multipleOf": 0.1,
17
+ "minimum": 0,
18
+ "maximum": 1
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "type": "object",
3
+ "description": "RasterSource",
4
+ "title": "IRasterSource",
5
+ "required": ["url", "maxZoom", "minZoom"],
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "url": {
9
+ "type": "string",
10
+ "description": "The url to the tile provider"
11
+ },
12
+ "minZoom": {
13
+ "type": "number",
14
+ "minimum": 0,
15
+ "maximum": 24,
16
+ "readOnly": true,
17
+ "description": "The minimum zoom level for the raster source",
18
+ "default": 0
19
+ },
20
+ "maxZoom": {
21
+ "type": "number",
22
+ "minimum": 0,
23
+ "maximum": 24,
24
+ "readOnly": true,
25
+ "description": "The maximum zoom level for the raster source",
26
+ "default": 24
27
+ },
28
+ "attribution": {
29
+ "type": "string",
30
+ "readOnly": true,
31
+ "description": "The attribution for the raster source",
32
+ "default": ""
33
+ },
34
+ "htmlAttribution": {
35
+ "type": "string",
36
+ "readOnly": true,
37
+ "description": "The html attribution for the raster source",
38
+ "default": ""
39
+ },
40
+ "provider": {
41
+ "type": "string",
42
+ "readOnly": true,
43
+ "description": "The map provider",
44
+ "default": ""
45
+ },
46
+ "bounds": {
47
+ "type": "array",
48
+ "readOnly": true,
49
+ "items": {
50
+ "type": "array",
51
+ "items": {
52
+ "type": "number"
53
+ }
54
+ },
55
+ "default": [],
56
+ "description": "The bounds of the source"
57
+ },
58
+ "urlParameters": {
59
+ "type": "object",
60
+ "additionalProperties": {
61
+ "type": "string"
62
+ },
63
+ "default": {}
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "type": "object",
3
+ "description": "ShapefileSource",
4
+ "title": "IShapefileSource",
5
+ "required": ["path"],
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "path": {
9
+ "type": "string",
10
+ "description": "The path to the shapefile (.shp, .zip, or folder URL)."
11
+ },
12
+ "attribution": {
13
+ "type": "string",
14
+ "readOnly": true,
15
+ "description": "The attribution for the shapefile source.",
16
+ "default": ""
17
+ },
18
+ "projection": {
19
+ "type": "string",
20
+ "description": "The projection information for the shapefile (optional).",
21
+ "default": "WGS84"
22
+ },
23
+ "encoding": {
24
+ "type": "string",
25
+ "description": "The encoding used for the shapefile's DBF (optional).",
26
+ "default": "UTF-8"
27
+ },
28
+ "additionalFiles": {
29
+ "type": "object",
30
+ "description": "Additional files associated with the shapefile (e.g., .dbf, .prj, .cpg).",
31
+ "additionalProperties": {
32
+ "type": "string"
33
+ },
34
+ "default": {}
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "type": "object",
3
+ "description": "VectorTileLayer",
4
+ "title": "IVectorTileLayer",
5
+ "required": ["source", "type"],
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "source": {
9
+ "type": "string",
10
+ "description": "The id of the source"
11
+ },
12
+ "type": {
13
+ "type": "string",
14
+ "enum": ["circle", "fill", "line"],
15
+ "default": "line",
16
+ "description": "The type of vector layer"
17
+ },
18
+ "sourceLayer": {
19
+ "type": "string",
20
+ "description": "The source layer to use"
21
+ },
22
+ "color": {
23
+ "type": "string",
24
+ "description": "The color of the the object",
25
+ "default": "#FF0000"
26
+ },
27
+ "opacity": {
28
+ "type": "number",
29
+ "description": "The opacity of the the object",
30
+ "default": 1,
31
+ "multipleOf": 0.1,
32
+ "minimum": 0,
33
+ "maximum": 1
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "type": "object",
3
+ "description": "VectorLayer",
4
+ "title": "IVectorLayer",
5
+ "required": ["source", "type"],
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "source": {
9
+ "type": "string",
10
+ "description": "The id of the source"
11
+ },
12
+ "type": {
13
+ "type": "string",
14
+ "enum": ["circle", "fill", "line"],
15
+ "default": "line",
16
+ "description": "The type of vector layer"
17
+ },
18
+ "sourceLayer": {
19
+ "type": "string",
20
+ "description": "The source layer to use"
21
+ },
22
+ "color": {
23
+ "type": "string",
24
+ "description": "The color of the the object",
25
+ "default": "#FF0000"
26
+ },
27
+ "opacity": {
28
+ "type": "number",
29
+ "description": "The opacity of the the object",
30
+ "default": 1,
31
+ "multipleOf": 0.1,
32
+ "minimum": 0,
33
+ "maximum": 1
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "type": "object",
3
+ "description": "VectorTileSource",
4
+ "title": "IVectorTileSource",
5
+ "required": ["url", "maxZoom", "minZoom"],
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "url": {
9
+ "type": "string",
10
+ "description": "The url to the tile provider"
11
+ },
12
+ "minZoom": {
13
+ "type": "number",
14
+ "minimum": 0,
15
+ "maximum": 24,
16
+ "description": "The minimum zoom level for the vector source"
17
+ },
18
+ "maxZoom": {
19
+ "type": "number",
20
+ "minimum": 0,
21
+ "maximum": 24,
22
+ "description": "The maximum zoom level for the vector source"
23
+ },
24
+ "attribution": {
25
+ "type": "string",
26
+ "description": "The attribution for the vector source"
27
+ },
28
+ "provider": {
29
+ "type": "string",
30
+ "readOnly": true,
31
+ "description": "The map provider"
32
+ },
33
+ "urlParameters": {
34
+ "type": "object",
35
+ "additionalProperties": {
36
+ "type": "string"
37
+ }
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "type": "object",
3
+ "description": "VideoSource",
4
+ "title": "IVideoSource",
5
+ "required": ["urls", "coordinates"],
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "urls": {
9
+ "type": "array",
10
+ "items": {
11
+ "type": "string"
12
+ },
13
+ "minItems": 1,
14
+ "default": [],
15
+ "description": "URLs to video content in order of preferred format"
16
+ },
17
+ "coordinates": {
18
+ "type": "array",
19
+ "items": {
20
+ "type": "array",
21
+ "items": {
22
+ "type": "number"
23
+ },
24
+ "minItems": 2,
25
+ "maxItems": 2
26
+ },
27
+ "minItems": 4,
28
+ "maxItems": 4,
29
+ "default": [],
30
+ "description": "Corners of video specified in longitude, latitude pairs"
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "type": "object",
3
+ "description": "WebGlLayer",
4
+ "title": "IWebGlLayer",
5
+ "required": ["source"],
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "source": {
9
+ "type": "string",
10
+ "description": "The id of the source"
11
+ },
12
+ "opacity": {
13
+ "type": "number",
14
+ "description": "The opacity of the source",
15
+ "default": 1,
16
+ "multipleOf": 0.1,
17
+ "minimum": 0,
18
+ "maximum": 1
19
+ },
20
+ "color": {
21
+ "oneOf": [
22
+ { "type": "string" },
23
+ {
24
+ "type": "array",
25
+ "items": {
26
+ "anyOf": [
27
+ { "type": "string" },
28
+ { "type": "number" },
29
+ {
30
+ "type": "array",
31
+ "items": { "type": "string" }
32
+ }
33
+ ]
34
+ }
35
+ }
36
+ ],
37
+ "description": "The color of the the object",
38
+ "default": "#FF0000"
39
+ }
40
+ }
41
+ }
package/lib/token.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import { Token } from '@lumino/coreutils';
2
+ import { IJGISExternalCommandRegistry, IJGISFormSchemaRegistry, IJGISLayerBrowserRegistry, IJupyterGISTracker } from './interfaces';
3
+ export declare const IJupyterGISDocTracker: Token<IJupyterGISTracker>;
4
+ export declare const IJGISFormSchemaRegistryToken: Token<IJGISFormSchemaRegistry>;
5
+ export declare const IJGISExternalCommandRegistryToken: Token<IJGISExternalCommandRegistry>;
6
+ export declare const IJGISLayerBrowserRegistryToken: Token<IJGISLayerBrowserRegistry>;
package/lib/token.js ADDED
@@ -0,0 +1,5 @@
1
+ import { Token } from '@lumino/coreutils';
2
+ export const IJupyterGISDocTracker = new Token('jupyterGISDocTracker');
3
+ export const IJGISFormSchemaRegistryToken = new Token('jupytergisFormSchemaRegistry');
4
+ export const IJGISExternalCommandRegistryToken = new Token('jupytergisExternalCommandRegistry');
5
+ export const IJGISLayerBrowserRegistryToken = new Token('jupytergisExternalCommandRegistry');
package/lib/types.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ export * from './_interface/jgis';
2
+ export * from './_interface/geoTiffSource';
3
+ export * from './_interface/geojsonsource';
4
+ export * from './_interface/imageSource';
5
+ export * from './_interface/rasterDemSource';
6
+ export * from './_interface/rastersource';
7
+ export * from './_interface/shapefileSource';
8
+ export * from './_interface/vectortilesource';
9
+ export * from './_interface/videoSource';
10
+ export * from './_interface/hillshadeLayer';
11
+ export * from './_interface/rasterlayer';
12
+ export * from './_interface/vectorlayer';
13
+ export * from './_interface/vectorTileLayer';
14
+ export * from './_interface/webGlLayer';
15
+ export * from './_interface/imageLayer';
16
+ export * from './doc';
17
+ export * from './interfaces';
18
+ export * from './model';
19
+ export * from './token';
package/lib/types.js ADDED
@@ -0,0 +1,22 @@
1
+ export * from './_interface/jgis';
2
+ // Sources
3
+ export * from './_interface/geoTiffSource';
4
+ export * from './_interface/geojsonsource';
5
+ export * from './_interface/imageSource';
6
+ export * from './_interface/rasterDemSource';
7
+ export * from './_interface/rastersource';
8
+ export * from './_interface/shapefileSource';
9
+ export * from './_interface/vectortilesource';
10
+ export * from './_interface/videoSource';
11
+ // Layers
12
+ export * from './_interface/hillshadeLayer';
13
+ export * from './_interface/rasterlayer';
14
+ export * from './_interface/vectorlayer';
15
+ export * from './_interface/vectorTileLayer';
16
+ export * from './_interface/webGlLayer';
17
+ export * from './_interface/imageLayer';
18
+ // Other
19
+ export * from './doc';
20
+ export * from './interfaces';
21
+ export * from './model';
22
+ export * from './token';