@jupytergis/base 0.1.1 → 0.1.3
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/commands.d.ts +1 -1
- package/lib/commands.js +1 -10
- package/lib/dialogs/components/symbology/Graduated.d.ts +4 -0
- package/lib/dialogs/components/symbology/Graduated.js +188 -0
- package/lib/dialogs/components/symbology/SimpleSymbol.d.ts +4 -0
- package/lib/dialogs/components/symbology/SimpleSymbol.js +108 -0
- package/lib/dialogs/components/symbology/SingleBandPseudoColor.d.ts +0 -4
- package/lib/dialogs/components/symbology/SingleBandPseudoColor.js +22 -26
- package/lib/dialogs/components/symbology/StopRow.d.ts +4 -3
- package/lib/dialogs/components/symbology/StopRow.js +14 -9
- package/lib/dialogs/components/symbology/VectorRendering.d.ts +4 -0
- package/lib/dialogs/components/symbology/VectorRendering.js +55 -0
- package/lib/dialogs/symbologyDialog.d.ts +4 -0
- package/lib/dialogs/symbologyDialog.js +5 -0
- package/lib/formbuilder/objectform/vectorlayerform.js +1 -3
- package/lib/gdal.d.ts +1 -0
- package/lib/gdal.js +15 -0
- package/lib/gdal3WebAssembly.data +97604 -44
- package/lib/gdal3WebAssembly.wasm +0 -0
- package/lib/icons.d.ts +3 -0
- package/lib/icons.js +15 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/mainview/mainView.d.ts +6 -3
- package/lib/mainview/mainView.js +91 -77
- package/lib/panelview/components/layers.js +3 -3
- package/lib/toolbar/usertoolbaritem.js +3 -1
- package/lib/tools.d.ts +9 -0
- package/lib/tools.js +38 -0
- package/package.json +7 -5
- package/style/icons/logo.svg +3 -0
- package/style/icons/logo_mini.svg +248 -0
- package/style/icons/logo_mini_alternative.svg +49 -0
- package/style/symbologyDialog.css +11 -3
|
@@ -3,6 +3,7 @@ import { PromiseDelegate } from '@lumino/coreutils';
|
|
|
3
3
|
import { Signal } from '@lumino/signaling';
|
|
4
4
|
import React, { useEffect, useState } from 'react';
|
|
5
5
|
import BandRendering from './components/symbology/BandRendering';
|
|
6
|
+
import VectorRendering from './components/symbology/VectorRendering';
|
|
6
7
|
const SymbologyDialog = ({ context, state, okSignalPromise, cancel }) => {
|
|
7
8
|
const [selectedLayer, setSelectedLayer] = useState(null);
|
|
8
9
|
const [componentToRender, setComponentToRender] = useState(null);
|
|
@@ -33,6 +34,10 @@ const SymbologyDialog = ({ context, state, okSignalPromise, cancel }) => {
|
|
|
33
34
|
}
|
|
34
35
|
// TODO WebGlLayers can also be used for other layers, need a better way to determine source + layer combo
|
|
35
36
|
switch (layer.type) {
|
|
37
|
+
case 'VectorLayer':
|
|
38
|
+
case 'VectorTileLayer':
|
|
39
|
+
LayerSymbology = (React.createElement(VectorRendering, { context: context, state: state, okSignalPromise: okSignalPromise, cancel: cancel, layerId: selectedLayer }));
|
|
40
|
+
break;
|
|
36
41
|
case 'WebGlLayer':
|
|
37
42
|
LayerSymbology = (React.createElement(BandRendering, { context: context, state: state, okSignalPromise: okSignalPromise, cancel: cancel, layerId: selectedLayer }));
|
|
38
43
|
break;
|
|
@@ -43,10 +43,8 @@ export class VectorLayerPropertiesForm extends LayerPropertiesForm {
|
|
|
43
43
|
this.fetchSourceLayers(this.currentFormData, source.parameters);
|
|
44
44
|
}
|
|
45
45
|
processSchema(data, schema, uiSchema) {
|
|
46
|
+
this.removeFormEntry('color', data, schema, uiSchema);
|
|
46
47
|
super.processSchema(data, schema, uiSchema);
|
|
47
|
-
uiSchema['color'] = {
|
|
48
|
-
'ui:widget': 'color'
|
|
49
|
-
};
|
|
50
48
|
if (!data) {
|
|
51
49
|
return;
|
|
52
50
|
}
|
package/lib/gdal.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getGdal(): Promise<Gdal>;
|
package/lib/gdal.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import initGdalJs from 'gdal3.js';
|
|
2
|
+
export async function getGdal() {
|
|
3
|
+
const dataurl = new URL('./gdal3WebAssembly.data', import.meta.url);
|
|
4
|
+
const wasmurl = new URL('./gdal3WebAssembly.wasm', import.meta.url);
|
|
5
|
+
// TODO Pass gdal JS too and run gdal in a worker?
|
|
6
|
+
return await initGdalJs({
|
|
7
|
+
paths: {
|
|
8
|
+
wasm: wasmurl.href,
|
|
9
|
+
data: dataurl.href
|
|
10
|
+
},
|
|
11
|
+
useWorker: false
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
// Early load gdal
|
|
15
|
+
getGdal();
|