@jupytergis/schema 0.16.0-alpha.0 → 0.16.0-alpha.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.
@@ -311,78 +311,6 @@
311
311
  }
312
312
  }
313
313
  },
314
- "HeatmapLayer": {
315
- "type": "object",
316
- "required": [
317
- "source",
318
- "blur",
319
- "radius"
320
- ],
321
- "additionalProperties": false,
322
- "properties": {
323
- "source": {
324
- "type": "string",
325
- "description": "The id of the source"
326
- },
327
- "opacity": {
328
- "type": "number",
329
- "description": "The opacity of the source",
330
- "default": 1,
331
- "multipleOf": 0.1,
332
- "minimum": 0,
333
- "maximum": 1
334
- },
335
- "radius": {
336
- "type": "number",
337
- "description": "Radius size in pixels",
338
- "default": 8
339
- },
340
- "blur": {
341
- "type": "number",
342
- "description": "Blur size in pixels",
343
- "default": 15
344
- },
345
- "color": {
346
- "type": "array",
347
- "description": "DEPRECATED. Legacy gradient cache. New files should not set this; symbologyState.gradient is the source of truth. Retained only so that legacy .jGIS files can be migrated on load.",
348
- "items": {
349
- "type": "string"
350
- },
351
- "default": [
352
- "#00f",
353
- "#0ff",
354
- "#0f0",
355
- "#ff0",
356
- "#f00"
357
- ]
358
- },
359
- "symbologyState": {
360
- "type": "object",
361
- "description": "The symbology configuration. Source of truth for how the heatmap is rendered.",
362
- "required": [
363
- "renderType"
364
- ],
365
- "properties": {
366
- "renderType": {
367
- "type": "string",
368
- "default": "Heatmap"
369
- },
370
- "colorRamp": {
371
- "type": "string",
372
- "default": "viridis"
373
- },
374
- "gradient": {
375
- "type": "array",
376
- "description": "Ordered list of CSS color strings used to build the heatmap gradient.",
377
- "items": {
378
- "type": "string"
379
- }
380
- }
381
- },
382
- "default": {}
383
- }
384
- }
385
- },
386
314
  "HillshadeLayer": {
387
315
  "type": "object",
388
316
  "required": [
@@ -16,7 +16,6 @@ export type LayerType =
16
16
  | "HillshadeLayer"
17
17
  | "GeoTiffLayer"
18
18
  | "ImageLayer"
19
- | "HeatmapLayer"
20
19
  | "StacLayer"
21
20
  | "StorySegmentLayer"
22
21
  | "OpenEOTileLayer";
package/lib/doc.d.ts CHANGED
@@ -10,7 +10,7 @@ export declare class JupyterGISDoc extends YDocument<IJupyterGISDocChange> imple
10
10
  constructor();
11
11
  get initialSyncReady(): Promise<void>;
12
12
  private _onOptionsObserverFired;
13
- getSource(): JSONObject;
13
+ getSource(): string;
14
14
  setSource(value: JSONObject | string): void;
15
15
  dispose(): void;
16
16
  get version(): string;
package/lib/doc.js CHANGED
@@ -101,7 +101,7 @@ export class JupyterGISDoc extends YDocument {
101
101
  const stories = this._stories.toJSON();
102
102
  const viewState = this._viewState.toJSON();
103
103
  const metadata = this._metadata.toJSON();
104
- return {
104
+ return JSON.stringify({
105
105
  layers,
106
106
  layerTree,
107
107
  sources,
@@ -109,7 +109,7 @@ export class JupyterGISDoc extends YDocument {
109
109
  viewState,
110
110
  options,
111
111
  metadata,
112
- };
112
+ }, null, ' ');
113
113
  }
114
114
  setSource(value) {
115
115
  if (!value) {
@@ -10,7 +10,7 @@ import { ISignal, Signal } from '@lumino/signaling';
10
10
  import { SplitPanel } from '@lumino/widgets';
11
11
  import { FeatureLike } from 'ol/Feature';
12
12
  import { IJGISContent, IJGISLayer, IJGISLayerGroup, IJGISLayerItem, IJGISLayers, IJGISLayerTree, IJGISOptions, IJGISSource, IJGISSources, IJGISStoryMap, IJGISViewState, LayerType, SourceType } from './_interface/project/jgis';
13
- import { IGeoJSONSource, IGeoParquetSource, IGeoTiffSource, IHeatmapLayer, IHillshadeLayer, IImageLayer, IImageSource, IMarkerSource, IRasterDemSource, IRasterLayer, IRasterSource, IOpenEOTileLayer, IOpenEOTileSource, IShapefileSource, IStacLayer, IStorySegmentLayer, IVectorLayer, IVectorTileLayer, IVectorTileSource, IVideoSource, IGeoTiffLayer, Modes } from './types';
13
+ import { IGeoJSONSource, IGeoParquetSource, IGeoTiffSource, IHillshadeLayer, IImageLayer, IImageSource, IMarkerSource, IRasterDemSource, IRasterLayer, IRasterSource, IOpenEOTileLayer, IOpenEOTileSource, IShapefileSource, IStacLayer, IStorySegmentLayer, IVectorLayer, IVectorTileLayer, IVectorTileSource, IVideoSource, IGeoTiffLayer, Modes } from './types';
14
14
  export type { IGeoJSONSource } from './_interface/project/sources/geoJsonSource';
15
15
  export interface IJGISUIState {
16
16
  leftPanelOpen?: boolean;
@@ -138,7 +138,7 @@ export interface IJupyterGISDoc extends YDocument<IJupyterGISDocChange> {
138
138
  metadata: any;
139
139
  readonly editable: boolean;
140
140
  readonly toJGISEndpoint?: string;
141
- getSource(): JSONObject;
141
+ getSource(): string;
142
142
  setSource(value: JSONObject | string): void;
143
143
  layerExists(id: string): boolean;
144
144
  getLayer(id: string): IJGISLayer | undefined;
@@ -370,7 +370,7 @@ export type ILayerGalleryEntry = {
370
370
  name: string;
371
371
  thumbnail: string;
372
372
  layerType: LayerType;
373
- layerParameters: IHeatmapLayer | IHillshadeLayer | IImageLayer | IRasterLayer | IStacLayer | IStorySegmentLayer | IVectorLayer | IVectorTileLayer | IGeoTiffLayer | IOpenEOTileLayer;
373
+ layerParameters: IHillshadeLayer | IImageLayer | IRasterLayer | IStacLayer | IStorySegmentLayer | IVectorLayer | IVectorTileLayer | IGeoTiffLayer | IOpenEOTileLayer;
374
374
  sourceType: SourceType;
375
375
  sourceParameters: IGeoJSONSource | IGeoParquetSource | IGeoTiffSource | IImageSource | IMarkerSource | IRasterDemSource | IRasterSource | IShapefileSource | IVectorTileSource | IVideoSource | IOpenEOTileSource;
376
376
  provider: string;
@@ -1,10 +1,10 @@
1
- export * from '../../_interface/processing/clipRasterByExtent';
1
+ export * from '../../_interface/processing/concaveHull';
2
2
  export * from '../../_interface/processing/centroids';
3
- export * from '../../_interface/processing/dissolve';
4
- export * from '../../_interface/processing/rasterize';
3
+ export * from '../../_interface/processing/clipRasterByVector';
4
+ export * from '../../_interface/processing/boundingBoxes';
5
+ export * from '../../_interface/processing/convexHull';
5
6
  export * from '../../_interface/processing/clipVectorByMaskLayer';
6
- export * from '../../_interface/processing/concaveHull';
7
+ export * from '../../_interface/processing/clipRasterByExtent';
8
+ export * from '../../_interface/processing/rasterize';
7
9
  export * from '../../_interface/processing/buffer';
8
- export * from '../../_interface/processing/convexHull';
9
- export * from '../../_interface/processing/boundingBoxes';
10
- export * from '../../_interface/processing/clipRasterByVector';
10
+ export * from '../../_interface/processing/dissolve';
@@ -1,11 +1,11 @@
1
1
  //Generated automatically please don't modify directly
2
- export * from '../../_interface/processing/clipRasterByExtent';
2
+ export * from '../../_interface/processing/concaveHull';
3
3
  export * from '../../_interface/processing/centroids';
4
- export * from '../../_interface/processing/dissolve';
5
- export * from '../../_interface/processing/rasterize';
4
+ export * from '../../_interface/processing/clipRasterByVector';
5
+ export * from '../../_interface/processing/boundingBoxes';
6
+ export * from '../../_interface/processing/convexHull';
6
7
  export * from '../../_interface/processing/clipVectorByMaskLayer';
7
- export * from '../../_interface/processing/concaveHull';
8
+ export * from '../../_interface/processing/clipRasterByExtent';
9
+ export * from '../../_interface/processing/rasterize';
8
10
  export * from '../../_interface/processing/buffer';
9
- export * from '../../_interface/processing/convexHull';
10
- export * from '../../_interface/processing/boundingBoxes';
11
- export * from '../../_interface/processing/clipRasterByVector';
11
+ export * from '../../_interface/processing/dissolve';
@@ -1,2 +1,2 @@
1
- export type ProcessingType = 'ClipRasterByExtent' | 'Centroids' | 'Dissolve' | 'Rasterize' | 'ClipVectorByMaskLayer' | 'ConcaveHull' | 'Buffer' | 'ConvexHull' | 'BoundingBoxes' | 'ClipRasterByVector';
1
+ export type ProcessingType = 'ConcaveHull' | 'Centroids' | 'ClipRasterByVector' | 'BoundingBoxes' | 'ConvexHull' | 'ClipVectorByMaskLayer' | 'ClipRasterByExtent' | 'Rasterize' | 'Buffer' | 'Dissolve';
2
2
  export declare const processingList: string[];
@@ -1,12 +1,12 @@
1
1
  export const processingList = [
2
- 'ClipRasterByExtent',
2
+ 'ConcaveHull',
3
3
  'Centroids',
4
- 'Dissolve',
5
- 'Rasterize',
4
+ 'ClipRasterByVector',
5
+ 'BoundingBoxes',
6
+ 'ConvexHull',
6
7
  'ClipVectorByMaskLayer',
7
- 'ConcaveHull',
8
+ 'ClipRasterByExtent',
9
+ 'Rasterize',
8
10
  'Buffer',
9
- 'ConvexHull',
10
- 'BoundingBoxes',
11
- 'ClipRasterByVector',
11
+ 'Dissolve',
12
12
  ];
@@ -1,18 +1,17 @@
1
1
  [
2
2
  {
3
- "description": "ClipRasterByExtent",
4
- "name": "clipRasterByExtent",
5
- "label": "Clip Raster by Extent",
3
+ "description": "ConcaveHull",
4
+ "name": "concaveHull",
6
5
  "operationParams": [
7
- "xMin",
8
- "yMin",
9
- "xMax",
10
- "yMax"
6
+ "pctconvex",
7
+ "allowHoles"
11
8
  ],
9
+ "label": "Concave Hull",
12
10
  "operations": {
13
- "gdalFunction": "gdal_translate"
11
+ "sql": "SELECT ST_ConcaveHull(geometry,{pctconvex},{allowHoles}) AS geometry, * FROM \"{layerName}\"",
12
+ "gdalFunction": "ogr2ogr"
14
13
  },
15
- "type": "rasterClip"
14
+ "type": "vector"
16
15
  },
17
16
  {
18
17
  "description": "Centroids",
@@ -26,32 +25,39 @@
26
25
  "type": "vector"
27
26
  },
28
27
  {
29
- "description": "Dissolve",
30
- "name": "dissolve",
28
+ "description": "ClipRasterByVector",
29
+ "name": "clipRasterByVector",
30
+ "label": "Clip Raster by Vector",
31
31
  "operationParams": [
32
- "dissolveField"
32
+ "clipLayer",
33
+ "cropToCutline"
33
34
  ],
34
- "label": "Dissolve",
35
35
  "operations": {
36
- "gdalFunction": "ogr2ogr",
37
- "sql": "SELECT ST_Union(geometry) AS geometry, {dissolveField} FROM \"{layerName}\" GROUP BY {dissolveField}"
36
+ "gdalFunction": "gdalwarp"
37
+ },
38
+ "type": "rasterClipVector"
39
+ },
40
+ {
41
+ "description": "BoundingBoxes",
42
+ "name": "boundingBoxes",
43
+ "operationParams": [],
44
+ "label": "Bounding Boxes",
45
+ "operations": {
46
+ "sql": "SELECT ST_Envelope(geometry) AS geometry, * FROM \"{layerName}\"",
47
+ "gdalFunction": "ogr2ogr"
38
48
  },
39
49
  "type": "vector"
40
50
  },
41
51
  {
42
- "description": "Rasterize",
43
- "name": "rasterize",
44
- "label": "Rasterize",
45
- "operationParams": [
46
- "pixelSize",
47
- "attributeField",
48
- "burnValue",
49
- "noDataValue"
50
- ],
52
+ "description": "ConvexHull",
53
+ "name": "convexHull",
54
+ "operationParams": [],
55
+ "label": "Convex Hull",
51
56
  "operations": {
52
- "gdalFunction": "gdal_rasterize"
57
+ "sql": "SELECT ST_ConvexHull(geometry) AS geometry, * FROM \"{layerName}\"",
58
+ "gdalFunction": "ogr2ogr"
53
59
  },
54
- "type": "raster"
60
+ "type": "vector"
55
61
  },
56
62
  {
57
63
  "description": "ClipVectorByMaskLayer",
@@ -66,18 +72,34 @@
66
72
  "type": "clip"
67
73
  },
68
74
  {
69
- "description": "ConcaveHull",
70
- "name": "concaveHull",
75
+ "description": "ClipRasterByExtent",
76
+ "name": "clipRasterByExtent",
77
+ "label": "Clip Raster by Extent",
71
78
  "operationParams": [
72
- "pctconvex",
73
- "allowHoles"
79
+ "xMin",
80
+ "yMin",
81
+ "xMax",
82
+ "yMax"
74
83
  ],
75
- "label": "Concave Hull",
76
84
  "operations": {
77
- "sql": "SELECT ST_ConcaveHull(geometry,{pctconvex},{allowHoles}) AS geometry, * FROM \"{layerName}\"",
78
- "gdalFunction": "ogr2ogr"
85
+ "gdalFunction": "gdal_translate"
79
86
  },
80
- "type": "vector"
87
+ "type": "rasterClip"
88
+ },
89
+ {
90
+ "description": "Rasterize",
91
+ "name": "rasterize",
92
+ "label": "Rasterize",
93
+ "operationParams": [
94
+ "pixelSize",
95
+ "attributeField",
96
+ "burnValue",
97
+ "noDataValue"
98
+ ],
99
+ "operations": {
100
+ "gdalFunction": "gdal_rasterize"
101
+ },
102
+ "type": "raster"
81
103
  },
82
104
  {
83
105
  "description": "Buffer",
@@ -93,38 +115,16 @@
93
115
  "type": "vector"
94
116
  },
95
117
  {
96
- "description": "ConvexHull",
97
- "name": "convexHull",
98
- "operationParams": [],
99
- "label": "Convex Hull",
100
- "operations": {
101
- "sql": "SELECT ST_ConvexHull(geometry) AS geometry, * FROM \"{layerName}\"",
102
- "gdalFunction": "ogr2ogr"
103
- },
104
- "type": "vector"
105
- },
106
- {
107
- "description": "BoundingBoxes",
108
- "name": "boundingBoxes",
109
- "operationParams": [],
110
- "label": "Bounding Boxes",
111
- "operations": {
112
- "sql": "SELECT ST_Envelope(geometry) AS geometry, * FROM \"{layerName}\"",
113
- "gdalFunction": "ogr2ogr"
114
- },
115
- "type": "vector"
116
- },
117
- {
118
- "description": "ClipRasterByVector",
119
- "name": "clipRasterByVector",
120
- "label": "Clip Raster by Vector",
118
+ "description": "Dissolve",
119
+ "name": "dissolve",
121
120
  "operationParams": [
122
- "clipLayer",
123
- "cropToCutline"
121
+ "dissolveField"
124
122
  ],
123
+ "label": "Dissolve",
125
124
  "operations": {
126
- "gdalFunction": "gdalwarp"
125
+ "gdalFunction": "ogr2ogr",
126
+ "sql": "SELECT ST_Union(geometry) AS geometry, {dissolveField} FROM \"{layerName}\" GROUP BY {dissolveField}"
127
127
  },
128
- "type": "rasterClipVector"
128
+ "type": "vector"
129
129
  }
130
130
  ]
@@ -46,7 +46,6 @@
46
46
  "HillshadeLayer",
47
47
  "GeoTiffLayer",
48
48
  "ImageLayer",
49
- "HeatmapLayer",
50
49
  "StacLayer",
51
50
  "StorySegmentLayer",
52
51
  "OpenEOTileLayer"
package/lib/types.d.ts CHANGED
@@ -13,7 +13,6 @@ export * from './_interface/project/sources/geoParquetSource';
13
13
  export * from './_interface/project/sources/markerSource';
14
14
  export * from './_interface/project/sources/wmsTileSource';
15
15
  export * from './_interface/project/sources/openeoTileSource';
16
- export * from './_interface/project/layers/heatmapLayer';
17
16
  export * from './_interface/project/layers/hillshadeLayer';
18
17
  export * from './_interface/project/layers/storySegmentLayer';
19
18
  export * from './_interface/project/layers/rasterLayer';
@@ -29,7 +28,7 @@ import type { IGrammarLayer } from './_interface/project/symbology';
29
28
  export interface IGrammarSymbologyState {
30
29
  /**
31
30
  * Ordered list of independent rendering layers sharing the same source.
32
- * Each layer produces one renderer layer (VectorLayer, HeatmapLayer, etc.).
31
+ * Each layer produces one renderer layer (Vector, Image, WebGLTile, etc.).
33
32
  * Layers are rendered in order (first = bottom).
34
33
  */
35
34
  layers: IGrammarLayer[];
package/lib/types.js CHANGED
@@ -15,7 +15,6 @@ export * from './_interface/project/sources/markerSource';
15
15
  export * from './_interface/project/sources/wmsTileSource';
16
16
  export * from './_interface/project/sources/openeoTileSource';
17
17
  // Layers
18
- export * from './_interface/project/layers/heatmapLayer';
19
18
  export * from './_interface/project/layers/hillshadeLayer';
20
19
  export * from './_interface/project/layers/storySegmentLayer';
21
20
  export * from './_interface/project/layers/rasterLayer';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupytergis/schema",
3
- "version": "0.16.0-alpha.0",
3
+ "version": "0.16.0-alpha.1",
4
4
  "description": "A JupyterGIS schema package.",
5
5
  "keywords": [
6
6
  "jupytergis"
@@ -1,44 +0,0 @@
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
- * HeatmapLayer
10
- */
11
- export interface IHeatmapLayer {
12
- /**
13
- * The id of the source
14
- */
15
- source: string;
16
- /**
17
- * The opacity of the source
18
- */
19
- opacity?: number;
20
- /**
21
- * Radius size in pixels
22
- */
23
- radius: number;
24
- /**
25
- * Blur size in pixels
26
- */
27
- blur: number;
28
- /**
29
- * DEPRECATED. Legacy gradient cache. New files should not set this; symbologyState.gradient is the source of truth. Retained only so that legacy .jGIS files can be migrated on load.
30
- */
31
- color?: string[];
32
- /**
33
- * The symbology configuration. Source of truth for how the heatmap is rendered.
34
- */
35
- symbologyState?: {
36
- renderType: string;
37
- colorRamp?: string;
38
- /**
39
- * Ordered list of CSS color strings used to build the heatmap gradient.
40
- */
41
- gradient?: string[];
42
- [k: string]: any;
43
- };
44
- }
@@ -1,60 +0,0 @@
1
- {
2
- "type": "object",
3
- "description": "HeatmapLayer",
4
- "title": "IHeatmapLayer",
5
- "required": ["source", "blur", "radius"],
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
- "radius": {
21
- "type": "number",
22
- "description": "Radius size in pixels",
23
- "default": 8
24
- },
25
- "blur": {
26
- "type": "number",
27
- "description": "Blur size in pixels",
28
- "default": 15
29
- },
30
- "color": {
31
- "type": "array",
32
- "description": "DEPRECATED. Legacy gradient cache. New files should not set this; symbologyState.gradient is the source of truth. Retained only so that legacy .jGIS files can be migrated on load.",
33
- "items": {
34
- "type": "string"
35
- },
36
- "default": ["#00f", "#0ff", "#0f0", "#ff0", "#f00"]
37
- },
38
- "symbologyState": {
39
- "type": "object",
40
- "description": "The symbology configuration. Source of truth for how the heatmap is rendered.",
41
- "required": ["renderType"],
42
- "properties": {
43
- "renderType": {
44
- "type": "string",
45
- "default": "Heatmap"
46
- },
47
- "colorRamp": {
48
- "type": "string",
49
- "default": "viridis"
50
- },
51
- "gradient": {
52
- "type": "array",
53
- "description": "Ordered list of CSS color strings used to build the heatmap gradient.",
54
- "items": { "type": "string" }
55
- }
56
- },
57
- "default": {}
58
- }
59
- }
60
- }