@jupytergis/schema 0.13.3 → 0.14.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.
- package/lib/_interface/forms.json +17 -18
- package/lib/_interface/project/jgis.d.ts +5 -0
- package/lib/_interface/project/layers/storySegmentLayer.d.ts +6 -0
- package/lib/_interface/project/sources/geoJsonSource.d.ts +1 -5
- package/lib/_interface/project/sources/rasterSource.d.ts +10 -7
- package/lib/doc.d.ts +8 -1
- package/lib/doc.js +22 -1
- package/lib/interfaces.d.ts +5 -3
- package/lib/model.d.ts +5 -8
- package/lib/model.js +15 -18
- package/lib/processing/_generated/exportProcessingSchema.d.ts +3 -3
- package/lib/processing/_generated/exportProcessingSchema.js +3 -3
- package/lib/processing/_generated/processingType.d.ts +1 -1
- package/lib/processing/_generated/processingType.js +3 -3
- package/lib/processing/_generated/processing_merge.json +30 -30
- package/lib/schema/project/jgis.json +6 -0
- package/lib/schema/project/layers/storySegmentLayer.json +5 -0
- package/lib/schema/project/layers/vectorLayer.json +1 -3
- package/lib/schema/project/layers/webGlLayer.json +2 -2
- package/lib/schema/project/sources/geoJsonSource.json +2 -9
- package/lib/schema/project/sources/rasterSource.json +3 -2
- package/lib/schema/project/sources/vectorTileSource.json +1 -2
- package/package.json +1 -1
|
@@ -413,6 +413,11 @@
|
|
|
413
413
|
"type": "object",
|
|
414
414
|
"description": "The color/style override",
|
|
415
415
|
"default": {}
|
|
416
|
+
},
|
|
417
|
+
"sourceProperties": {
|
|
418
|
+
"type": "object",
|
|
419
|
+
"description": "The symbology source override",
|
|
420
|
+
"default": {}
|
|
416
421
|
}
|
|
417
422
|
}
|
|
418
423
|
},
|
|
@@ -461,8 +466,7 @@
|
|
|
461
466
|
"default": "Single Symbol"
|
|
462
467
|
},
|
|
463
468
|
"value": {
|
|
464
|
-
"type": "string"
|
|
465
|
-
"default": ""
|
|
469
|
+
"type": "string"
|
|
466
470
|
},
|
|
467
471
|
"method": {
|
|
468
472
|
"type": "string",
|
|
@@ -499,7 +503,6 @@
|
|
|
499
503
|
"additionalProperties": false,
|
|
500
504
|
"default": {
|
|
501
505
|
"renderType": "Single Symbol",
|
|
502
|
-
"value": "",
|
|
503
506
|
"method": "color",
|
|
504
507
|
"colorRamp": "viridis",
|
|
505
508
|
"nClasses": "9",
|
|
@@ -663,7 +666,7 @@
|
|
|
663
666
|
"properties": {
|
|
664
667
|
"renderType": {
|
|
665
668
|
"type": "string",
|
|
666
|
-
"default": "
|
|
669
|
+
"default": "Singleband Pseudocolor"
|
|
667
670
|
},
|
|
668
671
|
"band": {
|
|
669
672
|
"type": "number",
|
|
@@ -714,7 +717,7 @@
|
|
|
714
717
|
},
|
|
715
718
|
"additionalProperties": false,
|
|
716
719
|
"default": {
|
|
717
|
-
"renderType": "
|
|
720
|
+
"renderType": "Singleband Pseudocolor",
|
|
718
721
|
"band": 1,
|
|
719
722
|
"redBand": 1,
|
|
720
723
|
"greenBand": 2,
|
|
@@ -921,8 +924,7 @@
|
|
|
921
924
|
"properties": {
|
|
922
925
|
"url": {
|
|
923
926
|
"type": "string",
|
|
924
|
-
"description": "The url to the tile provider"
|
|
925
|
-
"default": ""
|
|
927
|
+
"description": "The url to the tile provider"
|
|
926
928
|
},
|
|
927
929
|
"minZoom": {
|
|
928
930
|
"type": "number",
|
|
@@ -972,6 +974,7 @@
|
|
|
972
974
|
},
|
|
973
975
|
"urlParameters": {
|
|
974
976
|
"type": "object",
|
|
977
|
+
"title": "URL parameters",
|
|
975
978
|
"additionalProperties": {
|
|
976
979
|
"type": "string"
|
|
977
980
|
},
|
|
@@ -979,6 +982,7 @@
|
|
|
979
982
|
},
|
|
980
983
|
"interpolate": {
|
|
981
984
|
"type": "boolean",
|
|
985
|
+
"title": "Interpolate",
|
|
982
986
|
"description": "Interpolate between grid cells when overzooming?",
|
|
983
987
|
"default": false
|
|
984
988
|
}
|
|
@@ -1033,8 +1037,7 @@
|
|
|
1033
1037
|
"properties": {
|
|
1034
1038
|
"url": {
|
|
1035
1039
|
"type": "string",
|
|
1036
|
-
"description": "The url to the tile provider"
|
|
1037
|
-
"default": ""
|
|
1040
|
+
"description": "The url to the tile provider"
|
|
1038
1041
|
},
|
|
1039
1042
|
"minZoom": {
|
|
1040
1043
|
"type": "number",
|
|
@@ -1110,9 +1113,11 @@
|
|
|
1110
1113
|
"additionalProperties": false,
|
|
1111
1114
|
"properties": {
|
|
1112
1115
|
"path": {
|
|
1113
|
-
"type":
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
+
"type": [
|
|
1117
|
+
"string",
|
|
1118
|
+
"null"
|
|
1119
|
+
],
|
|
1120
|
+
"description": "The local path to a GeoJSON file"
|
|
1116
1121
|
},
|
|
1117
1122
|
"data": {
|
|
1118
1123
|
"type": "object",
|
|
@@ -2606,12 +2611,6 @@
|
|
|
2606
2611
|
}
|
|
2607
2612
|
}
|
|
2608
2613
|
]
|
|
2609
|
-
},
|
|
2610
|
-
"valid": {
|
|
2611
|
-
"type": "boolean",
|
|
2612
|
-
"description": "Whether the data are valid or not",
|
|
2613
|
-
"readOnly": true,
|
|
2614
|
-
"default": false
|
|
2615
2614
|
}
|
|
2616
2615
|
}
|
|
2617
2616
|
}
|
|
@@ -53,6 +53,10 @@ export type Title = string;
|
|
|
53
53
|
* The type of story map
|
|
54
54
|
*/
|
|
55
55
|
export type StoryType = "guided" | "unguided";
|
|
56
|
+
/**
|
|
57
|
+
* Toggle the gradient background in presentation mode.
|
|
58
|
+
*/
|
|
59
|
+
export type UseGradientBackground = boolean;
|
|
56
60
|
/**
|
|
57
61
|
* The background color of the story map
|
|
58
62
|
*/
|
|
@@ -172,6 +176,7 @@ export interface IJGISStoryMap {
|
|
|
172
176
|
* Array of story segments for the story map
|
|
173
177
|
*/
|
|
174
178
|
storySegments?: string[];
|
|
179
|
+
showGradient?: UseGradientBackground;
|
|
175
180
|
presentationBgColor?: PresentationBackgroundColor;
|
|
176
181
|
presentationTextColor?: PresentationTextColor;
|
|
177
182
|
[k: string]: any;
|
|
@@ -26,12 +26,8 @@ export interface IGeoJSONSource {
|
|
|
26
26
|
/**
|
|
27
27
|
* The local path to a GeoJSON file
|
|
28
28
|
*/
|
|
29
|
-
path?: string;
|
|
29
|
+
path?: string | null;
|
|
30
30
|
data?: GeoJSON;
|
|
31
|
-
/**
|
|
32
|
-
* Whether the data are valid or not
|
|
33
|
-
*/
|
|
34
|
-
valid?: boolean;
|
|
35
31
|
}
|
|
36
32
|
export interface GeoJSONPoint {
|
|
37
33
|
type: "Point";
|
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
* and run json-schema-to-typescript to regenerate this file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Interpolate between grid cells when overzooming?
|
|
10
|
+
*/
|
|
11
|
+
export type Interpolate = boolean;
|
|
12
|
+
|
|
8
13
|
/**
|
|
9
14
|
* RasterSource
|
|
10
15
|
*/
|
|
@@ -37,11 +42,9 @@ export interface IRasterSource {
|
|
|
37
42
|
* The bounds of the source
|
|
38
43
|
*/
|
|
39
44
|
bounds?: number[][];
|
|
40
|
-
urlParameters?:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
*/
|
|
46
|
-
interpolate?: boolean;
|
|
45
|
+
urlParameters?: URLParameters;
|
|
46
|
+
interpolate?: Interpolate;
|
|
47
|
+
}
|
|
48
|
+
export interface URLParameters {
|
|
49
|
+
[k: string]: string;
|
|
47
50
|
}
|
package/lib/doc.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { ISignal } from '@lumino/signaling';
|
|
|
4
4
|
import { IJGISLayer, IJGISLayerItem, IJGISLayerTree, IJGISLayers, IJGISOptions, IJGISSource, IJGISSources, IJGISStoryMap } from './_interface/project/jgis';
|
|
5
5
|
import { IDict, IJGISLayerDocChange, IJGISLayerTreeDocChange, IJGISSourceDocChange, IJGISStoryMapDocChange, IJGISStoryMaps, IJupyterGISDoc, IJupyterGISDocChange } from './interfaces';
|
|
6
6
|
/** Default JSON content for a new JupyterGIS document. */
|
|
7
|
-
export declare const DEFAULT_JGIS_DOCUMENT_CONTENT = "{\n\t\"schemaVersion\": \"0.5.0\",\n\t\"layers\": {},\n\t\"sources\": {},\n\t\"options\": {\"latitude\": 0, \"longitude\": 0, \"zoom\": 0, \"bearing\": 0, \"pitch\": 0, \"projection\": \"EPSG:3857\"},\n\t\"layerTree\": [],\n\t\"metadata\": {}\n}";
|
|
7
|
+
export declare const DEFAULT_JGIS_DOCUMENT_CONTENT = "{\n\t\"schemaVersion\": \"0.5.0\",\n\t\"layers\": {},\n\t\"sources\": {},\n\t\"options\": {\"latitude\": 0, \"longitude\": 0, \"zoom\": 0, \"bearing\": 0, \"pitch\": 0, \"projection\": \"EPSG:3857\", \"storyMapPresentationMode\": false},\n\t\"layerTree\": [],\n\t\"metadata\": {}\n}";
|
|
8
8
|
export declare class JupyterGISDoc extends YDocument<IJupyterGISDocChange> implements IJupyterGISDoc {
|
|
9
9
|
constructor();
|
|
10
10
|
get initialSyncReady(): Promise<void>;
|
|
@@ -23,6 +23,13 @@ export declare class JupyterGISDoc extends YDocument<IJupyterGISDocChange> imple
|
|
|
23
23
|
set layerTree(layerTree: IJGISLayerTree);
|
|
24
24
|
getLayer(id: string): IJGISLayer | undefined;
|
|
25
25
|
getLayerSource(id: string): IJGISSource | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Get the list of layers using a source.
|
|
28
|
+
*
|
|
29
|
+
* @param id - the source id.
|
|
30
|
+
* @returns a list of layer ids that use the source.
|
|
31
|
+
*/
|
|
32
|
+
getLayersBySource(id: string): string[];
|
|
26
33
|
set options(options: IJGISOptions);
|
|
27
34
|
get options(): IJGISOptions;
|
|
28
35
|
get layersChanged(): ISignal<IJupyterGISDoc, IJGISLayerDocChange>;
|
package/lib/doc.js
CHANGED
|
@@ -7,7 +7,7 @@ export const DEFAULT_JGIS_DOCUMENT_CONTENT = `{
|
|
|
7
7
|
"schemaVersion": "${SCHEMA_VERSION}",
|
|
8
8
|
"layers": {},
|
|
9
9
|
"sources": {},
|
|
10
|
-
"options": {"latitude": 0, "longitude": 0, "zoom": 0, "bearing": 0, "pitch": 0, "projection": "EPSG:3857"},
|
|
10
|
+
"options": {"latitude": 0, "longitude": 0, "zoom": 0, "bearing": 0, "pitch": 0, "projection": "EPSG:3857", "storyMapPresentationMode": false},
|
|
11
11
|
"layerTree": [],
|
|
12
12
|
"metadata": {}
|
|
13
13
|
}`;
|
|
@@ -167,6 +167,22 @@ export class JupyterGISDoc extends YDocument {
|
|
|
167
167
|
}
|
|
168
168
|
return JSONExt.deepCopy(this._sources.get(id));
|
|
169
169
|
}
|
|
170
|
+
/**
|
|
171
|
+
* Get the list of layers using a source.
|
|
172
|
+
*
|
|
173
|
+
* @param id - the source id.
|
|
174
|
+
* @returns a list of layer ids that use the source.
|
|
175
|
+
*/
|
|
176
|
+
getLayersBySource(id) {
|
|
177
|
+
const usingLayers = [];
|
|
178
|
+
Object.entries(this.layers || {}).forEach(([layerId, layer]) => {
|
|
179
|
+
var _a;
|
|
180
|
+
if (((_a = layer.parameters) === null || _a === void 0 ? void 0 : _a.source) === id) {
|
|
181
|
+
usingLayers.push(layerId);
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
return usingLayers;
|
|
185
|
+
}
|
|
170
186
|
set options(options) {
|
|
171
187
|
this.transact(() => {
|
|
172
188
|
for (const [key, value] of Object.entries(options)) {
|
|
@@ -249,6 +265,11 @@ export class JupyterGISDoc extends YDocument {
|
|
|
249
265
|
return Boolean(this._getSourceAsYMap(id));
|
|
250
266
|
}
|
|
251
267
|
removeSource(id) {
|
|
268
|
+
const layersUsingSource = this.getLayersBySource(id);
|
|
269
|
+
if (layersUsingSource.length > 0) {
|
|
270
|
+
console.debug(`Skipping source removal: source ${id} still used by layers: ${layersUsingSource.join(', ')}`);
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
252
273
|
this.transact(() => {
|
|
253
274
|
this._sources.delete(id);
|
|
254
275
|
});
|
package/lib/interfaces.d.ts
CHANGED
|
@@ -106,6 +106,7 @@ export interface IJupyterGISDoc extends YDocument<IJupyterGISDocChange> {
|
|
|
106
106
|
updateLayer(id: string, value: IJGISLayer): void;
|
|
107
107
|
sourceExists(id: string): boolean;
|
|
108
108
|
getLayerSource(id: string): IJGISSource | undefined;
|
|
109
|
+
getLayersBySource(id: string): string[];
|
|
109
110
|
removeSource(id: string): void;
|
|
110
111
|
addSource(id: string, value: IJGISSource): void;
|
|
111
112
|
updateSource(id: string, value: IJGISSource): void;
|
|
@@ -180,15 +181,16 @@ export interface IJupyterGISModel extends DocumentRegistry.IModel {
|
|
|
180
181
|
getContent(): IJGISContent;
|
|
181
182
|
getLayers(): IJGISLayers;
|
|
182
183
|
getLayer(id: string): IJGISLayer | undefined;
|
|
184
|
+
getLayerOrSource(id: string): IJGISLayer | IJGISSource | undefined;
|
|
183
185
|
getSources(): IJGISSources;
|
|
184
186
|
getSource(id: string): IJGISSource | undefined;
|
|
185
187
|
getSourcesByType(type: SourceType): {
|
|
186
188
|
[key: string]: string;
|
|
187
189
|
};
|
|
188
|
-
getLayersBySource(id: string): string[];
|
|
189
190
|
getLayerTree(): IJGISLayerTree;
|
|
190
191
|
addLayer(id: string, layer: IJGISLayer, groupName?: string, position?: number): void;
|
|
191
192
|
removeLayer(id: string): void;
|
|
193
|
+
removeSource(id: string): void;
|
|
192
194
|
getOptions(): IJGISOptions;
|
|
193
195
|
setOptions(value: IJGISOptions): void;
|
|
194
196
|
removeLayerGroup(groupName: string): void;
|
|
@@ -226,7 +228,7 @@ export interface IJupyterGISModel extends DocumentRegistry.IModel {
|
|
|
226
228
|
isTemporalControllerActive: boolean;
|
|
227
229
|
toggleTemporalController(): void;
|
|
228
230
|
addFeatureAsMs(id: string, selectedFeature: string): void;
|
|
229
|
-
triggerLayerUpdate(layerId: string,
|
|
231
|
+
triggerLayerUpdate(layerId: string, layerOrSource: IJGISLayer | IJGISSource): void;
|
|
230
232
|
disposed: ISignal<any, void>;
|
|
231
233
|
getSelectedStory(): {
|
|
232
234
|
storyId: string;
|
|
@@ -234,6 +236,7 @@ export interface IJupyterGISModel extends DocumentRegistry.IModel {
|
|
|
234
236
|
};
|
|
235
237
|
getCurrentSegmentIndex(): number;
|
|
236
238
|
setCurrentSegmentIndex(index: number): void;
|
|
239
|
+
currentSegmentIndexChanged: ISignal<IJupyterGISModel, number>;
|
|
237
240
|
addStorySegment(): {
|
|
238
241
|
storySegmentId: string;
|
|
239
242
|
storyId: string;
|
|
@@ -346,7 +349,6 @@ export interface IJupyterGISSettings {
|
|
|
346
349
|
rightPanelDisabled?: boolean;
|
|
347
350
|
layersDisabled?: boolean;
|
|
348
351
|
stacBrowserDisabled?: boolean;
|
|
349
|
-
filtersDisabled?: boolean;
|
|
350
352
|
objectPropertiesDisabled?: boolean;
|
|
351
353
|
annotationsDisabled?: boolean;
|
|
352
354
|
identifyDisabled?: boolean;
|
package/lib/model.d.ts
CHANGED
|
@@ -94,6 +94,7 @@ export declare class JupyterGISModel implements IJupyterGISModel {
|
|
|
94
94
|
getSources(): IJGISSources;
|
|
95
95
|
getLayerTree(): IJGISLayerTree;
|
|
96
96
|
getLayer(id: string): IJGISLayer | undefined;
|
|
97
|
+
getLayerOrSource(id: string): IJGISLayer | IJGISSource | undefined;
|
|
97
98
|
getSource(id: string): IJGISSource | undefined;
|
|
98
99
|
/**
|
|
99
100
|
* Get a {[key: id]: name} dictionary of sources for a given source type
|
|
@@ -102,13 +103,6 @@ export declare class JupyterGISModel implements IJupyterGISModel {
|
|
|
102
103
|
getSourcesByType(type: string): {
|
|
103
104
|
[key: string]: string;
|
|
104
105
|
};
|
|
105
|
-
/**
|
|
106
|
-
* Get the list of layers using a source.
|
|
107
|
-
*
|
|
108
|
-
* @param id - the source id.
|
|
109
|
-
* @returns a list of layer ids that use the source.
|
|
110
|
-
*/
|
|
111
|
-
getLayersBySource(id: string): string[];
|
|
112
106
|
/**
|
|
113
107
|
* Add a layer group in the layer tree.
|
|
114
108
|
*
|
|
@@ -131,6 +125,7 @@ export declare class JupyterGISModel implements IJupyterGISModel {
|
|
|
131
125
|
*/
|
|
132
126
|
addLayer(id: string, layer: IJGISLayer, groupName?: string, position?: number): void;
|
|
133
127
|
removeLayer(layer_id: string): void;
|
|
128
|
+
removeSource(sourceId: string): void;
|
|
134
129
|
setOptions(value: IJGISOptions): void;
|
|
135
130
|
getOptions(): IJGISOptions;
|
|
136
131
|
syncViewport(viewport?: IViewPortState, emitter?: string): void;
|
|
@@ -180,6 +175,7 @@ export declare class JupyterGISModel implements IJupyterGISModel {
|
|
|
180
175
|
* Set current slide index for the selected story.
|
|
181
176
|
*/
|
|
182
177
|
setCurrentSegmentIndex(index: number): void;
|
|
178
|
+
get currentSegmentIndexChanged(): ISignal<this, number>;
|
|
183
179
|
/**
|
|
184
180
|
* Adds a story segment from the current map view
|
|
185
181
|
* @returns Object with storySegmentId and storyMapId, or null if no extent/zoom found
|
|
@@ -226,7 +222,7 @@ export declare class JupyterGISModel implements IJupyterGISModel {
|
|
|
226
222
|
addFeatureAsMs: (id: string, selectedFeature: string) => void;
|
|
227
223
|
get addFeatureAsMsSignal(): Signal<this, string>;
|
|
228
224
|
get updateLayerSignal(): Signal<this, string>;
|
|
229
|
-
triggerLayerUpdate: (layerId: string, layer: IJGISLayer) => void;
|
|
225
|
+
triggerLayerUpdate: (layerId: string, layer: IJGISLayer | IJGISSource) => void;
|
|
230
226
|
get geolocation(): JgisCoordinates;
|
|
231
227
|
set geolocation(geolocation: JgisCoordinates);
|
|
232
228
|
get geolocationChanged(): Signal<this, JgisCoordinates>;
|
|
@@ -265,6 +261,7 @@ export declare class JupyterGISModel implements IJupyterGISModel {
|
|
|
265
261
|
private _geolocationChanged;
|
|
266
262
|
private _tileFeatureCache;
|
|
267
263
|
private _currentSegmentIndex;
|
|
264
|
+
private _currentSegmentIndexChanged;
|
|
268
265
|
stories: Map<string, IJGISStoryMap>;
|
|
269
266
|
}
|
|
270
267
|
export declare namespace JupyterGISModel {
|
package/lib/model.js
CHANGED
|
@@ -10,7 +10,6 @@ const DEFAULT_SETTINGS = {
|
|
|
10
10
|
rightPanelDisabled: false,
|
|
11
11
|
layersDisabled: false,
|
|
12
12
|
stacBrowserDisabled: false,
|
|
13
|
-
filtersDisabled: false,
|
|
14
13
|
objectPropertiesDisabled: false,
|
|
15
14
|
annotationsDisabled: false,
|
|
16
15
|
identifyDisabled: false,
|
|
@@ -64,6 +63,7 @@ export class JupyterGISModel {
|
|
|
64
63
|
this._editingChanged = new Signal(this);
|
|
65
64
|
this._geolocationChanged = new Signal(this);
|
|
66
65
|
this._tileFeatureCache = new Map();
|
|
66
|
+
this._currentSegmentIndexChanged = new Signal(this);
|
|
67
67
|
this.stories = new Map();
|
|
68
68
|
const { annotationModel, sharedModel, settingRegistry } = options;
|
|
69
69
|
if (sharedModel) {
|
|
@@ -339,6 +339,10 @@ export class JupyterGISModel {
|
|
|
339
339
|
getLayer(id) {
|
|
340
340
|
return this.sharedModel.getLayer(id);
|
|
341
341
|
}
|
|
342
|
+
getLayerOrSource(id) {
|
|
343
|
+
var _a;
|
|
344
|
+
return (_a = this.sharedModel.getLayer(id)) !== null && _a !== void 0 ? _a : this.sharedModel.getLayerSource(id);
|
|
345
|
+
}
|
|
342
346
|
getSource(id) {
|
|
343
347
|
return this.sharedModel.getLayerSource(id);
|
|
344
348
|
}
|
|
@@ -356,22 +360,6 @@ export class JupyterGISModel {
|
|
|
356
360
|
}
|
|
357
361
|
return sources;
|
|
358
362
|
}
|
|
359
|
-
/**
|
|
360
|
-
* Get the list of layers using a source.
|
|
361
|
-
*
|
|
362
|
-
* @param id - the source id.
|
|
363
|
-
* @returns a list of layer ids that use the source.
|
|
364
|
-
*/
|
|
365
|
-
getLayersBySource(id) {
|
|
366
|
-
const usingLayers = [];
|
|
367
|
-
Object.entries(this.getLayers() || {}).forEach(([layerId, layer]) => {
|
|
368
|
-
var _a;
|
|
369
|
-
if (((_a = layer.parameters) === null || _a === void 0 ? void 0 : _a.source) === id) {
|
|
370
|
-
usingLayers.push(layerId);
|
|
371
|
-
}
|
|
372
|
-
});
|
|
373
|
-
return usingLayers;
|
|
374
|
-
}
|
|
375
363
|
/**
|
|
376
364
|
* Add a layer group in the layer tree.
|
|
377
365
|
*
|
|
@@ -427,9 +415,14 @@ export class JupyterGISModel {
|
|
|
427
415
|
});
|
|
428
416
|
}
|
|
429
417
|
else {
|
|
430
|
-
|
|
418
|
+
if (source_id) {
|
|
419
|
+
this.removeSource(source_id);
|
|
420
|
+
}
|
|
431
421
|
}
|
|
432
422
|
}
|
|
423
|
+
removeSource(sourceId) {
|
|
424
|
+
this.sharedModel.removeSource(sourceId);
|
|
425
|
+
}
|
|
433
426
|
setOptions(value) {
|
|
434
427
|
this._sharedModel.options = value;
|
|
435
428
|
}
|
|
@@ -525,6 +518,10 @@ export class JupyterGISModel {
|
|
|
525
518
|
*/
|
|
526
519
|
setCurrentSegmentIndex(index) {
|
|
527
520
|
this._currentSegmentIndex = index;
|
|
521
|
+
this._currentSegmentIndexChanged.emit(index);
|
|
522
|
+
}
|
|
523
|
+
get currentSegmentIndexChanged() {
|
|
524
|
+
return this._currentSegmentIndexChanged;
|
|
528
525
|
}
|
|
529
526
|
/**
|
|
530
527
|
* Adds a story segment from the current map view
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from '../../_interface/processing/centroids';
|
|
2
|
-
export * from '../../_interface/processing/convexHull';
|
|
3
|
-
export * from '../../_interface/processing/concaveHull';
|
|
4
1
|
export * from '../../_interface/processing/buffer';
|
|
2
|
+
export * from '../../_interface/processing/convexHull';
|
|
5
3
|
export * from '../../_interface/processing/dissolve';
|
|
4
|
+
export * from '../../_interface/processing/concaveHull';
|
|
6
5
|
export * from '../../_interface/processing/boundingBoxes';
|
|
6
|
+
export * from '../../_interface/processing/centroids';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//Generated automatically please don't modify directly
|
|
2
|
-
export * from '../../_interface/processing/centroids';
|
|
3
|
-
export * from '../../_interface/processing/convexHull';
|
|
4
|
-
export * from '../../_interface/processing/concaveHull';
|
|
5
2
|
export * from '../../_interface/processing/buffer';
|
|
3
|
+
export * from '../../_interface/processing/convexHull';
|
|
6
4
|
export * from '../../_interface/processing/dissolve';
|
|
5
|
+
export * from '../../_interface/processing/concaveHull';
|
|
7
6
|
export * from '../../_interface/processing/boundingBoxes';
|
|
7
|
+
export * from '../../_interface/processing/centroids';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type ProcessingType = '
|
|
1
|
+
export type ProcessingType = 'Buffer' | 'ConvexHull' | 'Dissolve' | 'ConcaveHull' | 'BoundingBoxes' | 'Centroids';
|
|
2
2
|
export declare const processingList: string[];
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"description": "
|
|
4
|
-
"name": "
|
|
5
|
-
"
|
|
6
|
-
"
|
|
3
|
+
"description": "Buffer",
|
|
4
|
+
"name": "buffer",
|
|
5
|
+
"label": "Buffer",
|
|
6
|
+
"operationParams": [
|
|
7
|
+
"bufferDistance"
|
|
8
|
+
],
|
|
7
9
|
"operations": {
|
|
8
10
|
"gdalFunction": "ogr2ogr",
|
|
9
|
-
"sql": "SELECT
|
|
11
|
+
"sql": "SELECT ST_Union(ST_Buffer(geometry, {bufferDistance})) AS geometry, * FROM \"{layerName}\""
|
|
10
12
|
},
|
|
11
13
|
"type": "vector"
|
|
12
14
|
},
|
|
@@ -22,42 +24,29 @@
|
|
|
22
24
|
"type": "vector"
|
|
23
25
|
},
|
|
24
26
|
{
|
|
25
|
-
"description": "
|
|
26
|
-
"name": "
|
|
27
|
-
"operationParams": [
|
|
28
|
-
"pctconvex",
|
|
29
|
-
"allowHoles"
|
|
30
|
-
],
|
|
31
|
-
"label": "Concave Hull",
|
|
32
|
-
"operations": {
|
|
33
|
-
"sql": "SELECT ST_ConcaveHull(geometry,{pctconvex},{allowHoles}) AS geometry, * FROM \"{layerName}\"",
|
|
34
|
-
"gdalFunction": "ogr2ogr"
|
|
35
|
-
},
|
|
36
|
-
"type": "vector"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"description": "Buffer",
|
|
40
|
-
"name": "buffer",
|
|
41
|
-
"label": "Buffer",
|
|
27
|
+
"description": "Dissolve",
|
|
28
|
+
"name": "dissolve",
|
|
42
29
|
"operationParams": [
|
|
43
|
-
"
|
|
30
|
+
"dissolveField"
|
|
44
31
|
],
|
|
32
|
+
"label": "Dissolve",
|
|
45
33
|
"operations": {
|
|
46
34
|
"gdalFunction": "ogr2ogr",
|
|
47
|
-
"sql": "SELECT ST_Union(
|
|
35
|
+
"sql": "SELECT ST_Union(geometry) AS geometry, {dissolveField} FROM \"{layerName}\" GROUP BY {dissolveField}"
|
|
48
36
|
},
|
|
49
37
|
"type": "vector"
|
|
50
38
|
},
|
|
51
39
|
{
|
|
52
|
-
"description": "
|
|
53
|
-
"name": "
|
|
40
|
+
"description": "ConcaveHull",
|
|
41
|
+
"name": "concaveHull",
|
|
54
42
|
"operationParams": [
|
|
55
|
-
"
|
|
43
|
+
"pctconvex",
|
|
44
|
+
"allowHoles"
|
|
56
45
|
],
|
|
57
|
-
"label": "
|
|
46
|
+
"label": "Concave Hull",
|
|
58
47
|
"operations": {
|
|
59
|
-
"
|
|
60
|
-
"
|
|
48
|
+
"sql": "SELECT ST_ConcaveHull(geometry,{pctconvex},{allowHoles}) AS geometry, * FROM \"{layerName}\"",
|
|
49
|
+
"gdalFunction": "ogr2ogr"
|
|
61
50
|
},
|
|
62
51
|
"type": "vector"
|
|
63
52
|
},
|
|
@@ -71,5 +60,16 @@
|
|
|
71
60
|
"gdalFunction": "ogr2ogr"
|
|
72
61
|
},
|
|
73
62
|
"type": "vector"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"description": "Centroids",
|
|
66
|
+
"name": "centroids",
|
|
67
|
+
"operationParams": [],
|
|
68
|
+
"label": "Centroids",
|
|
69
|
+
"operations": {
|
|
70
|
+
"gdalFunction": "ogr2ogr",
|
|
71
|
+
"sql": "SELECT ST_Centroid(geometry) AS geometry, * FROM \"{layerName}\""
|
|
72
|
+
},
|
|
73
|
+
"type": "vector"
|
|
74
74
|
}
|
|
75
75
|
]
|
|
@@ -164,6 +164,12 @@
|
|
|
164
164
|
"type": "string"
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
|
+
"showGradient": {
|
|
168
|
+
"type": "boolean",
|
|
169
|
+
"title": "Use gradient background",
|
|
170
|
+
"description": "Toggle the gradient background in presentation mode.",
|
|
171
|
+
"default": true
|
|
172
|
+
},
|
|
167
173
|
"presentationBgColor": {
|
|
168
174
|
"type": "string",
|
|
169
175
|
"title": "Presentation Background Color",
|
|
@@ -33,8 +33,7 @@
|
|
|
33
33
|
"default": "Single Symbol"
|
|
34
34
|
},
|
|
35
35
|
"value": {
|
|
36
|
-
"type": "string"
|
|
37
|
-
"default": ""
|
|
36
|
+
"type": "string"
|
|
38
37
|
},
|
|
39
38
|
"method": {
|
|
40
39
|
"type": "string",
|
|
@@ -68,7 +67,6 @@
|
|
|
68
67
|
"additionalProperties": false,
|
|
69
68
|
"default": {
|
|
70
69
|
"renderType": "Single Symbol",
|
|
71
|
-
"value": "",
|
|
72
70
|
"method": "color",
|
|
73
71
|
"colorRamp": "viridis",
|
|
74
72
|
"nClasses": "9",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"properties": {
|
|
56
56
|
"renderType": {
|
|
57
57
|
"type": "string",
|
|
58
|
-
"default": "
|
|
58
|
+
"default": "Singleband Pseudocolor"
|
|
59
59
|
},
|
|
60
60
|
"band": {
|
|
61
61
|
"type": "number",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
},
|
|
99
99
|
"additionalProperties": false,
|
|
100
100
|
"default": {
|
|
101
|
-
"renderType": "
|
|
101
|
+
"renderType": "Singleband Pseudocolor",
|
|
102
102
|
"band": 1,
|
|
103
103
|
"redBand": 1,
|
|
104
104
|
"greenBand": 2,
|
|
@@ -6,20 +6,13 @@
|
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"properties": {
|
|
8
8
|
"path": {
|
|
9
|
-
"type": "string",
|
|
10
|
-
"description": "The local path to a GeoJSON file"
|
|
11
|
-
"default": ""
|
|
9
|
+
"type": ["string", "null"],
|
|
10
|
+
"description": "The local path to a GeoJSON file"
|
|
12
11
|
},
|
|
13
12
|
"data": {
|
|
14
13
|
"type": "object",
|
|
15
14
|
"description": "The GeoJSON data",
|
|
16
15
|
"$ref": "./geojson.json"
|
|
17
|
-
},
|
|
18
|
-
"valid": {
|
|
19
|
-
"type": "boolean",
|
|
20
|
-
"description": "Whether the data are valid or not",
|
|
21
|
-
"readOnly": true,
|
|
22
|
-
"default": false
|
|
23
16
|
}
|
|
24
17
|
}
|
|
25
18
|
}
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
"properties": {
|
|
8
8
|
"url": {
|
|
9
9
|
"type": "string",
|
|
10
|
-
"description": "The url to the tile provider"
|
|
11
|
-
"default": ""
|
|
10
|
+
"description": "The url to the tile provider"
|
|
12
11
|
},
|
|
13
12
|
"minZoom": {
|
|
14
13
|
"type": "number",
|
|
@@ -58,6 +57,7 @@
|
|
|
58
57
|
},
|
|
59
58
|
"urlParameters": {
|
|
60
59
|
"type": "object",
|
|
60
|
+
"title": "URL parameters",
|
|
61
61
|
"additionalProperties": {
|
|
62
62
|
"type": "string"
|
|
63
63
|
},
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"interpolate": {
|
|
67
67
|
"type": "boolean",
|
|
68
|
+
"title": "Interpolate",
|
|
68
69
|
"description": "Interpolate between grid cells when overzooming?",
|
|
69
70
|
"default": false
|
|
70
71
|
}
|