jupytergis-lab 0.1.1__tar.gz → 0.1.3__tar.gz
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.
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/PKG-INFO +1 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/__init__.py +6 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/_version.py +1 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/labextension/package.json +5 -5
- jupytergis_lab-0.1.1/jupytergis_lab/labextension/static/432.28aaec36233a73d1589c.js → jupytergis_lab-0.1.3/jupytergis_lab/labextension/static/432.cdb42bd802cef0ce9e4f.js +1 -1
- jupytergis_lab-0.1.3/jupytergis_lab/labextension/static/484.827d692ea7e05f72f981.js +1 -0
- jupytergis_lab-0.1.3/jupytergis_lab/labextension/static/remoteEntry.81a8dcd2edd0a9ddf234.js +1 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/labextension/static/third-party-licenses.json +2 -2
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/gis_document.py +175 -69
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/objects/__init__.py +1 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/objects/_schema/__init__.py +1 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/objects/_schema/geoTiffSource.py +1 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/objects/_schema/geojsonsource.py +1 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/objects/_schema/hillshadeLayer.py +1 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/objects/_schema/imageLayer.py +1 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/objects/_schema/imageSource.py +1 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/objects/_schema/jgis.py +1 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/objects/_schema/rasterDemSource.py +1 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/objects/_schema/rasterlayer.py +1 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/objects/_schema/rastersource.py +1 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/objects/_schema/shapefileSource.py +1 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/objects/_schema/vectorTileLayer.py +1 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/objects/_schema/vectorlayer.py +1 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/objects/_schema/vectortilesource.py +1 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/objects/_schema/videoSource.py +1 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/objects/_schema/webGlLayer.py +8 -4
- jupytergis_lab-0.1.3/jupytergis_lab/notebook/tests/test_api.py +48 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/utils.py +1 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/lib/index.js +3 -5
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/lib/notebookrenderer.js +17 -38
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/package.json +4 -4
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/src/index.ts +4 -5
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/src/notebookrenderer.ts +22 -38
- jupytergis_lab-0.1.3/tsconfig.tsbuildinfo +1 -0
- jupytergis_lab-0.1.1/jupytergis_lab/labextension/static/484.7cd11c502baf51c3285e.js +0 -1
- jupytergis_lab-0.1.1/jupytergis_lab/labextension/static/remoteEntry.15c6baaafaa709cc98c0.js +0 -1
- jupytergis_lab-0.1.1/jupytergis_lab/notebook/tests/test_api.py +0 -18
- jupytergis_lab-0.1.1/tsconfig.tsbuildinfo +0 -1
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/.gitignore +0 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/.prettierignore +0 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/LICENSE +0 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/README.md +0 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/install.json +0 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/labextension/static/373.1c3d89f9ed56880711bd.js +0 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/labextension/static/style.js +0 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/__init__.py +0 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/tests/__init__.py +0 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/jupytergis_lab/notebook/y_connector.py +0 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/lib/index.d.ts +0 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/lib/notebookrenderer.d.ts +0 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/pyproject.toml +0 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/scripts/bump-version.py +0 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/setup.py +0 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/style/base.css +0 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/style/index.css +0 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/style/index.js +0 -0
- {jupytergis_lab-0.1.1 → jupytergis_lab-0.1.3}/tsconfig.json +0 -0
|
@@ -5,10 +5,15 @@ except ImportError:
|
|
|
5
5
|
# in editable mode with pip. It is highly recommended to install
|
|
6
6
|
# the package from a stable release or in editable mode: https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs
|
|
7
7
|
import warnings
|
|
8
|
+
|
|
8
9
|
__version__ = "dev"
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
import sys
|
|
11
12
|
|
|
13
|
+
if sys.platform == "emscripten":
|
|
14
|
+
raise ImportError("Cannot use the JupyterGIS Python API in a JupyterLite kernel yet")
|
|
15
|
+
|
|
16
|
+
from .notebook import GISDocument # noqa
|
|
12
17
|
|
|
13
18
|
def _jupyter_labextension_paths():
|
|
14
19
|
return [{"src": "labextension", "dest": "@jupytergis/jupytergis-lab"}]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupytergis/jupytergis-lab",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "JupyterGIS Lab extension.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyter",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@jupyter/docprovider": "^2.0.0",
|
|
56
|
-
"@jupytergis/base": "^0.1.
|
|
57
|
-
"@jupytergis/jupytergis-core": "^0.1.
|
|
58
|
-
"@jupytergis/schema": "^0.1.
|
|
56
|
+
"@jupytergis/base": "^0.1.3",
|
|
57
|
+
"@jupytergis/jupytergis-core": "^0.1.3",
|
|
58
|
+
"@jupytergis/schema": "^0.1.3",
|
|
59
59
|
"@jupyterlab/application": "^4.0.0",
|
|
60
60
|
"@jupyterlab/apputils": "^4.0.0",
|
|
61
61
|
"@jupyterlab/coreutils": "^6.0.0",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
}
|
|
125
125
|
},
|
|
126
126
|
"_build": {
|
|
127
|
-
"load": "static/remoteEntry.
|
|
127
|
+
"load": "static/remoteEntry.81a8dcd2edd0a9ddf234.js",
|
|
128
128
|
"extension": "./extension",
|
|
129
129
|
"style": "./style"
|
|
130
130
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_jupytergis_jupytergis_lab=self.webpackChunk_jupytergis_jupytergis_lab||[]).push([[432],{79:(n,e,o)=>{o.d(e,{A:()=>f});var r=o(758),t=o.n(r),i=o(935),a=o.n(i),l=o(564),p=o(365),s=o(633),d=o(705),c=o(225),g=o(781),j=o(4),b=a()(t());b.i(l.A),b.i(p.A),b.i(s.A),b.i(d.A),b.i(c.A),b.i(g.A),b.i(j.A),b.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jGIS-Toolbar-GroupName {\n font-size: var(--jp-ui-font-size0);\n padding-left: 3px;\n}\n\n/* Overwrite forms CSS */\n.jGIS-property-panel .array-item-list {\n display: flex;\n gap: 1rem;\n}\n\n.jGIS-property-panel .jp-SchemaForm .array-item:not(:last-child) {\n border-bottom: none;\n margin-bottom: unset;\n padding-bottom: unset;\n}\n\n.jGIS-property-panel .jp-SchemaForm .array-item {\n flex: 1 0 0%;\n align-items: center;\n}\n\n.jGIS-property-panel .jp-SchemaForm .field-description {\n display: none;\n}\n\n.jGIS-property-panel .jp-SchemaForm fieldset fieldset {\n padding-left: unset;\n border-left: none;\n}\n\n.jGIS-property-panel .jp-SchemaForm .array-item-list:has(.field-array) {\n flex-direction: column;\n}\n\n.jp-gis-text-label {\n margin: 0;\n padding: 0;\n font-weight: bold;\n display: block;\n position: relative;\n}\n",""]);const f=b},564:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),i=o(935),a=o.n(i)()(t());a.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-SchemaForm .jp-select-wrapper select {\n background-image: unset;\n}\n",""]);const l=a},225:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),i=o(935),a=o.n(i)()(t());a.push([n.id,".jp-gis-filter-main {\n display: flex;\n flex-direction: column;\n padding: 10px;\n gap: 1rem;\n}\n\n.jp-gis-filter-list {\n display: flex;\n flex-direction: column;\n}\n\n.jp-gis-filter-button-container {\n display: flex;\n justify-content: space-between;\n}\n\n.jp-gis-filter-main > .jp-Dialog-button {\n width: fit-content;\n align-self: flex-end;\n}\n\n.jp-gis-logical-select {\n width: fit-content !important;\n padding: 0 8px !important;\n text-align: center;\n}\n\n.jp-gis-filter-select-container {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.jp-gis-filter-row {\n display: flex;\n justify-content: space-around;\n width: 100%;\n gap: 0.25rem;\n}\n\n.jp-gis-filter-row > select {\n text-transform: capitalize;\n padding: 0;\n text-align: center;\n}\n\n.jp-gis-filter-row > option {\n text-transform: capitalize;\n font-size: var(--jp-ui-font-size1);\n}\n\n.jp-gis-filter-row > button {\n color: var(--jp-ui-font-color0);\n background: none;\n}\n\n.jp-gis-filter-row > button:hover {\n color: var(--jp-warn-color-hover);\n}\n\n.jp-gis-filter-icon:hover {\n scale: 1.3;\n cursor: pointer;\n}\n\n.jp-gis-filter-icon > svg {\n height: 16px;\n width: 16px;\n}\n",""]);const l=a},378:(n,e,o)=>{o.d(e,{A:()=>s});var r=o(758),t=o.n(r),i=o(935),a=o.n(i),l=o(79),p=a()(t());p.i(l.A),p.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n",""]);const s=p},365:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),i=o(935),a=o.n(i)()(t());a.push([n.id,".jGIS-layerbrowser-FormDialog .jp-Dialog-header {\n padding: 0;\n}\n\n.jGIS-layerbrowser-FormDialog .jp-Dialog-content {\n width: calc(100% - 4rem);\n max-width: 100%;\n height: calc(100% - 2rem);\n max-height: 100%;\n}\n\n.jGIS-layerbrowser-FormDialog form {\n padding: 10px;\n}\n\n.jGIS-customlayer-form {\n height: 100%;\n overflow: auto;\n}\n\n.jGIS-layer-browser-container * {\n box-sizing: border-box;\n}\n\n.jGIS-layer-browser-container {\n display: flex;\n flex-direction: column;\n}\n\n.jGIS-layer-browser-header-container {\n position: sticky;\n top: 0;\n z-index: 40;\n background-color: var(--jp-layout-color1);\n}\n\n.jGIS-layer-browser-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 20px;\n padding: 1rem 2rem;\n}\n\n.jGIS-layer-browser-header-text {\n padding-right: 1rem;\n font-weight: bold;\n}\n\n.jGIS-layer-browser-header-search-container {\n display: flex;\n align-items: center;\n flex-grow: 1;\n position: relative;\n}\n\n.jGIS-layer-browser-header-search-icon {\n position: absolute;\n top: 50%;\n left: 0.75rem;\n transform: translateY(-50%);\n}\n\n.jGIS-layer-browser-header-search {\n box-shadow: none;\n flex: 1 1 0%;\n height: 40px;\n padding: 1rem 2rem;\n padding-left: 2.5rem;\n background-color: transparent;\n border: 1px solid var(--jp-border-color1);\n border-radius: 8px;\n color: var(--jp-ui-font-color1);\n}\n\n.jGIS-layer-browser-grid {\n display: grid;\n gap: 1.25rem;\n grid-template-rows: 1fr;\n grid-template-columns: repeat(3, minmax(0px, 1fr));\n padding: 1rem 2rem;\n}\n\n@media (min-width: 1400px) {\n .jGIS-layer-browser-grid {\n grid-template-columns: repeat(5, minmax(0px, 1fr));\n }\n}\n\n.jGIS-layer-browser-categories {\n display: flex;\n gap: 2rem;\n padding: 0 2rem;\n border-bottom: 2px solid var(--jp-border-color1);\n}\n\n.jGIS-layer-browser-category {\n position: relative;\n opacity: 0.7;\n padding: 4px 0 14px;\n cursor: pointer;\n text-decoration: none;\n}\n\n.jGIS-layer-browser-category::after {\n content: '';\n position: absolute;\n bottom: -2px;\n left: 0;\n width: 0px;\n height: 3px;\n transition:\n background-color 300ms ease-in,\n width 300ms ease-in,\n opacity 300ms ease-in;\n background-color: transparent;\n}\n\n.jGIS-layer-browser-category.jGIS-layer-browser-category-selected::after {\n width: 100%;\n background-color: var(--jp-inverse-layout-color2);\n}\n\n.jGIS-layer-browser-category.jGIS-layer-browser-category-selected {\n opacity: 1;\n font-weight: bold;\n}\n\n.jGIS-layer-browser-tile {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n position: relative;\n margin-top: 4px;\n padding: 8px;\n transition: transform 150ms ease-out;\n cursor: pointer;\n border: 1px solid var(--jp-border-color1);\n background-color: var(--jp-layout-color1);\n border-radius: 8px;\n}\n\n.jGIS-layer-browser-custom-tile {\n border: 1px solid var(--jp-border-color2);\n background-color: var(--jp-layout-color2);\n}\n\n.jGIS-layer-browser-tile:hover {\n box-shadow: var(--jp-layout-color2);\n transform: translateY(-4px);\n background-color: var(--jp-brand-color2);\n}\n\n.jGIS-layer-browser-tile-img-container {\n /* isolation: isolate; */\n /* border: medium; */\n /* background: transparent; */\n /* padding: 0px; */\n /* width: 100%; */\n aspect-ratio: 16 / 10;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n}\n\n.jGIS-layer-browser-img {\n /* position: absolute; */\n /* height: 100%; */\n /* object-fit: cover; */\n /* box-sizing: border-box; */\n width: 100%;\n}\n\n.jGIS-layer-browser-icon {\n padding-inline: 8px;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n overflow: hidden;\n box-sizing: border-box;\n width: 32px;\n height: 32px;\n transition:\n width 125ms ease-in-out,\n background-color 125ms ease-in-out,\n opacity 150ms ease-out;\n background-color: var(--jp-accent-color1);\n border-radius: 20px;\n}\n\n.jGIS-layer-browser-tile:not(.jGIS-layer-browser-tile:hover)\n .jGIS-layer-browser-icon {\n opacity: 0;\n}\n\n.jGIS-layer-browser-added {\n display: inline-flex;\n gap: 0.35rem;\n opacity: 1 !important;\n width: 7rem;\n color: var(--jp-ui-inverse-font-color1);\n}\n\n.jGIS-layer-browser-text-container {\n padding-inline: 4px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: 8px;\n flex: 1 1 0%;\n box-sizing: border-box;\n}\n\n.jGIS-layer-browser-text-info {\n display: flex;\n flex-direction: column;\n gap: 8px;\n box-sizing: border-box;\n}\n\n.jGIS-layer-browser-text-header {\n overflow: hidden;\n font-weight: bold;\n text-transform: capitalize;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.jGIS-layer-browser-text-p {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.jGIS-layer-browser-text-source {\n overflow: hidden;\n font-size: 0.75rem;\n font-weight: lighter;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.jGIS-layer-browser-text-description {\n -webkit-line-clamp: 2;\n -moz-box-orient: vertical;\n display: -webkit-box;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.jGIS-layer-browser-text-general {\n margin: 0;\n}\n",""]);const l=a},633:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),i=o(935),a=o.n(i)()(t());a.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-gis-sourcePanel,\n.jp-gis-layerPanel {\n min-height: 3em;\n}\n\n.jp-gis-layerItem,\n.jp-gis-source {\n padding: 2px 0 2px 12px;\n}\n\n.jp-gis-layerGroup {\n display: flex;\n flex-direction: column;\n}\n\n.jp-gis-layerGroupHeader {\n display: flex;\n margin-left: -2px;\n padding-bottom: 4px;\n}\n\n.jp-gis-layerGroupHeader:hover {\n cursor: pointer;\n}\n\n.jp-gis-layerGroupCollapser {\n transform: rotate(-90deg);\n margin: auto 0;\n height: 16px;\n}\n\n.jp-gis-layerGroupCollapser.jp-mod-expanded {\n transform: rotate(0deg);\n}\n\n.jp-gis-layer,\n.jp-gis-source {\n display: flex;\n flex-direction: row;\n align-items: center;\n color: var(--jp-ui-font-color1);\n}\n\n.jp-gis-layer.jp-mod-selected,\n.jp-gis-source.jp-mod-selected,\n.jp-gis-layerGroupHeader.jp-mod-selected {\n color: var(--jp-ui-inverse-font-color1);\n background: var(--jp-brand-color1);\n}\n\n.jp-gis-layer:hover:not(.jp-mod-selected),\n.jp-gis-source:hover:not(.jp-mod-selected) {\n cursor: pointer;\n background: var(--jp-layout-color2);\n}\n\n.jp-gis-layer.jp-mod-selected .jp-icon-selectable,\n.jp-gis-source.jp-mod-selected .jp-icon-selectable,\n.jp-gis-layerGroupHeader.jp-mod-selected .jp-icon-selectable {\n fill: var(--jp-ui-inverse-font-color1);\n}\n\n.jp-gis-layer button,\n.jp-gis-source button {\n margin-left: auto;\n min-height: unset;\n min-width: unset;\n padding: unset;\n margin-right: 4px;\n}\n\n.jp-gis-layer.jp-mod-selected button:hover .jp-icon-selectable,\n.jp-gis-source.jp-mod-selected button:hover .jp-icon-selectable {\n fill: var(--jp-ui-font-color1);\n}\n\n.jp-gis-layerIcon,\n.jp-gis-sourceIcon {\n display: flex;\n align-items: center;\n}\n\n.jp-gis-layerIcon > svg,\n.jp-gis-sourceIcon > svg {\n height: 16px;\n width: 16px;\n}\n\n.jp-gis-layerTitle,\n.jp-gis-sourceTitle {\n display: flex;\n flex-grow: 1;\n align-items: center;\n}\n\n.jp-gis-layerText:focus,\n.jp-gis-sourceText:focus {\n outline: none;\n}\n\n.jp-gis-layerTitle .jp-gis-layerIcon,\n.jp-gis-sourceTitle .jp-gis-sourceIcon {\n padding-right: 4px;\n}\n\n.jp-gis-left-panel-input {\n background-color: transparent;\n border: 1px solid var(--jp-border-color1);\n border-radius: 8px;\n color: var(--jp-ui-font-color1);\n flex-grow: 1;\n margin-right: 4px;\n outline: none;\n padding: 2px 7px;\n}\n\n.jp-gis-left-panel-input:focus {\n border: 1px solid var(--jp-brand-color1);\n}\n\n.jp-gis-layerText,\n.jp-gis-sourceText {\n padding: 3px 0;\n cursor: pointer;\n}\n\nli .lm-Menu-itemLabel {\n text-transform: capitalize;\n}\n\n.jp-gis-sourceInfo {\n font-size: var(--jp-ui-font-size0);\n font-style: italic;\n padding-left: 5px;\n color: var(--jp-ui-font-color2);\n}\n\n#jp-drag-indicator {\n top: calc(-1 * var(--jp-border-width) + 1px);\n left: calc(-1 * var(--jp-border-width));\n content: '';\n height: var(--jp-private-horizontal-tab-active-top-border);\n width: calc(100% + 2 * var(--jp-border-width));\n background: var(--jp-brand-color1);\n}\n",""]);const l=a},781:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),i=o(935),a=o.n(i)()(t());a.push([n.id,".jp-gis-symbology-dialog .jp-Dialog-header {\n font-weight: bold;\n}\n\n.jp-gis-symbology-dialog .jp-Dialog-content {\n width: calc(80% - 4rem);\n max-width: 80%;\n height: fit-content;\n max-height: 80%;\n}\n\n.jp-gis-symbology-row {\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n gap: 2rem;\n}\n\n.jp-gis-symbology-row label {\n font-size: var(--jp-ui-font-size2);\n flex: 0 1 20%;\n}\n\n.jp-gis-symbology-row > .jp-select-wrapper {\n flex: 1 0 50%;\n max-width: 50%;\n}\n\n.jp-gis-band-container {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.jp-gis-layer-symbology-container {\n display: flex;\n flex-direction: column;\n}\n\n.jp-gis-band-container .jp-gis-symbology-row:last-child {\n margin-bottom: 12px;\n}\n\n.jp-gis-stop-container {\n display: flex;\n flex-direction: column;\n gap: 0.1rem;\n}\n\n.jp-gis-stop-labels {\n display: flex;\n font-weight: bold;\n font-size: var(--jp-ui-font-size1);\n gap: 0.25rem;\n padding-bottom: 0.25rem;\n}\n\n.jp-gis-stop-labels > span {\n flex: 0 0 18%;\n}\n\n.jp-gis-color-row {\n display: flex;\n width: 100%;\n gap: 0.25rem;\n height: 32px;\n}\n\n.jp-gis-color-row > input[type='number'] {\n flex: 0 1 18%;\n min-width: 0px;\n}\n\n.jp-gis-color-row > input[type='color'] {\n flex-grow: 1;\n}\n\n.jp-gis-color-row > button {\n color: var(--jp-ui-font-color0);\n background: none;\n padding-right: 0px;\n}\n\n.jp-gis-symbology-button-container {\n padding-top: 0.5rem;\n}\n",""]);const l=a},705:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),i=o(935),a=o.n(i)()(t());a.push([n.id,".jp-gis-terrain-main {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n overflow: hidden;\n}\n\n.jp-gis-terrain-label {\n margin: 0;\n padding: 0;\n font-weight: bold;\n display: block;\n position: relative;\n}\n",""]);const l=a},296:(n,e,o)=>{o.d(e,{A:()=>d});var r=o(758),t=o.n(r),i=o(935),a=o.n(i),l=o(307),p=o(378),s=a()(t());s.i(l.A),s.i(p.A),s.push([n.id,".jGIS-Spinner {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 10;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n outline: none;\n background: #00000075;\n}\n\n.jGIS-SpinnerContent {\n border: solid #f376269e;\n margin: 50px auto;\n text-indent: -9999em;\n width: 6em;\n height: 6em;\n border-radius: 50%;\n position: relative;\n animation:\n load3 1s infinite linear,\n fadeIn 1s;\n}\n\n.jGIS-SpinnerContent:before {\n width: 50%;\n height: 50%;\n background: #f3762605;\n border-radius: 100% 0 100% 0;\n box-shadow: inset 6px 5px 0 1px #f37626;\n position: absolute;\n top: 0;\n left: 0;\n content: '';\n}\n\n.jGIS-SpinnerContent:after {\n width: 75%;\n height: 75%;\n border-radius: 50%;\n content: '';\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n}\n\n.jGIS-camera-client {\n width: 15px;\n height: 15px;\n position: absolute;\n z-index: 10;\n background-color: var(--jp-private-notebook-active-color);\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.jGIS-control-panel {\n color: var(--jp-ui-font-color1);\n background: var(--jp-layout-color1);\n height: 100%;\n}\n\n.jGIS-control-panel * {\n font-family: var(--jp-ui-font-family);\n}\n\n.jGIS-control-panel-title {\n border-bottom: solid var(--jp-border-width) var(--jp-border-color1);\n box-shadow: var(--jp-toolbar-box-shadow);\n display: flex;\n flex-direction: row;\n align-items: center;\n min-height: 24px;\n height: var(--jp-debugger-header-height);\n background-color: var(--jp-layout-color2);\n}\n\n.jGIS-control-panel-title h2 {\n text-transform: uppercase;\n font-weight: 600;\n font-size: var(--jp-ui-font-size0);\n color: var(--jp-ui-font-color1);\n padding-left: 8px;\n padding-right: 4px;\n}\n\n.jGIS-sidepanel-widget {\n height: 100%;\n}\n\n.jGIS-sidebar-treepanel {\n display: flex;\n flex-direction: column;\n min-height: 50px;\n padding-top: 3px;\n}\n\n.jGIS-sidebar-propertiespanel {\n display: flex;\n flex-direction: column;\n min-height: 50px;\n padding-top: 3px;\n}\n\n.jGIS-treeview-wrapper {\n overflow: auto;\n height: 100%;\n}\n\n.jGIS-treeview-wrapper > div {\n padding: 0 !important;\n}\n/* TODO: More robust selector */\n.jGIS-treeview-wrapper div[style*='align-items: center;']:first-of-type {\n flex-grow: 1;\n}\n\n.jGIS-control-panel-tree {\n flex-grow: 1;\n}\n\n.jGIS-sidebar-propertiespanel > div {\n overflow: auto;\n}\n\n.jGIS-property-outer {\n padding: 10px;\n flex-grow: 1;\n overflow: auto;\n}\n\n.jGIS-property-buttons {\n display: flex;\n justify-content: end;\n padding: 10px;\n}\n\n.jGIS-property-panel {\n display: flex;\n flex-flow: column;\n height: 100%;\n overflow: hidden;\n}\n\n.jGIS-hidden-field {\n display: none;\n}\n\ndiv.field.field-array > label + span {\n display: none;\n}\n\n.jGIS-layer-CreationFormDialog .jp-Dialog-content {\n width: 60%;\n}\n\n.jGIS-layer-CreationFormDialog form {\n padding: 10px;\n}\n\n/* TODO Upstream this to jupyterlab jrfs */\n.jp-SchemaForm .control-label,\n.jp-SchemaForm legend {\n position: inherit;\n text-transform: capitalize;\n}\n\ndiv.jGIS-toolbar-widget > div.jp-Toolbar-item:last-child {\n flex-grow: 1;\n}\n\n.jGIS-toolbar-usertoolbar {\n flex-grow: 1;\n display: flex;\n flex-direction: row-reverse;\n}\n.jGIS-toolbar-react-widget {\n display: flex;\n flex-direction: row;\n align-items: center;\n flex-grow: 1;\n}\n\n.jGIS-Toolbar-Separator {\n width: var(--jp-border-width);\n background-color: var(--jp-border-color1);\n padding-left: 0px !important;\n padding-right: 0px !important;\n}\n\n.jGIS-toolbar-usertoolbar .jp-MenuBar-anonymousIcon,\n.jGIS-toolbar-usertoolbar .jp-MenuBar-imageIcon {\n position: unset !important;\n margin-right: 2px;\n height: 22px;\n box-sizing: border-box;\n}\n\n.jGIS-toolbar-usertoolbar .jp-MenuBar-anonymousIcon.selected,\n.jGIS-toolbar-usertoolbar .jp-MenuBar-imageIcon.selected {\n border: solid 1.5px red;\n}\n\n.jGIS-Mainview {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n}\n\n.jGIS-Annotation-Wrapper {\n position: absolute;\n opacity: 1;\n transition: opacity 0.1s linear 0.15s;\n}\n\n.jGIS-Annotation {\n z-index: 1;\n margin-left: 1px;\n margin-top: 1px;\n padding: 1em;\n color: #fff;\n background: var(--jp-layout-color1);\n border-radius: 0.5em;\n font-size: 12px;\n line-height: 1.2;\n transition: opacity 0.5s;\n}\n\n.jGIS-FloatingAnnotation {\n position: absolute;\n width: 250px;\n box-shadow: var(--jp-elevation-z6);\n}\n\n.jGIS-Annotations {\n overflow: auto;\n}\n\n.jGIS-Annotations-Separator {\n border-color: var(--jp-layout-color4);\n border-style: solid;\n border-width: 1px;\n}\n\n.jGIS-Annotation-Handler {\n position: absolute;\n top: -5px;\n left: -5px;\n width: 8px;\n height: 8px;\n border: 1px solid #ffffffc2;\n border-radius: 50%;\n background: rgb(0 0 0 / 63%);\n cursor: pointer;\n transition-property: width, height, left, top;\n transition-duration: 0.2s;\n z-index: 1000;\n}\n\n.jGIS-Annotation-Handler:hover {\n top: -9px;\n left: -9px;\n width: 16px;\n height: 16px;\n}\n\n.jGIS-Annotation-Message {\n display: flex;\n margin-top: 10px;\n gap: 5px;\n align-items: center;\n justify-content: center;\n}\n\n.jGIS-Annotation-Message .jGIS-Annotation-User-Icon {\n border-radius: 100%;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n vertical-align: middle;\n color: var(--jp-ui-font-color1);\n}\n\n.jGIS-Annotation-Message textarea {\n border-radius: var(--jp-border-radius);\n background: var(--jp-layout-color2);\n color: var(--jp-ui-font-color2);\n flex-grow: 1;\n resize: none;\n}\n\n.jGIS-Annotation-Message-Content {\n background: var(--jp-layout-color2);\n color: var(--jp-ui-font-color2);\n border-radius: var(--jp-border-radius);\n flex-grow: 1;\n}\n\n.jGIS-Annotation-Topbar {\n display: flex;\n flex-direction: row-reverse;\n}\n\n.jGIS-Annotation-TopBarIcon {\n margin: 3px;\n width: 20px;\n height: 20px;\n cursor: pointer;\n}\n\n.jGIS-Annotation-TopBarIcon > svg {\n width: 20px;\n height: 20px;\n}\n\n.jGIS-Annotation-Submit > svg {\n width: 30px;\n height: 30px;\n}\n\n.jGIS-Annotation-Submit g {\n fill: #f6f7f8 !important;\n}\n\n.jGIS-Annotation-Submit:hover {\n opacity: 70%;\n cursor: pointer;\n}\n\n.jGIS-Annotation-Submit {\n background-color: var(--jp-brand-color1);\n border-radius: 100%;\n width: 30px;\n height: 30px;\n}\n\n/* Hack to remove the malformed form button */\n.object-property-expand {\n display: none;\n}\n\n.highlight {\n background-color: var(--jp-layout-color2) !important;\n}\n.jupytergis-notebook-widget {\n height: 600px;\n width: 100%;\n}\n.jupytergis-notebook-widget > div {\n height: 100%;\n width: 100%;\n}\n\n.jp-SchemaForm .control-label,\n.jp-SchemaForm legend {\n width: 100%;\n}\n\n.jpgis-console {\n border-top: var(--jp-border-width) solid var(--jp-toolbar-border-color);\n}\n\n.jpgis-console .jp-CodeConsole-banner {\n display: none;\n}\n",""]);const d=s},432:(n,e,o)=>{var r=o(591),t=o.n(r),i=o(740),a=o.n(i),l=o(128),p=o.n(l),s=o(855),d=o.n(s),c=o(51),g=o.n(c),j=o(656),b=o.n(j),f=o(296),u={};u.styleTagTransform=b(),u.setAttributes=d(),u.insert=p().bind(null,"head"),u.domAPI=a(),u.insertStyleElement=g(),t()(f.A,u),f.A&&f.A.locals&&f.A.locals}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_jupytergis_jupytergis_lab=self.webpackChunk_jupytergis_jupytergis_lab||[]).push([[432],{79:(n,e,o)=>{o.d(e,{A:()=>u});var r=o(758),t=o.n(r),i=o(935),a=o.n(i),l=o(564),p=o(365),s=o(633),d=o(705),c=o(225),g=o(162),j=o(4),b=a()(t());b.i(l.A),b.i(p.A),b.i(s.A),b.i(d.A),b.i(c.A),b.i(g.A),b.i(j.A),b.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jGIS-Toolbar-GroupName {\n font-size: var(--jp-ui-font-size0);\n padding-left: 3px;\n}\n\n/* Overwrite forms CSS */\n.jGIS-property-panel .array-item-list {\n display: flex;\n gap: 1rem;\n}\n\n.jGIS-property-panel .jp-SchemaForm .array-item:not(:last-child) {\n border-bottom: none;\n margin-bottom: unset;\n padding-bottom: unset;\n}\n\n.jGIS-property-panel .jp-SchemaForm .array-item {\n flex: 1 0 0%;\n align-items: center;\n}\n\n.jGIS-property-panel .jp-SchemaForm .field-description {\n display: none;\n}\n\n.jGIS-property-panel .jp-SchemaForm fieldset fieldset {\n padding-left: unset;\n border-left: none;\n}\n\n.jGIS-property-panel .jp-SchemaForm .array-item-list:has(.field-array) {\n flex-direction: column;\n}\n\n.jp-gis-text-label {\n margin: 0;\n padding: 0;\n font-weight: bold;\n display: block;\n position: relative;\n}\n",""]);const u=b},564:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),i=o(935),a=o.n(i)()(t());a.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-SchemaForm .jp-select-wrapper select {\n background-image: unset;\n}\n",""]);const l=a},225:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),i=o(935),a=o.n(i)()(t());a.push([n.id,".jp-gis-filter-main {\n display: flex;\n flex-direction: column;\n padding: 10px;\n gap: 1rem;\n}\n\n.jp-gis-filter-list {\n display: flex;\n flex-direction: column;\n}\n\n.jp-gis-filter-button-container {\n display: flex;\n justify-content: space-between;\n}\n\n.jp-gis-filter-main > .jp-Dialog-button {\n width: fit-content;\n align-self: flex-end;\n}\n\n.jp-gis-logical-select {\n width: fit-content !important;\n padding: 0 8px !important;\n text-align: center;\n}\n\n.jp-gis-filter-select-container {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.jp-gis-filter-row {\n display: flex;\n justify-content: space-around;\n width: 100%;\n gap: 0.25rem;\n}\n\n.jp-gis-filter-row > select {\n text-transform: capitalize;\n padding: 0;\n text-align: center;\n}\n\n.jp-gis-filter-row > option {\n text-transform: capitalize;\n font-size: var(--jp-ui-font-size1);\n}\n\n.jp-gis-filter-row > button {\n color: var(--jp-ui-font-color0);\n background: none;\n}\n\n.jp-gis-filter-row > button:hover {\n color: var(--jp-warn-color-hover);\n}\n\n.jp-gis-filter-icon:hover {\n scale: 1.3;\n cursor: pointer;\n}\n\n.jp-gis-filter-icon > svg {\n height: 16px;\n width: 16px;\n}\n",""]);const l=a},378:(n,e,o)=>{o.d(e,{A:()=>s});var r=o(758),t=o.n(r),i=o(935),a=o.n(i),l=o(79),p=a()(t());p.i(l.A),p.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n",""]);const s=p},365:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),i=o(935),a=o.n(i)()(t());a.push([n.id,".jGIS-layerbrowser-FormDialog .jp-Dialog-header {\n padding: 0;\n}\n\n.jGIS-layerbrowser-FormDialog .jp-Dialog-content {\n width: calc(100% - 4rem);\n max-width: 100%;\n height: calc(100% - 2rem);\n max-height: 100%;\n}\n\n.jGIS-layerbrowser-FormDialog form {\n padding: 10px;\n}\n\n.jGIS-customlayer-form {\n height: 100%;\n overflow: auto;\n}\n\n.jGIS-layer-browser-container * {\n box-sizing: border-box;\n}\n\n.jGIS-layer-browser-container {\n display: flex;\n flex-direction: column;\n}\n\n.jGIS-layer-browser-header-container {\n position: sticky;\n top: 0;\n z-index: 40;\n background-color: var(--jp-layout-color1);\n}\n\n.jGIS-layer-browser-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 20px;\n padding: 1rem 2rem;\n}\n\n.jGIS-layer-browser-header-text {\n padding-right: 1rem;\n font-weight: bold;\n}\n\n.jGIS-layer-browser-header-search-container {\n display: flex;\n align-items: center;\n flex-grow: 1;\n position: relative;\n}\n\n.jGIS-layer-browser-header-search-icon {\n position: absolute;\n top: 50%;\n left: 0.75rem;\n transform: translateY(-50%);\n}\n\n.jGIS-layer-browser-header-search {\n box-shadow: none;\n flex: 1 1 0%;\n height: 40px;\n padding: 1rem 2rem;\n padding-left: 2.5rem;\n background-color: transparent;\n border: 1px solid var(--jp-border-color1);\n border-radius: 8px;\n color: var(--jp-ui-font-color1);\n}\n\n.jGIS-layer-browser-grid {\n display: grid;\n gap: 1.25rem;\n grid-template-rows: 1fr;\n grid-template-columns: repeat(3, minmax(0px, 1fr));\n padding: 1rem 2rem;\n}\n\n@media (min-width: 1400px) {\n .jGIS-layer-browser-grid {\n grid-template-columns: repeat(5, minmax(0px, 1fr));\n }\n}\n\n.jGIS-layer-browser-categories {\n display: flex;\n gap: 2rem;\n padding: 0 2rem;\n border-bottom: 2px solid var(--jp-border-color1);\n}\n\n.jGIS-layer-browser-category {\n position: relative;\n opacity: 0.7;\n padding: 4px 0 14px;\n cursor: pointer;\n text-decoration: none;\n}\n\n.jGIS-layer-browser-category::after {\n content: '';\n position: absolute;\n bottom: -2px;\n left: 0;\n width: 0px;\n height: 3px;\n transition:\n background-color 300ms ease-in,\n width 300ms ease-in,\n opacity 300ms ease-in;\n background-color: transparent;\n}\n\n.jGIS-layer-browser-category.jGIS-layer-browser-category-selected::after {\n width: 100%;\n background-color: var(--jp-inverse-layout-color2);\n}\n\n.jGIS-layer-browser-category.jGIS-layer-browser-category-selected {\n opacity: 1;\n font-weight: bold;\n}\n\n.jGIS-layer-browser-tile {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n position: relative;\n margin-top: 4px;\n padding: 8px;\n transition: transform 150ms ease-out;\n cursor: pointer;\n border: 1px solid var(--jp-border-color1);\n background-color: var(--jp-layout-color1);\n border-radius: 8px;\n}\n\n.jGIS-layer-browser-custom-tile {\n border: 1px solid var(--jp-border-color2);\n background-color: var(--jp-layout-color2);\n}\n\n.jGIS-layer-browser-tile:hover {\n box-shadow: var(--jp-layout-color2);\n transform: translateY(-4px);\n background-color: var(--jp-brand-color2);\n}\n\n.jGIS-layer-browser-tile-img-container {\n /* isolation: isolate; */\n /* border: medium; */\n /* background: transparent; */\n /* padding: 0px; */\n /* width: 100%; */\n aspect-ratio: 16 / 10;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n}\n\n.jGIS-layer-browser-img {\n /* position: absolute; */\n /* height: 100%; */\n /* object-fit: cover; */\n /* box-sizing: border-box; */\n width: 100%;\n}\n\n.jGIS-layer-browser-icon {\n padding-inline: 8px;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n overflow: hidden;\n box-sizing: border-box;\n width: 32px;\n height: 32px;\n transition:\n width 125ms ease-in-out,\n background-color 125ms ease-in-out,\n opacity 150ms ease-out;\n background-color: var(--jp-accent-color1);\n border-radius: 20px;\n}\n\n.jGIS-layer-browser-tile:not(.jGIS-layer-browser-tile:hover)\n .jGIS-layer-browser-icon {\n opacity: 0;\n}\n\n.jGIS-layer-browser-added {\n display: inline-flex;\n gap: 0.35rem;\n opacity: 1 !important;\n width: 7rem;\n color: var(--jp-ui-inverse-font-color1);\n}\n\n.jGIS-layer-browser-text-container {\n padding-inline: 4px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: 8px;\n flex: 1 1 0%;\n box-sizing: border-box;\n}\n\n.jGIS-layer-browser-text-info {\n display: flex;\n flex-direction: column;\n gap: 8px;\n box-sizing: border-box;\n}\n\n.jGIS-layer-browser-text-header {\n overflow: hidden;\n font-weight: bold;\n text-transform: capitalize;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.jGIS-layer-browser-text-p {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.jGIS-layer-browser-text-source {\n overflow: hidden;\n font-size: 0.75rem;\n font-weight: lighter;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.jGIS-layer-browser-text-description {\n -webkit-line-clamp: 2;\n -moz-box-orient: vertical;\n display: -webkit-box;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.jGIS-layer-browser-text-general {\n margin: 0;\n}\n",""]);const l=a},633:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),i=o(935),a=o.n(i)()(t());a.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-gis-sourcePanel,\n.jp-gis-layerPanel {\n min-height: 3em;\n}\n\n.jp-gis-layerItem,\n.jp-gis-source {\n padding: 2px 0 2px 12px;\n}\n\n.jp-gis-layerGroup {\n display: flex;\n flex-direction: column;\n}\n\n.jp-gis-layerGroupHeader {\n display: flex;\n margin-left: -2px;\n padding-bottom: 4px;\n}\n\n.jp-gis-layerGroupHeader:hover {\n cursor: pointer;\n}\n\n.jp-gis-layerGroupCollapser {\n transform: rotate(-90deg);\n margin: auto 0;\n height: 16px;\n}\n\n.jp-gis-layerGroupCollapser.jp-mod-expanded {\n transform: rotate(0deg);\n}\n\n.jp-gis-layer,\n.jp-gis-source {\n display: flex;\n flex-direction: row;\n align-items: center;\n color: var(--jp-ui-font-color1);\n}\n\n.jp-gis-layer.jp-mod-selected,\n.jp-gis-source.jp-mod-selected,\n.jp-gis-layerGroupHeader.jp-mod-selected {\n color: var(--jp-ui-inverse-font-color1);\n background: var(--jp-brand-color1);\n}\n\n.jp-gis-layer:hover:not(.jp-mod-selected),\n.jp-gis-source:hover:not(.jp-mod-selected) {\n cursor: pointer;\n background: var(--jp-layout-color2);\n}\n\n.jp-gis-layer.jp-mod-selected .jp-icon-selectable,\n.jp-gis-source.jp-mod-selected .jp-icon-selectable,\n.jp-gis-layerGroupHeader.jp-mod-selected .jp-icon-selectable {\n fill: var(--jp-ui-inverse-font-color1);\n}\n\n.jp-gis-layer button,\n.jp-gis-source button {\n margin-left: auto;\n min-height: unset;\n min-width: unset;\n padding: unset;\n margin-right: 4px;\n}\n\n.jp-gis-layer.jp-mod-selected button:hover .jp-icon-selectable,\n.jp-gis-source.jp-mod-selected button:hover .jp-icon-selectable {\n fill: var(--jp-ui-font-color1);\n}\n\n.jp-gis-layerIcon,\n.jp-gis-sourceIcon {\n display: flex;\n align-items: center;\n}\n\n.jp-gis-layerIcon > svg,\n.jp-gis-sourceIcon > svg {\n height: 16px;\n width: 16px;\n}\n\n.jp-gis-layerTitle,\n.jp-gis-sourceTitle {\n display: flex;\n flex-grow: 1;\n align-items: center;\n}\n\n.jp-gis-layerText:focus,\n.jp-gis-sourceText:focus {\n outline: none;\n}\n\n.jp-gis-layerTitle .jp-gis-layerIcon,\n.jp-gis-sourceTitle .jp-gis-sourceIcon {\n padding-right: 4px;\n}\n\n.jp-gis-left-panel-input {\n background-color: transparent;\n border: 1px solid var(--jp-border-color1);\n border-radius: 8px;\n color: var(--jp-ui-font-color1);\n flex-grow: 1;\n margin-right: 4px;\n outline: none;\n padding: 2px 7px;\n}\n\n.jp-gis-left-panel-input:focus {\n border: 1px solid var(--jp-brand-color1);\n}\n\n.jp-gis-layerText,\n.jp-gis-sourceText {\n padding: 3px 0;\n cursor: pointer;\n}\n\nli .lm-Menu-itemLabel {\n text-transform: capitalize;\n}\n\n.jp-gis-sourceInfo {\n font-size: var(--jp-ui-font-size0);\n font-style: italic;\n padding-left: 5px;\n color: var(--jp-ui-font-color2);\n}\n\n#jp-drag-indicator {\n top: calc(-1 * var(--jp-border-width) + 1px);\n left: calc(-1 * var(--jp-border-width));\n content: '';\n height: var(--jp-private-horizontal-tab-active-top-border);\n width: calc(100% + 2 * var(--jp-border-width));\n background: var(--jp-brand-color1);\n}\n",""]);const l=a},162:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),i=o(935),a=o.n(i)()(t());a.push([n.id,".jp-gis-symbology-dialog .jp-Dialog-header {\n font-weight: bold;\n}\n\n.jp-gis-symbology-dialog .jp-Dialog-content {\n width: calc(80% - 4rem);\n max-width: 80%;\n height: fit-content;\n max-height: 80%;\n}\n\n.jp-gis-symbology-row {\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n gap: 2rem;\n}\n\n.jp-gis-symbology-row label {\n font-size: var(--jp-ui-font-size2);\n flex: 0 1 20%;\n}\n\n.jp-gis-symbology-row > .jp-select-wrapper,\n.jp-gis-symbology-row > .jp-mod-styled {\n flex: 1 0 50%;\n max-width: 50%;\n}\n\n.jp-gis-band-container {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.jp-gis-layer-symbology-container {\n display: flex;\n flex-direction: column;\n gap: 13px;\n border-top: 1px solid var(--jp-border-color2);\n padding-top: 8px;\n}\n\n.jp-gis-layer-symbology-container .jp-select-wrapper {\n margin-bottom: unset;\n}\n\n.jp-gis-band-container .jp-gis-symbology-row:last-child {\n margin-bottom: 12px;\n}\n\n.jp-gis-stop-container {\n display: flex;\n flex-direction: column;\n gap: 0.1rem;\n}\n\n.jp-gis-stop-labels {\n display: flex;\n font-weight: bold;\n font-size: var(--jp-ui-font-size1);\n gap: 0.25rem;\n padding-bottom: 0.25rem;\n}\n\n.jp-gis-stop-labels > span {\n flex: 0 0 18%;\n}\n\n.jp-gis-color-row {\n display: flex;\n width: 100%;\n gap: 0.25rem;\n height: 32px;\n}\n\n.jp-gis-color-row-value-input {\n flex: 0 1 18%;\n min-width: 0px;\n}\n\n.jp-gis-color-row-output-input {\n flex-grow: 1;\n}\n\n.jp-gis-color-row > button {\n color: var(--jp-ui-font-color0);\n background: none;\n padding-right: 0px;\n}\n\n.jp-gis-symbology-button-container {\n padding-top: 0.5rem;\n}\n",""]);const l=a},705:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),i=o(935),a=o.n(i)()(t());a.push([n.id,".jp-gis-terrain-main {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n overflow: hidden;\n}\n\n.jp-gis-terrain-label {\n margin: 0;\n padding: 0;\n font-weight: bold;\n display: block;\n position: relative;\n}\n",""]);const l=a},296:(n,e,o)=>{o.d(e,{A:()=>d});var r=o(758),t=o.n(r),i=o(935),a=o.n(i),l=o(307),p=o(378),s=a()(t());s.i(l.A),s.i(p.A),s.push([n.id,".jGIS-Spinner {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 10;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n outline: none;\n background: #00000075;\n}\n\n.jGIS-SpinnerContent {\n border: solid #f376269e;\n margin: 50px auto;\n text-indent: -9999em;\n width: 6em;\n height: 6em;\n border-radius: 50%;\n position: relative;\n animation:\n load3 1s infinite linear,\n fadeIn 1s;\n}\n\n.jGIS-SpinnerContent:before {\n width: 50%;\n height: 50%;\n background: #f3762605;\n border-radius: 100% 0 100% 0;\n box-shadow: inset 6px 5px 0 1px #f37626;\n position: absolute;\n top: 0;\n left: 0;\n content: '';\n}\n\n.jGIS-SpinnerContent:after {\n width: 75%;\n height: 75%;\n border-radius: 50%;\n content: '';\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n}\n\n.jGIS-camera-client {\n width: 15px;\n height: 15px;\n position: absolute;\n z-index: 10;\n background-color: var(--jp-private-notebook-active-color);\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.jGIS-control-panel {\n color: var(--jp-ui-font-color1);\n background: var(--jp-layout-color1);\n height: 100%;\n}\n\n.jGIS-control-panel * {\n font-family: var(--jp-ui-font-family);\n}\n\n.jGIS-control-panel-title {\n border-bottom: solid var(--jp-border-width) var(--jp-border-color1);\n box-shadow: var(--jp-toolbar-box-shadow);\n display: flex;\n flex-direction: row;\n align-items: center;\n min-height: 24px;\n height: var(--jp-debugger-header-height);\n background-color: var(--jp-layout-color2);\n}\n\n.jGIS-control-panel-title h2 {\n text-transform: uppercase;\n font-weight: 600;\n font-size: var(--jp-ui-font-size0);\n color: var(--jp-ui-font-color1);\n padding-left: 8px;\n padding-right: 4px;\n}\n\n.jGIS-sidepanel-widget {\n height: 100%;\n}\n\n.jGIS-sidebar-treepanel {\n display: flex;\n flex-direction: column;\n min-height: 50px;\n padding-top: 3px;\n}\n\n.jGIS-sidebar-propertiespanel {\n display: flex;\n flex-direction: column;\n min-height: 50px;\n padding-top: 3px;\n}\n\n.jGIS-treeview-wrapper {\n overflow: auto;\n height: 100%;\n}\n\n.jGIS-treeview-wrapper > div {\n padding: 0 !important;\n}\n/* TODO: More robust selector */\n.jGIS-treeview-wrapper div[style*='align-items: center;']:first-of-type {\n flex-grow: 1;\n}\n\n.jGIS-control-panel-tree {\n flex-grow: 1;\n}\n\n.jGIS-sidebar-propertiespanel > div {\n overflow: auto;\n}\n\n.jGIS-property-outer {\n padding: 10px;\n flex-grow: 1;\n overflow: auto;\n}\n\n.jGIS-property-buttons {\n display: flex;\n justify-content: end;\n padding: 10px;\n}\n\n.jGIS-property-panel {\n display: flex;\n flex-flow: column;\n height: 100%;\n overflow: hidden;\n}\n\n.jGIS-hidden-field {\n display: none;\n}\n\ndiv.field.field-array > label + span {\n display: none;\n}\n\n.jGIS-layer-CreationFormDialog .jp-Dialog-content {\n width: 60%;\n}\n\n.jGIS-layer-CreationFormDialog form {\n padding: 10px;\n}\n\n/* TODO Upstream this to jupyterlab jrfs */\n.jp-SchemaForm .control-label,\n.jp-SchemaForm legend {\n position: inherit;\n text-transform: capitalize;\n}\n\ndiv.jGIS-toolbar-widget > div.jp-Toolbar-item:last-child {\n flex-grow: 1;\n}\n\n.jGIS-toolbar-usertoolbar {\n flex-grow: 1;\n display: flex;\n flex-direction: row-reverse;\n}\n.jGIS-toolbar-react-widget {\n display: flex;\n flex-direction: row;\n align-items: center;\n flex-grow: 1;\n}\n\n.jGIS-Toolbar-Separator {\n width: var(--jp-border-width);\n background-color: var(--jp-border-color1);\n padding-left: 0px !important;\n padding-right: 0px !important;\n}\n\n.jGIS-toolbar-usertoolbar .jp-MenuBar-anonymousIcon,\n.jGIS-toolbar-usertoolbar .jp-MenuBar-imageIcon {\n position: unset !important;\n margin-right: 2px;\n height: 22px;\n box-sizing: border-box;\n}\n\n.jGIS-toolbar-usertoolbar .jp-MenuBar-anonymousIcon.selected,\n.jGIS-toolbar-usertoolbar .jp-MenuBar-imageIcon.selected {\n border: solid 1.5px red;\n}\n\n.jGIS-Mainview {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n}\n\n.jGIS-Annotation-Wrapper {\n position: absolute;\n opacity: 1;\n transition: opacity 0.1s linear 0.15s;\n}\n\n.jGIS-Annotation {\n z-index: 1;\n margin-left: 1px;\n margin-top: 1px;\n padding: 1em;\n color: #fff;\n background: var(--jp-layout-color1);\n border-radius: 0.5em;\n font-size: 12px;\n line-height: 1.2;\n transition: opacity 0.5s;\n}\n\n.jGIS-FloatingAnnotation {\n position: absolute;\n width: 250px;\n box-shadow: var(--jp-elevation-z6);\n}\n\n.jGIS-Annotations {\n overflow: auto;\n}\n\n.jGIS-Annotations-Separator {\n border-color: var(--jp-layout-color4);\n border-style: solid;\n border-width: 1px;\n}\n\n.jGIS-Annotation-Handler {\n position: absolute;\n top: -5px;\n left: -5px;\n width: 8px;\n height: 8px;\n border: 1px solid #ffffffc2;\n border-radius: 50%;\n background: rgb(0 0 0 / 63%);\n cursor: pointer;\n transition-property: width, height, left, top;\n transition-duration: 0.2s;\n z-index: 1000;\n}\n\n.jGIS-Annotation-Handler:hover {\n top: -9px;\n left: -9px;\n width: 16px;\n height: 16px;\n}\n\n.jGIS-Annotation-Message {\n display: flex;\n margin-top: 10px;\n gap: 5px;\n align-items: center;\n justify-content: center;\n}\n\n.jGIS-Annotation-Message .jGIS-Annotation-User-Icon {\n border-radius: 100%;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n vertical-align: middle;\n color: var(--jp-ui-font-color1);\n}\n\n.jGIS-Annotation-Message textarea {\n border-radius: var(--jp-border-radius);\n background: var(--jp-layout-color2);\n color: var(--jp-ui-font-color2);\n flex-grow: 1;\n resize: none;\n}\n\n.jGIS-Annotation-Message-Content {\n background: var(--jp-layout-color2);\n color: var(--jp-ui-font-color2);\n border-radius: var(--jp-border-radius);\n flex-grow: 1;\n}\n\n.jGIS-Annotation-Topbar {\n display: flex;\n flex-direction: row-reverse;\n}\n\n.jGIS-Annotation-TopBarIcon {\n margin: 3px;\n width: 20px;\n height: 20px;\n cursor: pointer;\n}\n\n.jGIS-Annotation-TopBarIcon > svg {\n width: 20px;\n height: 20px;\n}\n\n.jGIS-Annotation-Submit > svg {\n width: 30px;\n height: 30px;\n}\n\n.jGIS-Annotation-Submit g {\n fill: #f6f7f8 !important;\n}\n\n.jGIS-Annotation-Submit:hover {\n opacity: 70%;\n cursor: pointer;\n}\n\n.jGIS-Annotation-Submit {\n background-color: var(--jp-brand-color1);\n border-radius: 100%;\n width: 30px;\n height: 30px;\n}\n\n/* Hack to remove the malformed form button */\n.object-property-expand {\n display: none;\n}\n\n.highlight {\n background-color: var(--jp-layout-color2) !important;\n}\n.jupytergis-notebook-widget {\n height: 600px;\n width: 100%;\n}\n.jupytergis-notebook-widget > div {\n height: 100%;\n width: 100%;\n}\n\n.jp-SchemaForm .control-label,\n.jp-SchemaForm legend {\n width: 100%;\n}\n\n.jpgis-console {\n border-top: var(--jp-border-width) solid var(--jp-toolbar-border-color);\n}\n\n.jpgis-console .jp-CodeConsole-banner {\n display: none;\n}\n",""]);const d=s},432:(n,e,o)=>{var r=o(591),t=o.n(r),i=o(740),a=o.n(i),l=o(128),p=o.n(l),s=o(855),d=o.n(s),c=o(51),g=o.n(c),j=o(656),b=o.n(j),u=o(296),f={};f.styleTagTransform=b(),f.setAttributes=d(),f.insert=p().bind(null,"head"),f.domAPI=a(),f.insertStyleElement=g(),t()(u.A,f),u.A&&u.A.locals&&u.A.locals}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_jupytergis_jupytergis_lab=self.webpackChunk_jupytergis_jupytergis_lab||[]).push([[484],{484:(e,o,t)=>{t.r(o),t.d(o,{default:()=>M});var n=t(781),a=t(303),r=t(909),d=t(314),s=t(241),m=t(818),c=t(678),i=t(256),l=t(796),u=t(230),p=t(677);class g extends p.JupyterYModel{}class y extends i.Panel{constructor(e){super(),this.onResize=()=>{this._jgisWidget&&u.MessageLoop.sendMessage(this._jgisWidget,i.Widget.ResizeMessage.UnknownSize)},this.addClass("jupytergis-notebook-widget"),this._jgisWidget=new n.JupyterGISPanel(e),this.addWidget(this._jgisWidget)}}const I={id:"jupytergis:yjswidget-plugin",autoStart:!0,optional:[p.IJupyterYWidgetManager,l.ICollaborativeDrive],activate:(e,o,t)=>{o?t?o.registerWidget("@jupytergis:widget",class extends g{ydocFactory(e){const{path:o,format:n,contentType:r}=e,d=n,s=t.sharedModelFactory.createNew({path:o,format:d,contentType:r,collaborative:!0});return this.jupyterGISModel=new a.JupyterGISModel({sharedModel:s}),this.jupyterGISModel.sharedModel.ydoc}},class{constructor(e,o){this.yModel=e,this.node=o;const t=new y({model:e.jupyterGISModel});u.MessageLoop.sendMessage(t,i.Widget.Msg.BeforeAttach),o.appendChild(t.node),u.MessageLoop.sendMessage(t,i.Widget.Msg.AfterAttach)}}):console.error("Cannot setup JupyterGIS Python API without a collaborative drive"):console.error("Missing IJupyterYWidgetManager token!")}},j="jupytergis",M=[{id:"jupytergis:lab:main-menu",autoStart:!0,requires:[a.IJupyterGISDocTracker,a.IJGISFormSchemaRegistryToken,a.IJGISLayerBrowserRegistryToken,m.IStateDB],optional:[s.IMainMenu,c.ITranslator,d.ICompletionProviderManager],activate:(e,o,t,a,r,d,s,m)=>{console.log("jupytergis:lab:main-menu is activated!"),s=null!=s?s:c.nullTranslator;(0,n.createDefaultLayerRegistry)(a),(0,n.addCommands)(e,o,s,t,a,r,m);const l=new i.Menu({commands:e.commands});l.title.label=s.load("jupyterlab").__("Add Source"),l.id="jp-gis-contextmenu-addSource",e.contextMenu.addItem({type:"submenu",selector:".jp-gis-sourcePanel",rank:3,submenu:l}),l.addItem({command:n.CommandIDs.newRasterSource,args:{from:"contextMenu"}}),l.addItem({command:n.CommandIDs.newVectorSource,args:{from:"contextMenu"}}),l.addItem({command:n.CommandIDs.newGeoJSONSource,args:{from:"contextMenu"}}),l.addItem({command:n.CommandIDs.newRasterDemSource,args:{from:"contextMenu"}}),l.addItem({command:n.CommandIDs.newImageSource,args:{from:"contextMenu"}}),e.contextMenu.addItem({type:"separator",selector:".jp-gis-sourcePanel",rank:2}),e.contextMenu.addItem({selector:".jp-gis-source.jp-gis-sourceUnused",rank:1,command:n.CommandIDs.removeSource}),e.commands.addKeyBinding({command:n.CommandIDs.removeSource,keys:["Delete"],selector:".jp-gis-source.jp-gis-sourceUnused"}),e.contextMenu.addItem({selector:".jp-gis-source",rank:1,command:n.CommandIDs.renameSource}),e.commands.addKeyBinding({command:n.CommandIDs.renameSource,keys:["F2"],selector:".jp-gis-sourceItem"}),e.contextMenu.addItem({command:n.CommandIDs.symbology,selector:".jp-gis-layerItem",rank:1}),e.contextMenu.addItem({type:"separator",selector:".jp-gis-layerPanel",rank:1}),e.contextMenu.addItem({command:n.CommandIDs.removeLayer,selector:".jp-gis-layerItem",rank:2}),e.commands.addKeyBinding({command:n.CommandIDs.removeLayer,keys:["Delete"],selector:".jp-gis-layerItem"}),e.contextMenu.addItem({command:n.CommandIDs.renameLayer,selector:".jp-gis-layerItem",rank:2}),e.commands.addKeyBinding({command:n.CommandIDs.renameLayer,keys:["F2"],selector:".jp-gis-layerItem"});const u=new i.Menu({commands:e.commands});u.title.label=s.load("jupyterlab").__("Move Selected Layers to Group"),u.id="jp-gis-contextmenu-movelayer",e.contextMenu.addItem({type:"submenu",selector:".jp-gis-layerItem",rank:2,submenu:u}),e.contextMenu.opened.connect((()=>function(e,o){var t,a,r,d;if(!(null===(t=o.currentWidget)||void 0===t?void 0:t.context.model))return;const s=null===(a=o.currentWidget)||void 0===a?void 0:a.context.model,m=null!==(d=null===(r=e.menu.items.find((e=>{var o;return"submenu"===e.type&&"jp-gis-contextmenu-movelayer"===(null===(o=e.submenu)||void 0===o?void 0:o.id)})))||void 0===r?void 0:r.submenu)&&void 0!==d?d:null;if(!m)return;m.clearItems();const c=function e(o){const t=[];for(const n of o)if("string"!=typeof n&&n.layers){t.push(n.name);const o=e(n.layers);t.push(...o)}return t}(s.getLayerTree());m.addItem({command:n.CommandIDs.moveLayersToGroup,args:{label:""}}),c.forEach((e=>{m.addItem({command:n.CommandIDs.moveLayersToGroup,args:{label:e}})})),m.addItem({command:n.CommandIDs.moveLayerToNewGroup})}(e.contextMenu,o))),e.contextMenu.addItem({command:n.CommandIDs.removeGroup,selector:".jp-gis-layerGroupHeader",rank:2}),e.commands.addKeyBinding({command:n.CommandIDs.removeGroup,keys:["Delete"],selector:".jp-gis-layerGroupHeader"}),e.contextMenu.addItem({command:n.CommandIDs.renameGroup,selector:".jp-gis-layerGroupHeader",rank:2}),e.commands.addKeyBinding({command:n.CommandIDs.renameGroup,keys:["F2"],selector:".jp-gis-layerGroupHeader"}),e.contextMenu.addItem({type:"separator",selector:".jp-gis-layerPanel",rank:2});const p=new i.Menu({commands:e.commands});p.title.label=s.load("jupyterlab").__("Add Layer"),p.id="jp-gis-contextmenu-addLayer",e.contextMenu.addItem({type:"submenu",selector:".jp-gis-layerPanel",rank:3,submenu:p}),p.addItem({command:n.CommandIDs.newRasterLayer,args:{from:"contextMenu"}}),p.addItem({command:n.CommandIDs.newVectorLayer,args:{from:"contextMenu"}}),p.addItem({command:n.CommandIDs.newHillshadeLayer,args:{from:"contextMenu"}}),p.addItem({command:n.CommandIDs.newImageLayer,args:{from:"contextMenu"}}),d&&function(e,o){e.editMenu.undoers.redo.add({id:n.CommandIDs.redo,isEnabled:o}),e.editMenu.undoers.undo.add({id:n.CommandIDs.undo,isEnabled:o})}(d,(()=>null!==o.currentWidget&&o.currentWidget===e.shell.currentWidget)),e.commands.addKeyBinding({command:n.CommandIDs.executeConsole,keys:["Shift Enter"],selector:".jpgis-console .jp-CodeConsole[data-jp-interaction-mode='notebook'] .jp-CodeConsole-promptCell"}),e.commands.addKeyBinding({command:n.CommandIDs.invokeCompleter,keys:["Tab"],selector:".jpgis-console .jp-CodeConsole-promptCell .jp-mod-completer-enabled"}),e.commands.addKeyBinding({command:n.CommandIDs.selectCompleter,keys:["Enter"],selector:".jpgis-console .jp-ConsolePanel .jp-mod-completer-active"})}},{id:"jupytergis:lab:controlpanel",autoStart:!0,requires:[r.ILayoutRestorer,a.IJupyterGISDocTracker,a.IJGISFormSchemaRegistryToken,m.IStateDB],activate:(e,o,t,a,r)=>{const d=new n.ControlPanelModel({tracker:t}),s=new n.LeftPanelWidget({model:d,tracker:t,state:r});s.id="jupytergis::leftControlPanel",s.title.caption="JupyterGIS Control Panel",s.title.icon=n.logoMiniIcon;const m=new n.RightPanelWidget({model:d,tracker:t,formSchemaRegistry:a});m.id="jupytergis::rightControlPanel",m.title.caption="JupyterGIS Control Panel",m.title.icon=n.logoMiniIcon,o&&(o.add(s,j),o.add(m,j)),e.shell.add(s,"left",{rank:2e3}),e.shell.add(m,"right",{rank:2e3})}},I]}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _JUPYTERLAB;(()=>{"use strict";var e,r,t,n,a,o,i,u,l,s,f,p,d,c,h,b,g,v,y,m={450:(e,r,t)=>{var n={"./index":()=>t.e(484).then((()=>()=>t(484))),"./extension":()=>t.e(484).then((()=>()=>t(484))),"./style":()=>Promise.all([t.e(373),t.e(432)]).then((()=>()=>t(432)))},a=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),o=(e,r)=>{if(t.S){var n="default",a=t.S[n];if(a&&a!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>a,init:()=>o})}},j={};function w(e){var r=j[e];if(void 0!==r)return r.exports;var t=j[e]={id:e,exports:{}};return m[e](t,t.exports,w),t.exports}w.m=m,w.c=j,w.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return w.d(r,{a:r}),r},w.d=(e,r)=>{for(var t in r)w.o(r,t)&&!w.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},w.f={},w.e=e=>Promise.all(Object.keys(w.f).reduce(((r,t)=>(w.f[t](e,r),r)),[])),w.u=e=>e+"."+{373:"1c3d89f9ed56880711bd",432:"cdb42bd802cef0ce9e4f",484:"827d692ea7e05f72f981"}[e]+".js?v="+{373:"1c3d89f9ed56880711bd",432:"cdb42bd802cef0ce9e4f",484:"827d692ea7e05f72f981"}[e],w.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),w.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@jupytergis/jupytergis-lab:",w.l=(t,n,a,o)=>{if(e[t])e[t].push(n);else{var i,u;if(void 0!==a)for(var l=document.getElementsByTagName("script"),s=0;s<l.length;s++){var f=l[s];if(f.getAttribute("src")==t||f.getAttribute("data-webpack")==r+a){i=f;break}}i||(u=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,w.nc&&i.setAttribute("nonce",w.nc),i.setAttribute("data-webpack",r+a),i.src=t),e[t]=[n];var p=(r,n)=>{i.onerror=i.onload=null,clearTimeout(d);var a=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach((e=>e(n))),r)return r(n)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.bind(null,i.onload),u&&document.head.appendChild(i)}},w.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{w.S={};var e={},r={};w.I=(t,n)=>{n||(n=[]);var a=r[t];if(a||(a=r[t]={}),!(n.indexOf(a)>=0)){if(n.push(a),e[t])return e[t];w.o(w.S,t)||(w.S[t]={});var o=w.S[t],i="@jupytergis/jupytergis-lab",u=[];return"default"===t&&((e,r,t,n)=>{var a=o[e]=o[e]||{},u=a[r];(!u||!u.loaded&&(1!=!u.eager?n:i>u.from))&&(a[r]={get:()=>w.e(484).then((()=>()=>w(484))),from:i,eager:!1})})("@jupytergis/jupytergis-lab","0.1.3"),e[t]=u.length?Promise.all(u).then((()=>e[t]=1)):1}}})(),(()=>{var e;w.g.importScripts&&(e=w.g.location+"");var r=w.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),w.p=e})(),t=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},n=(e,r)=>{e=t(e),r=t(r);for(var n=0;;){if(n>=e.length)return n<r.length&&"u"!=(typeof r[n])[0];var a=e[n],o=(typeof a)[0];if(n>=r.length)return"u"==o;var i=r[n],u=(typeof i)[0];if(o!=u)return"o"==o&&"n"==u||"s"==u||"u"==o;if("o"!=o&&"u"!=o&&a!=i)return a<i;n++}},a=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var n=1,o=1;o<e.length;o++)n--,t+="u"==(typeof(u=e[o]))[0]?"-":(n>0?".":"")+(n=2,u);return t}var i=[];for(o=1;o<e.length;o++){var u=e[o];i.push(0===u?"not("+l()+")":1===u?"("+l()+" || "+l()+")":2===u?i.pop()+" "+i.pop():a(u))}return l();function l(){return i.pop().replace(/^\((.+)\)$/,"$1")}},o=(e,r)=>{if(0 in e){r=t(r);var n=e[0],a=n<0;a&&(n=-n-1);for(var i=0,u=1,l=!0;;u++,i++){var s,f,p=u<e.length?(typeof e[u])[0]:"";if(i>=r.length||"o"==(f=(typeof(s=r[i]))[0]))return!l||("u"==p?u>n&&!a:""==p!=a);if("u"==f){if(!l||"u"!=p)return!1}else if(l)if(p==f)if(u<=n){if(s!=e[u])return!1}else{if(a?s>e[u]:s<e[u])return!1;s!=e[u]&&(l=!1)}else if("s"!=p&&"n"!=p){if(a||u<=n)return!1;l=!1,u--}else{if(u<=n||f<p!=a)return!1;l=!1}else"s"!=p&&"n"!=p&&(l=!1,u--)}}var d=[],c=d.pop.bind(d);for(i=1;i<e.length;i++){var h=e[i];d.push(1==h?c()|c():2==h?c()&c():h?o(h,r):!c())}return!!c()},i=(e,r)=>e&&w.o(e,r),u=e=>(e.loaded=1,e.get()),l=e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}),s=(e,r,t)=>{var a=t?l(e[r]):e[r];return Object.keys(a).reduce(((e,r)=>!e||!a[e].loaded&&n(e,r)?r:e),0)},f=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+a(n)+")",p=e=>{throw new Error(e)},d=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},c=(e,r,t)=>t?t():((e,r)=>p("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),h=(e=>function(r,t,n,a,o){var i=w.I(r);return i&&i.then&&!n?i.then(e.bind(e,r,w.S[r],t,!1,a,o)):e(r,w.S[r],t,n,a,o)})(((e,r,t,n,a,l)=>{if(!i(r,t))return c(e,t,l);var p=s(r,t,n);return o(a,p)||d(f(r,t,p,a)),u(r[t][p])})),b={},g={230:()=>h("default","@lumino/messaging",!1,[1,2,0,0]),241:()=>h("default","@jupyterlab/mainmenu",!1,[1,4,2,5]),256:()=>h("default","@lumino/widgets",!1,[1,2,3,1,,"alpha",0]),303:()=>h("default","@jupytergis/schema",!1,[2,0,1,3]),314:()=>h("default","@jupyterlab/completer",!1,[1,4,2,5]),677:()=>h("default","yjs-widgets",!1,[2,0,3,5]),678:()=>h("default","@jupyterlab/translation",!1,[1,4,2,5]),781:()=>h("default","@jupytergis/base",!1,[2,0,1,3]),796:()=>h("default","@jupyter/docprovider",!1,[1,2,0,0]),818:()=>h("default","@jupyterlab/statedb",!1,[1,4,2,5]),909:()=>h("default","@jupyterlab/application",!1,[1,4,2,5])},v={484:[230,241,256,303,314,677,678,781,796,818,909]},y={},w.f.consumes=(e,r)=>{w.o(v,e)&&v[e].forEach((e=>{if(w.o(b,e))return r.push(b[e]);if(!y[e]){var t=r=>{b[e]=0,w.m[e]=t=>{delete w.c[e],t.exports=r()}};y[e]=!0;var n=r=>{delete b[e],w.m[e]=t=>{throw delete w.c[e],r}};try{var a=g[e]();a.then?r.push(b[e]=a.then(t).catch(n)):t(a)}catch(e){n(e)}}}))},(()=>{w.b=document.baseURI||self.location.href;var e={738:0};w.f.j=(r,t)=>{var n=w.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else{var a=new Promise(((t,a)=>n=e[r]=[t,a]));t.push(n[2]=a);var o=w.p+w.u(r),i=new Error;w.l(o,(t=>{if(w.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var a=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+a+": "+o+")",i.name="ChunkLoadError",i.type=a,i.request=o,n[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,a,[o,i,u]=t,l=0;if(o.some((r=>0!==e[r]))){for(n in i)w.o(i,n)&&(w.m[n]=i[n]);u&&u(w)}for(r&&r(t);l<o.length;l++)a=o[l],w.o(e,a)&&e[a]&&e[a][0](),e[a]=0},t=self.webpackChunk_jupytergis_jupytergis_lab=self.webpackChunk_jupytergis_jupytergis_lab||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),w.nc=void 0;var S=w(450);(_JUPYTERLAB=void 0===_JUPYTERLAB?{}:_JUPYTERLAB)["@jupytergis/jupytergis-lab"]=S})();
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
"name": "@jupytergis/base",
|
|
11
|
-
"versionInfo": "0.1.
|
|
11
|
+
"versionInfo": "0.1.3",
|
|
12
12
|
"licenseId": "BSD-3-Clause",
|
|
13
13
|
"extractedText": ""
|
|
14
14
|
},
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"name": "ol",
|
|
29
|
-
"versionInfo": "10.
|
|
29
|
+
"versionInfo": "10.2.0",
|
|
30
30
|
"licenseId": "BSD-2-Clause",
|
|
31
31
|
"extractedText": "BSD 2-Clause License\n\nCopyright 2005-present, OpenLayers Contributors\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
|
|
32
32
|
},
|
|
@@ -4,30 +4,29 @@ import json
|
|
|
4
4
|
import logging
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
from typing import Any, Dict, List, Literal, Optional, Union
|
|
7
|
+
from uuid import uuid4
|
|
7
8
|
|
|
8
9
|
from pycrdt import Array, Doc, Map
|
|
9
10
|
from pydantic import BaseModel
|
|
10
11
|
from ypywidgets.comm import CommWidget
|
|
11
12
|
|
|
12
|
-
from uuid import uuid4
|
|
13
|
-
|
|
14
|
-
from .utils import normalize_path, get_source_layer_names
|
|
15
|
-
|
|
16
13
|
from .objects import (
|
|
17
|
-
|
|
18
|
-
SourceType,
|
|
14
|
+
IGeoJSONSource,
|
|
19
15
|
IHillshadeLayer,
|
|
20
16
|
IImageLayer,
|
|
17
|
+
IImageSource,
|
|
21
18
|
IRasterLayer,
|
|
22
19
|
IRasterSource,
|
|
23
|
-
IVectorTileSource,
|
|
24
20
|
IVectorLayer,
|
|
25
21
|
IVectorTileLayer,
|
|
26
|
-
|
|
27
|
-
IImageSource,
|
|
22
|
+
IVectorTileSource,
|
|
28
23
|
IVideoSource,
|
|
29
|
-
|
|
24
|
+
IGeoTiffSource,
|
|
25
|
+
IWebGlLayer,
|
|
26
|
+
LayerType,
|
|
27
|
+
SourceType,
|
|
30
28
|
)
|
|
29
|
+
from .utils import get_source_layer_names, normalize_path
|
|
31
30
|
|
|
32
31
|
logger = logging.getLogger(__file__)
|
|
33
32
|
|
|
@@ -49,7 +48,7 @@ class GISDocument(CommWidget):
|
|
|
49
48
|
extent: Optional[List[float]] = None,
|
|
50
49
|
bearing: Optional[float] = None,
|
|
51
50
|
pitch: Optional[float] = None,
|
|
52
|
-
projection: Optional[str] = None
|
|
51
|
+
projection: Optional[str] = None,
|
|
53
52
|
):
|
|
54
53
|
comm_metadata = GISDocument._path_to_comm(path)
|
|
55
54
|
|
|
@@ -79,7 +78,7 @@ class GISDocument(CommWidget):
|
|
|
79
78
|
if pitch is not None:
|
|
80
79
|
self._options["pitch"] = pitch
|
|
81
80
|
if projection is not None:
|
|
82
|
-
self._options[
|
|
81
|
+
self._options["projection"] = projection
|
|
83
82
|
|
|
84
83
|
@property
|
|
85
84
|
def layers(self) -> Dict:
|
|
@@ -147,12 +146,11 @@ class GISDocument(CommWidget):
|
|
|
147
146
|
type: Literal["circle", "fill", "line"] = "line",
|
|
148
147
|
color: str = "#FF0000",
|
|
149
148
|
opacity: float = 1,
|
|
150
|
-
logical_op:str | None = None,
|
|
151
|
-
feature:str | None = None,
|
|
152
|
-
operator:str | None = None,
|
|
153
|
-
value:Union[str, float, float] | None = None
|
|
149
|
+
logical_op: str | None = None,
|
|
150
|
+
feature: str | None = None,
|
|
151
|
+
operator: str | None = None,
|
|
152
|
+
value: Union[str, float, float] | None = None,
|
|
154
153
|
):
|
|
155
|
-
|
|
156
154
|
"""
|
|
157
155
|
Add a Vector Tile Layer to the document.
|
|
158
156
|
|
|
@@ -166,7 +164,7 @@ class GISDocument(CommWidget):
|
|
|
166
164
|
if source_layer is None and len(source_layers) == 1:
|
|
167
165
|
source_layer = source_layers[0]
|
|
168
166
|
if source_layer not in source_layers:
|
|
169
|
-
raise ValueError(f
|
|
167
|
+
raise ValueError(f"source_layer should be one of {source_layers}")
|
|
170
168
|
|
|
171
169
|
source = {
|
|
172
170
|
"type": SourceType.VectorTileSource,
|
|
@@ -199,14 +197,10 @@ class GISDocument(CommWidget):
|
|
|
199
197
|
},
|
|
200
198
|
"filters": {
|
|
201
199
|
"appliedFilters": [
|
|
202
|
-
{
|
|
203
|
-
"feature": feature,
|
|
204
|
-
"operator": operator,
|
|
205
|
-
"value": value
|
|
206
|
-
}
|
|
200
|
+
{"feature": feature, "operator": operator, "value": value}
|
|
207
201
|
],
|
|
208
|
-
"logicalOp": logical_op
|
|
209
|
-
|
|
202
|
+
"logicalOp": logical_op,
|
|
203
|
+
},
|
|
210
204
|
}
|
|
211
205
|
|
|
212
206
|
return self._add_layer(OBJECT_FACTORY.create_layer(layer, self))
|
|
@@ -219,10 +213,10 @@ class GISDocument(CommWidget):
|
|
|
219
213
|
type: "circle" | "fill" | "line" = "line",
|
|
220
214
|
color: str = "#FF0000",
|
|
221
215
|
opacity: float = 1,
|
|
222
|
-
logical_op:str | None = None,
|
|
223
|
-
feature:str | None = None,
|
|
224
|
-
operator:str | None = None,
|
|
225
|
-
value:Union[str, number, float] | None = None
|
|
216
|
+
logical_op: str | None = None,
|
|
217
|
+
feature: str | None = None,
|
|
218
|
+
operator: str | None = None,
|
|
219
|
+
value: Union[str, number, float] | None = None,
|
|
226
220
|
):
|
|
227
221
|
"""
|
|
228
222
|
Add a GeoJSON Layer to the document.
|
|
@@ -269,16 +263,12 @@ class GISDocument(CommWidget):
|
|
|
269
263
|
"color": color,
|
|
270
264
|
"opacity": opacity,
|
|
271
265
|
},
|
|
272
|
-
|
|
266
|
+
"filters": {
|
|
273
267
|
"appliedFilters": [
|
|
274
|
-
{
|
|
275
|
-
"feature": feature,
|
|
276
|
-
"operator": operator,
|
|
277
|
-
"value": value
|
|
278
|
-
}
|
|
268
|
+
{"feature": feature, "operator": operator, "value": value}
|
|
279
269
|
],
|
|
280
|
-
"logicalOp": logical_op
|
|
281
|
-
|
|
270
|
+
"logicalOp": logical_op,
|
|
271
|
+
},
|
|
282
272
|
}
|
|
283
273
|
|
|
284
274
|
return self._add_layer(OBJECT_FACTORY.create_layer(layer, self))
|
|
@@ -305,10 +295,7 @@ class GISDocument(CommWidget):
|
|
|
305
295
|
source = {
|
|
306
296
|
"type": SourceType.ImageSource,
|
|
307
297
|
"name": f"{name} Source",
|
|
308
|
-
"parameters": {
|
|
309
|
-
"url": url,
|
|
310
|
-
"coordinates": coordinates
|
|
311
|
-
},
|
|
298
|
+
"parameters": {"url": url, "coordinates": coordinates},
|
|
312
299
|
}
|
|
313
300
|
|
|
314
301
|
source_id = self._add_source(OBJECT_FACTORY.create_source(source, self))
|
|
@@ -344,10 +331,7 @@ class GISDocument(CommWidget):
|
|
|
344
331
|
source = {
|
|
345
332
|
"type": SourceType.VideoSource,
|
|
346
333
|
"name": f"{name} Source",
|
|
347
|
-
"parameters": {
|
|
348
|
-
"urls": urls,
|
|
349
|
-
"coordinates": coordinates
|
|
350
|
-
},
|
|
334
|
+
"parameters": {"urls": urls, "coordinates": coordinates},
|
|
351
335
|
}
|
|
352
336
|
|
|
353
337
|
source_id = self._add_source(OBJECT_FACTORY.create_source(source, self))
|
|
@@ -361,7 +345,116 @@ class GISDocument(CommWidget):
|
|
|
361
345
|
|
|
362
346
|
return self._add_layer(OBJECT_FACTORY.create_layer(layer, self))
|
|
363
347
|
|
|
364
|
-
def
|
|
348
|
+
def add_tiff_layer(
|
|
349
|
+
self,
|
|
350
|
+
url: str,
|
|
351
|
+
min: int = None,
|
|
352
|
+
max: int = None,
|
|
353
|
+
name: str = "Tiff Layer",
|
|
354
|
+
normalize: bool = True,
|
|
355
|
+
wrapX: bool = False,
|
|
356
|
+
attribution: str = "",
|
|
357
|
+
opacity: float = 1.0,
|
|
358
|
+
color_expr=None,
|
|
359
|
+
):
|
|
360
|
+
"""
|
|
361
|
+
Add a tiff layer
|
|
362
|
+
|
|
363
|
+
:param str url: URL of the tif
|
|
364
|
+
:param int min: Minimum pixel value to be displayed, defaults to letting the map display set the value
|
|
365
|
+
:param int max: Maximum pixel value to be displayed, defaults to letting the map display set the value
|
|
366
|
+
:param str name: The name that will be used for the object in the document, defaults to "Tiff Layer"
|
|
367
|
+
:param bool normalize: Select whether to normalize values between 0..1, if false than min/max have no effect, defaults to True
|
|
368
|
+
:param bool wrapX: Render tiles beyond the tile grid extent, defaults to False
|
|
369
|
+
:param float opacity: The opacity, between 0 and 1, defaults to 1.0
|
|
370
|
+
:param _type_ color_expr: The style expression used to style the layer, defaults to None
|
|
371
|
+
"""
|
|
372
|
+
|
|
373
|
+
source = {
|
|
374
|
+
"type": SourceType.GeoTiffSource,
|
|
375
|
+
"name": f"{name} Source",
|
|
376
|
+
"parameters": {
|
|
377
|
+
"urls": [{"url": url, "min": min, "max": max}],
|
|
378
|
+
"normalize": normalize,
|
|
379
|
+
"wrapX": wrapX,
|
|
380
|
+
},
|
|
381
|
+
}
|
|
382
|
+
source_id = self._add_source(OBJECT_FACTORY.create_source(source, self))
|
|
383
|
+
|
|
384
|
+
layer = {
|
|
385
|
+
"type": LayerType.WebGlLayer,
|
|
386
|
+
"name": name,
|
|
387
|
+
"visible": True,
|
|
388
|
+
"parameters": {
|
|
389
|
+
"source": source_id,
|
|
390
|
+
"opacity": opacity,
|
|
391
|
+
"color": color_expr,
|
|
392
|
+
},
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
return self._add_layer(OBJECT_FACTORY.create_layer(layer, self))
|
|
396
|
+
|
|
397
|
+
def create_color_expr(
|
|
398
|
+
self,
|
|
399
|
+
color_stops: Dict,
|
|
400
|
+
band: float = 1.0,
|
|
401
|
+
interpolation_type: str = "linear",
|
|
402
|
+
):
|
|
403
|
+
"""
|
|
404
|
+
Create a color expression used to style the layer
|
|
405
|
+
|
|
406
|
+
:param Dict color_stops: Dictionary of stop values to [r, g, b, a] colors
|
|
407
|
+
:param float band: The band to be colored, defaults to 1.0
|
|
408
|
+
:param str interpolation_type: The interpolation function. Can be linear, discrete, or exact, defaults to 'linear'
|
|
409
|
+
"""
|
|
410
|
+
|
|
411
|
+
if interpolation_type not in ["linear", "discrete", "exact"]:
|
|
412
|
+
raise ValueError(
|
|
413
|
+
"Interpolation type must be one of linear, discrete, or exact"
|
|
414
|
+
)
|
|
415
|
+
|
|
416
|
+
color = []
|
|
417
|
+
if interpolation_type == "linear":
|
|
418
|
+
color = ["interpolate", ["linear"]]
|
|
419
|
+
color.append(["band", band])
|
|
420
|
+
# Transparency for nodata
|
|
421
|
+
color.append(0.0)
|
|
422
|
+
color.append([0.0, 0.0, 0.0, 0.0])
|
|
423
|
+
|
|
424
|
+
for value, colorVal in color_stops.items():
|
|
425
|
+
color.append(value)
|
|
426
|
+
color.append(colorVal)
|
|
427
|
+
|
|
428
|
+
return color
|
|
429
|
+
|
|
430
|
+
if interpolation_type == "discrete":
|
|
431
|
+
operator = "<="
|
|
432
|
+
|
|
433
|
+
if interpolation_type == "exact":
|
|
434
|
+
operator = "=="
|
|
435
|
+
|
|
436
|
+
color = ["case"]
|
|
437
|
+
# Transparency for nodata
|
|
438
|
+
color.append(["==", ["band", band], 0.0])
|
|
439
|
+
color.append([0.0, 0.0, 0.0, 0.0])
|
|
440
|
+
|
|
441
|
+
for value, colorVal in color_stops.items():
|
|
442
|
+
color.append([operator, ["band", band], value])
|
|
443
|
+
color.append(colorVal)
|
|
444
|
+
|
|
445
|
+
# Fallback color
|
|
446
|
+
color.append([0.0, 0.0, 0.0, 1.0])
|
|
447
|
+
|
|
448
|
+
return color
|
|
449
|
+
|
|
450
|
+
def add_filter(
|
|
451
|
+
self,
|
|
452
|
+
layer_id: str,
|
|
453
|
+
logical_op: str,
|
|
454
|
+
feature: str,
|
|
455
|
+
operator: str,
|
|
456
|
+
value: Union[str, number, float],
|
|
457
|
+
):
|
|
365
458
|
"""
|
|
366
459
|
Add a filter to a layer
|
|
367
460
|
|
|
@@ -378,30 +471,36 @@ class GISDocument(CommWidget):
|
|
|
378
471
|
raise ValueError(f"No layer found with ID: {layer_id}")
|
|
379
472
|
|
|
380
473
|
# Initialize filters if it doesn't exist
|
|
381
|
-
if
|
|
382
|
-
layer[
|
|
383
|
-
|
|
384
|
-
{
|
|
385
|
-
'feature': feature,
|
|
386
|
-
'operator': operator,
|
|
387
|
-
'value': value
|
|
388
|
-
}
|
|
474
|
+
if "filters" not in layer:
|
|
475
|
+
layer["filters"] = {
|
|
476
|
+
"appliedFilters": [
|
|
477
|
+
{"feature": feature, "operator": operator, "value": value}
|
|
389
478
|
],
|
|
390
|
-
|
|
479
|
+
"logicalOp": logical_op,
|
|
480
|
+
}
|
|
391
481
|
|
|
392
482
|
self._layers[layer_id] = layer
|
|
393
483
|
return
|
|
394
484
|
|
|
395
485
|
# Add new filter
|
|
396
|
-
filters = layer[
|
|
397
|
-
filters[
|
|
486
|
+
filters = layer["filters"]
|
|
487
|
+
filters["appliedFilters"].append(
|
|
488
|
+
{"feature": feature, "operator": operator, "value": value}
|
|
489
|
+
)
|
|
398
490
|
|
|
399
491
|
# update the logical operation
|
|
400
|
-
filters[
|
|
492
|
+
filters["logicalOp"] = logical_op
|
|
401
493
|
|
|
402
494
|
self._layers[layer_id] = layer
|
|
403
495
|
|
|
404
|
-
def update_filter(
|
|
496
|
+
def update_filter(
|
|
497
|
+
self,
|
|
498
|
+
layer_id: str,
|
|
499
|
+
logical_op: str,
|
|
500
|
+
feature: str,
|
|
501
|
+
operator: str,
|
|
502
|
+
value: Union[str, number, float],
|
|
503
|
+
):
|
|
405
504
|
"""
|
|
406
505
|
Update a filter applied to a layer
|
|
407
506
|
|
|
@@ -417,20 +516,25 @@ class GISDocument(CommWidget):
|
|
|
417
516
|
if layer is None:
|
|
418
517
|
raise ValueError(f"No layer found with ID: {layer_id}")
|
|
419
518
|
|
|
420
|
-
if
|
|
519
|
+
if "filters" not in layer:
|
|
421
520
|
raise ValueError(f"No filters applied to layer: {layer_id}")
|
|
422
521
|
|
|
423
522
|
# Find the feature within the layer
|
|
424
|
-
feature = next(
|
|
523
|
+
feature = next(
|
|
524
|
+
(f for f in layer["filters"]["appliedFilters"] if f["feature"] == feature),
|
|
525
|
+
None,
|
|
526
|
+
)
|
|
425
527
|
if feature is None:
|
|
426
|
-
raise ValueError(
|
|
528
|
+
raise ValueError(
|
|
529
|
+
f"No feature found with ID: {feature} in layer: {layer_id}"
|
|
530
|
+
)
|
|
427
531
|
return
|
|
428
532
|
|
|
429
533
|
# Update the feature value
|
|
430
|
-
feature[
|
|
534
|
+
feature["value"] = value
|
|
431
535
|
|
|
432
536
|
# update the logical operation
|
|
433
|
-
layer[
|
|
537
|
+
layer["filters"]["logicalOp"] = logical_op
|
|
434
538
|
|
|
435
539
|
self._layers[layer_id] = layer
|
|
436
540
|
|
|
@@ -446,10 +550,10 @@ class GISDocument(CommWidget):
|
|
|
446
550
|
if layer is None:
|
|
447
551
|
raise ValueError(f"No layer found with ID: {layer_id}")
|
|
448
552
|
|
|
449
|
-
if
|
|
553
|
+
if "filters" not in layer:
|
|
450
554
|
raise ValueError(f"No filters applied to layer: {layer_id}")
|
|
451
555
|
|
|
452
|
-
layer[
|
|
556
|
+
layer["filters"]["appliedFilters"] = []
|
|
453
557
|
self._layers[layer_id] = layer
|
|
454
558
|
|
|
455
559
|
def _add_source(self, new_object: "JGISObject"):
|
|
@@ -508,7 +612,7 @@ class JGISLayer(BaseModel):
|
|
|
508
612
|
IVectorTileLayer,
|
|
509
613
|
IHillshadeLayer,
|
|
510
614
|
IImageLayer,
|
|
511
|
-
IWebGlLayer
|
|
615
|
+
IWebGlLayer,
|
|
512
616
|
]
|
|
513
617
|
_parent = Optional[GISDocument]
|
|
514
618
|
|
|
@@ -529,7 +633,8 @@ class JGISSource(BaseModel):
|
|
|
529
633
|
IVectorTileSource,
|
|
530
634
|
IGeoJSONSource,
|
|
531
635
|
IImageSource,
|
|
532
|
-
IVideoSource
|
|
636
|
+
IVideoSource,
|
|
637
|
+
IGeoTiffSource,
|
|
533
638
|
]
|
|
534
639
|
_parent = Optional[GISDocument]
|
|
535
640
|
|
|
@@ -576,7 +681,7 @@ class ObjectFactoryManager(metaclass=SingletonMeta):
|
|
|
576
681
|
visible=visible,
|
|
577
682
|
type=object_type,
|
|
578
683
|
parameters=obj_params,
|
|
579
|
-
filters=filters
|
|
684
|
+
filters=filters,
|
|
580
685
|
)
|
|
581
686
|
|
|
582
687
|
return None
|
|
@@ -614,3 +719,4 @@ OBJECT_FACTORY.register_factory(SourceType.RasterSource, IRasterSource)
|
|
|
614
719
|
OBJECT_FACTORY.register_factory(SourceType.GeoJSONSource, IGeoJSONSource)
|
|
615
720
|
OBJECT_FACTORY.register_factory(SourceType.ImageSource, IImageSource)
|
|
616
721
|
OBJECT_FACTORY.register_factory(SourceType.VideoSource, IVideoSource)
|
|
722
|
+
OBJECT_FACTORY.register_factory(SourceType.GeoTiffSource, IGeoTiffSource)
|
|
@@ -12,3 +12,4 @@ from ._schema.rastersource import IRasterSource # noqa
|
|
|
12
12
|
from ._schema.geojsonsource import IGeoJSONSource # noqa
|
|
13
13
|
from ._schema.videoSource import IVideoSource # noqa
|
|
14
14
|
from ._schema.imageSource import IImageSource # noqa
|
|
15
|
+
from ._schema.geoTiffSource import IGeoTiffSource # noqa
|