@jupytergis/schema 0.6.2 → 0.8.0
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 +27 -3
- package/lib/_interface/project/jgis.d.ts +2 -1
- package/lib/_interface/project/sources/geoParquetSource.d.ts +24 -0
- package/lib/interfaces.d.ts +8 -0
- package/lib/model.d.ts +9 -0
- package/lib/model.js +13 -0
- package/lib/schema/project/jgis.json +2 -1
- package/lib/schema/project/layers/heatmapLayer.json +1 -1
- package/lib/schema/project/layers/vectorLayer.json +1 -1
- package/lib/schema/project/layers/webGlLayer.json +1 -1
- package/lib/schema/project/sources/geoParquetSource.json +24 -0
- package/lib/types.d.ts +1 -0
- package/lib/types.js +1 -0
- package/package.json +1 -1
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
},
|
|
216
216
|
"colorRamp": {
|
|
217
217
|
"type": "string",
|
|
218
|
-
"default": "
|
|
218
|
+
"default": "viridis"
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
}
|
|
@@ -352,7 +352,7 @@
|
|
|
352
352
|
},
|
|
353
353
|
"colorRamp": {
|
|
354
354
|
"type": "string",
|
|
355
|
-
"default": "
|
|
355
|
+
"default": "viridis"
|
|
356
356
|
},
|
|
357
357
|
"nClasses": {
|
|
358
358
|
"type": "string",
|
|
@@ -503,7 +503,7 @@
|
|
|
503
503
|
},
|
|
504
504
|
"colorRamp": {
|
|
505
505
|
"type": "string",
|
|
506
|
-
"default": "
|
|
506
|
+
"default": "viridis"
|
|
507
507
|
},
|
|
508
508
|
"nClasses": {
|
|
509
509
|
"type": "string",
|
|
@@ -523,6 +523,30 @@
|
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
525
|
},
|
|
526
|
+
"GeoParquetSource": {
|
|
527
|
+
"type": "object",
|
|
528
|
+
"required": [
|
|
529
|
+
"path"
|
|
530
|
+
],
|
|
531
|
+
"additionalProperties": false,
|
|
532
|
+
"properties": {
|
|
533
|
+
"path": {
|
|
534
|
+
"type": "string",
|
|
535
|
+
"description": "The path to the GeoParquet source"
|
|
536
|
+
},
|
|
537
|
+
"attribution": {
|
|
538
|
+
"type": "string",
|
|
539
|
+
"readOnly": true,
|
|
540
|
+
"description": "The attribution for the GeoParquet source.",
|
|
541
|
+
"default": ""
|
|
542
|
+
},
|
|
543
|
+
"projection": {
|
|
544
|
+
"type": "string",
|
|
545
|
+
"description": "The projection information for the GeoParquet data (optional).",
|
|
546
|
+
"default": "EPSG:4326"
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
},
|
|
526
550
|
"GeoTiffSource": {
|
|
527
551
|
"type": "object",
|
|
528
552
|
"required": [
|
|
@@ -30,7 +30,8 @@ export type SourceType =
|
|
|
30
30
|
| "VideoSource"
|
|
31
31
|
| "ImageSource"
|
|
32
32
|
| "ShapefileSource"
|
|
33
|
-
| "GeoTiffSource"
|
|
33
|
+
| "GeoTiffSource"
|
|
34
|
+
| "GeoParquetSource";
|
|
34
35
|
/**
|
|
35
36
|
* This interface was referenced by `IJGISContent`'s JSON-Schema
|
|
36
37
|
* via the `definition` "jGISLayerItem".
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated by json-schema-to-typescript.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
5
|
+
* and run json-schema-to-typescript to regenerate this file.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* GeoParquetSource
|
|
10
|
+
*/
|
|
11
|
+
export interface IGeoParquetSource {
|
|
12
|
+
/**
|
|
13
|
+
* The path to the GeoParquet source
|
|
14
|
+
*/
|
|
15
|
+
path: string;
|
|
16
|
+
/**
|
|
17
|
+
* The attribution for the GeoParquet source.
|
|
18
|
+
*/
|
|
19
|
+
attribution?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The projection information for the GeoParquet data (optional).
|
|
22
|
+
*/
|
|
23
|
+
projection?: string;
|
|
24
|
+
}
|
package/lib/interfaces.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { Contents, User } from '@jupyterlab/services';
|
|
|
7
7
|
import { JSONObject } from '@lumino/coreutils';
|
|
8
8
|
import { ISignal, Signal } from '@lumino/signaling';
|
|
9
9
|
import { SplitPanel } from '@lumino/widgets';
|
|
10
|
+
import { FeatureLike } from 'ol/Feature';
|
|
10
11
|
import { IJGISContent, IJGISLayer, IJGISLayerGroup, IJGISLayerItem, IJGISLayers, IJGISLayerTree, IJGISOptions, IJGISSource, IJGISSources, SourceType } from './_interface/project/jgis';
|
|
11
12
|
import { IRasterSource } from './_interface/project/sources/rasterSource';
|
|
12
13
|
export { IGeoJSONSource } from './_interface/project/sources/geoJsonSource';
|
|
@@ -148,6 +149,13 @@ export interface IJupyterGISModel extends DocumentRegistry.IModel {
|
|
|
148
149
|
contentsManager: Contents.IManager | undefined;
|
|
149
150
|
filePath: string;
|
|
150
151
|
pathChanged: ISignal<IJupyterGISModel, string>;
|
|
152
|
+
getFeaturesForCurrentTile: ({ sourceId, }: {
|
|
153
|
+
sourceId: string;
|
|
154
|
+
}) => FeatureLike[];
|
|
155
|
+
syncTileFeatures: ({ sourceId, features, }: {
|
|
156
|
+
sourceId: string;
|
|
157
|
+
features: FeatureLike[];
|
|
158
|
+
}) => void;
|
|
151
159
|
getSettings(): IJupyterGISSettings;
|
|
152
160
|
getContent(): IJGISContent;
|
|
153
161
|
getLayers(): IJGISLayers;
|
package/lib/model.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { Contents } from '@jupyterlab/services';
|
|
|
5
5
|
import { ISettingRegistry } from '@jupyterlab/settingregistry';
|
|
6
6
|
import { PartialJSONObject } from '@lumino/coreutils';
|
|
7
7
|
import { ISignal, Signal } from '@lumino/signaling';
|
|
8
|
+
import { FeatureLike } from 'ol/Feature';
|
|
8
9
|
import { IJGISContent, IJGISLayer, IJGISLayerGroup, IJGISLayerTree, IJGISLayers, IJGISOptions, IJGISSource, IJGISSources } from './_interface/project/jgis';
|
|
9
10
|
import { IAnnotationModel, IDict, IJGISLayerDocChange, IJGISLayerTreeDocChange, IJGISSourceDocChange, IJupyterGISClientState, IJupyterGISDoc, IJupyterGISModel, ISelection, IUserData, IViewPortState, JgisCoordinates, Pointer, IJupyterGISSettings } from './interfaces';
|
|
10
11
|
export declare class JupyterGISModel implements IJupyterGISModel {
|
|
@@ -14,6 +15,13 @@ export declare class JupyterGISModel implements IJupyterGISModel {
|
|
|
14
15
|
*/
|
|
15
16
|
initSettings(): Promise<void>;
|
|
16
17
|
getSettings(): IJupyterGISSettings;
|
|
18
|
+
getFeaturesForCurrentTile({ sourceId }: {
|
|
19
|
+
sourceId: string;
|
|
20
|
+
}): FeatureLike[];
|
|
21
|
+
syncTileFeatures({ sourceId, features, }: {
|
|
22
|
+
sourceId: string;
|
|
23
|
+
features: FeatureLike[];
|
|
24
|
+
}): void;
|
|
17
25
|
private _onSharedModelChanged;
|
|
18
26
|
readonly collaborative: boolean;
|
|
19
27
|
get sharedModel(): IJupyterGISDoc;
|
|
@@ -184,6 +192,7 @@ export declare class JupyterGISModel implements IJupyterGISModel {
|
|
|
184
192
|
static worker: Worker;
|
|
185
193
|
private _geolocation;
|
|
186
194
|
private _geolocationChanged;
|
|
195
|
+
private _tileFeatureCache;
|
|
187
196
|
}
|
|
188
197
|
export declare namespace JupyterGISModel {
|
|
189
198
|
/**
|
package/lib/model.js
CHANGED
|
@@ -47,6 +47,7 @@ export class JupyterGISModel {
|
|
|
47
47
|
this._isIdentifying = false;
|
|
48
48
|
this._isTemporalControllerActive = false;
|
|
49
49
|
this._geolocationChanged = new Signal(this);
|
|
50
|
+
this._tileFeatureCache = new Map();
|
|
50
51
|
const { annotationModel, sharedModel, settingRegistry } = options;
|
|
51
52
|
if (sharedModel) {
|
|
52
53
|
this._sharedModel = sharedModel;
|
|
@@ -77,6 +78,18 @@ export class JupyterGISModel {
|
|
|
77
78
|
getSettings() {
|
|
78
79
|
return this._settings;
|
|
79
80
|
}
|
|
81
|
+
getFeaturesForCurrentTile({ sourceId }) {
|
|
82
|
+
var _a;
|
|
83
|
+
return Array.from((_a = this._tileFeatureCache.get(sourceId)) !== null && _a !== void 0 ? _a : []);
|
|
84
|
+
}
|
|
85
|
+
syncTileFeatures({ sourceId, features, }) {
|
|
86
|
+
let featureSet = this._tileFeatureCache.get(sourceId);
|
|
87
|
+
if (!featureSet) {
|
|
88
|
+
featureSet = new Set();
|
|
89
|
+
this._tileFeatureCache.set(sourceId, featureSet);
|
|
90
|
+
}
|
|
91
|
+
features.forEach(feature => featureSet.add(feature));
|
|
92
|
+
}
|
|
80
93
|
get sharedModel() {
|
|
81
94
|
return this._sharedModel;
|
|
82
95
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"description": "GeoParquetSource",
|
|
4
|
+
"title": "IGeoParquetSource",
|
|
5
|
+
"required": ["path"],
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"path": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The path to the GeoParquet source"
|
|
11
|
+
},
|
|
12
|
+
"attribution": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"readOnly": true,
|
|
15
|
+
"description": "The attribution for the GeoParquet source.",
|
|
16
|
+
"default": ""
|
|
17
|
+
},
|
|
18
|
+
"projection": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "The projection information for the GeoParquet data (optional).",
|
|
21
|
+
"default": "EPSG:4326"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
package/lib/types.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './_interface/project/sources/rasterSource';
|
|
|
7
7
|
export * from './_interface/project/sources/shapefileSource';
|
|
8
8
|
export * from './_interface/project/sources/vectorTileSource';
|
|
9
9
|
export * from './_interface/project/sources/videoSource';
|
|
10
|
+
export * from './_interface/project/sources/geoParquetSource';
|
|
10
11
|
export * from './_interface/project/layers/heatmapLayer';
|
|
11
12
|
export * from './_interface/project/layers/hillshadeLayer';
|
|
12
13
|
export * from './_interface/project/layers/rasterLayer';
|
package/lib/types.js
CHANGED
|
@@ -8,6 +8,7 @@ export * from './_interface/project/sources/rasterSource';
|
|
|
8
8
|
export * from './_interface/project/sources/shapefileSource';
|
|
9
9
|
export * from './_interface/project/sources/vectorTileSource';
|
|
10
10
|
export * from './_interface/project/sources/videoSource';
|
|
11
|
+
export * from './_interface/project/sources/geoParquetSource';
|
|
11
12
|
// Layers
|
|
12
13
|
export * from './_interface/project/layers/heatmapLayer';
|
|
13
14
|
export * from './_interface/project/layers/hillshadeLayer';
|