jupytergis-lab 0.1.2__tar.gz → 0.1.4__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.2 → jupytergis_lab-0.1.4}/PKG-INFO +1 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/__init__.py +6 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/_version.py +1 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/labextension/package.json +5 -5
- jupytergis_lab-0.1.2/jupytergis_lab/labextension/static/432.28aaec36233a73d1589c.js → jupytergis_lab-0.1.4/jupytergis_lab/labextension/static/432.ba3e6917bbe7f65d5b36.js +1 -1
- jupytergis_lab-0.1.4/jupytergis_lab/labextension/static/484.5ed04fc66325e94706ec.js +1 -0
- jupytergis_lab-0.1.4/jupytergis_lab/labextension/static/remoteEntry.eaa6f7cd9f41a9a55ba8.js +1 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/labextension/static/third-party-licenses.json +2 -2
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/gis_document.py +122 -94
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/objects/_schema/__init__.py +1 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/objects/_schema/geoTiffSource.py +1 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/objects/_schema/geojsonsource.py +1 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/objects/_schema/hillshadeLayer.py +1 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/objects/_schema/imageLayer.py +1 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/objects/_schema/imageSource.py +1 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/objects/_schema/jgis.py +2 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/objects/_schema/rasterDemSource.py +1 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/objects/_schema/rasterlayer.py +1 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/objects/_schema/rastersource.py +1 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/objects/_schema/shapefileSource.py +1 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/objects/_schema/vectorTileLayer.py +1 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/objects/_schema/vectorlayer.py +1 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/objects/_schema/vectortilesource.py +1 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/objects/_schema/videoSource.py +1 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/objects/_schema/webGlLayer.py +1 -1
- jupytergis_lab-0.1.4/jupytergis_lab/notebook/tests/test_api.py +48 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/utils.py +1 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/package.json +4 -4
- jupytergis_lab-0.1.4/tsconfig.tsbuildinfo +1 -0
- jupytergis_lab-0.1.2/jupytergis_lab/labextension/static/484.bfbeec299fb2543b6a74.js +0 -1
- jupytergis_lab-0.1.2/jupytergis_lab/labextension/static/remoteEntry.cd623e659dc416320248.js +0 -1
- jupytergis_lab-0.1.2/jupytergis_lab/notebook/tests/test_api.py +0 -62
- jupytergis_lab-0.1.2/tsconfig.tsbuildinfo +0 -1
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/.gitignore +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/.prettierignore +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/LICENSE +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/README.md +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/install.json +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/labextension/static/373.1c3d89f9ed56880711bd.js +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/labextension/static/style.js +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/__init__.py +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/objects/__init__.py +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/tests/__init__.py +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/jupytergis_lab/notebook/y_connector.py +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/lib/index.d.ts +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/lib/index.js +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/lib/notebookrenderer.d.ts +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/lib/notebookrenderer.js +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/pyproject.toml +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/scripts/bump-version.py +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/setup.py +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/src/index.ts +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/src/notebookrenderer.ts +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/style/base.css +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/style/index.css +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/style/index.js +0 -0
- {jupytergis_lab-0.1.2 → jupytergis_lab-0.1.4}/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.4",
|
|
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.4",
|
|
57
|
+
"@jupytergis/jupytergis-core": "^0.1.4",
|
|
58
|
+
"@jupytergis/schema": "^0.1.4",
|
|
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.eaa6f7cd9f41a9a55ba8.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(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 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},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.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(880),a=t(390),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,a,n,o,i,u,l,s,f,p,d,c,h,g,v,b,y,m={450:(e,r,t)=>{var a={"./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)))},n=(e,r)=>(t.R=r,r=t.o(a,e)?a[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 a="default",n=t.S[a];if(n&&n!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[a]=e,t.I(a,r)}};t.d(r,{get:()=>n,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:"ba3e6917bbe7f65d5b36",484:"5ed04fc66325e94706ec"}[e]+".js?v="+{373:"1c3d89f9ed56880711bd",432:"ba3e6917bbe7f65d5b36",484:"5ed04fc66325e94706ec"}[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,a,n,o)=>{if(e[t])e[t].push(a);else{var i,u;if(void 0!==n)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+n){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+n),i.src=t),e[t]=[a];var p=(r,a)=>{i.onerror=i.onload=null,clearTimeout(d);var n=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),n&&n.forEach((e=>e(a))),r)return r(a)},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,a)=>{a||(a=[]);var n=r[t];if(n||(n=r[t]={}),!(a.indexOf(n)>=0)){if(a.push(n),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,a)=>{var n=o[e]=o[e]||{},u=n[r];(!u||!u.loaded&&(1!=!u.eager?a:i>u.from))&&(n[r]={get:()=>w.e(484).then((()=>()=>w(484))),from:i,eager:!1})})("@jupytergis/jupytergis-lab","0.1.4"),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 a=t.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=t[a--].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),a=t[1]?r(t[1]):[];return t[2]&&(a.length++,a.push.apply(a,r(t[2]))),t[3]&&(a.push([]),a.push.apply(a,r(t[3]))),a},a=(e,r)=>{e=t(e),r=t(r);for(var a=0;;){if(a>=e.length)return a<r.length&&"u"!=(typeof r[a])[0];var n=e[a],o=(typeof n)[0];if(a>=r.length)return"u"==o;var i=r[a],u=(typeof i)[0];if(o!=u)return"o"==o&&"n"==u||"s"==u||"u"==o;if("o"!=o&&"u"!=o&&n!=i)return n<i;a++}},n=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 a=1,o=1;o<e.length;o++)a--,t+="u"==(typeof(u=e[o]))[0]?"-":(a>0?".":"")+(a=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():n(u))}return l();function l(){return i.pop().replace(/^\((.+)\)$/,"$1")}},o=(e,r)=>{if(0 in e){r=t(r);var a=e[0],n=a<0;n&&(a=-a-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>a&&!n:""==p!=n);if("u"==f){if(!l||"u"!=p)return!1}else if(l)if(p==f)if(u<=a){if(s!=e[u])return!1}else{if(n?s>e[u]:s<e[u])return!1;s!=e[u]&&(l=!1)}else if("s"!=p&&"n"!=p){if(n||u<=a)return!1;l=!1,u--}else{if(u<=a||f<p!=n)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 n=t?l(e[r]):e[r];return Object.keys(n).reduce(((e,r)=>!e||!n[e].loaded&&a(e,r)?r:e),0)},f=(e,r,t,a)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+n(a)+")",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,a,n,o){var i=w.I(r);return i&&i.then&&!a?i.then(e.bind(e,r,w.S[r],t,!1,n,o)):e(r,w.S[r],t,a,n,o)})(((e,r,t,a,n,l)=>{if(!i(r,t))return c(e,t,l);var p=s(r,t,a);return o(n,p)||d(f(r,t,p,n)),u(r[t][p])})),g={},v={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]),314:()=>h("default","@jupyterlab/completer",!1,[1,4,2,5]),390:()=>h("default","@jupytergis/schema",!1,[2,0,1,4]),677:()=>h("default","yjs-widgets",!1,[2,0,3,5]),678:()=>h("default","@jupyterlab/translation",!1,[1,4,2,5]),796:()=>h("default","@jupyter/docprovider",!1,[1,2,0,0]),818:()=>h("default","@jupyterlab/statedb",!1,[1,4,2,5]),880:()=>h("default","@jupytergis/base",!1,[2,0,1,4]),909:()=>h("default","@jupyterlab/application",!1,[1,4,2,5])},b={484:[230,241,256,314,390,677,678,796,818,880,909]},y={},w.f.consumes=(e,r)=>{w.o(b,e)&&b[e].forEach((e=>{if(w.o(g,e))return r.push(g[e]);if(!y[e]){var t=r=>{g[e]=0,w.m[e]=t=>{delete w.c[e],t.exports=r()}};y[e]=!0;var a=r=>{delete g[e],w.m[e]=t=>{throw delete w.c[e],r}};try{var n=v[e]();n.then?r.push(g[e]=n.then(t).catch(a)):t(n)}catch(e){a(e)}}}))},(()=>{w.b=document.baseURI||self.location.href;var e={738:0};w.f.j=(r,t)=>{var a=w.o(e,r)?e[r]:void 0;if(0!==a)if(a)t.push(a[2]);else{var n=new Promise(((t,n)=>a=e[r]=[t,n]));t.push(a[2]=n);var o=w.p+w.u(r),i=new Error;w.l(o,(t=>{if(w.o(e,r)&&(0!==(a=e[r])&&(e[r]=void 0),a)){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+n+": "+o+")",i.name="ChunkLoadError",i.type=n,i.request=o,a[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var a,n,[o,i,u]=t,l=0;if(o.some((r=>0!==e[r]))){for(a in i)w.o(i,a)&&(w.m[a]=i[a]);u&&u(w)}for(r&&r(t);l<o.length;l++)n=o[l],w.o(e,n)&&e[n]&&e[n][0](),e[n]=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.4",
|
|
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
|
},
|
|
@@ -31,6 +31,12 @@ from .utils import get_source_layer_names, normalize_path
|
|
|
31
31
|
logger = logging.getLogger(__file__)
|
|
32
32
|
|
|
33
33
|
|
|
34
|
+
def reversed_tree(root):
|
|
35
|
+
if isinstance(root, list):
|
|
36
|
+
return reversed([reversed_tree(el) for el in root])
|
|
37
|
+
return root
|
|
38
|
+
|
|
39
|
+
|
|
34
40
|
class GISDocument(CommWidget):
|
|
35
41
|
"""
|
|
36
42
|
Create a new GISDocument object.
|
|
@@ -48,7 +54,7 @@ class GISDocument(CommWidget):
|
|
|
48
54
|
extent: Optional[List[float]] = None,
|
|
49
55
|
bearing: Optional[float] = None,
|
|
50
56
|
pitch: Optional[float] = None,
|
|
51
|
-
projection: Optional[str] = None
|
|
57
|
+
projection: Optional[str] = None,
|
|
52
58
|
):
|
|
53
59
|
comm_metadata = GISDocument._path_to_comm(path)
|
|
54
60
|
|
|
@@ -78,7 +84,7 @@ class GISDocument(CommWidget):
|
|
|
78
84
|
if pitch is not None:
|
|
79
85
|
self._options["pitch"] = pitch
|
|
80
86
|
if projection is not None:
|
|
81
|
-
self._options[
|
|
87
|
+
self._options["projection"] = projection
|
|
82
88
|
|
|
83
89
|
@property
|
|
84
90
|
def layers(self) -> Dict:
|
|
@@ -94,6 +100,18 @@ class GISDocument(CommWidget):
|
|
|
94
100
|
"""
|
|
95
101
|
return self._layerTree.to_py()
|
|
96
102
|
|
|
103
|
+
def export_to_qgis(self, path: str) -> bool:
|
|
104
|
+
# Lazy import, jupytergis_qgis of qgis may not be installed
|
|
105
|
+
from jupytergis_qgis.qgis_loader import export_project_to_qgis
|
|
106
|
+
|
|
107
|
+
virtual_file = {
|
|
108
|
+
"layers": self._layers.to_py(),
|
|
109
|
+
"sources": self._sources.to_py(),
|
|
110
|
+
"layerTree": reversed_tree(self._layerTree.to_py()),
|
|
111
|
+
"options": self._options.to_py(),
|
|
112
|
+
}
|
|
113
|
+
return export_project_to_qgis(path, virtual_file)
|
|
114
|
+
|
|
97
115
|
def add_raster_layer(
|
|
98
116
|
self,
|
|
99
117
|
url: str,
|
|
@@ -146,12 +164,11 @@ class GISDocument(CommWidget):
|
|
|
146
164
|
type: Literal["circle", "fill", "line"] = "line",
|
|
147
165
|
color: str = "#FF0000",
|
|
148
166
|
opacity: float = 1,
|
|
149
|
-
logical_op:str | None = None,
|
|
150
|
-
feature:str | None = None,
|
|
151
|
-
operator:str | None = None,
|
|
152
|
-
value:Union[str, float, float] | None = None
|
|
167
|
+
logical_op: str | None = None,
|
|
168
|
+
feature: str | None = None,
|
|
169
|
+
operator: str | None = None,
|
|
170
|
+
value: Union[str, float, float] | None = None,
|
|
153
171
|
):
|
|
154
|
-
|
|
155
172
|
"""
|
|
156
173
|
Add a Vector Tile Layer to the document.
|
|
157
174
|
|
|
@@ -165,7 +182,7 @@ class GISDocument(CommWidget):
|
|
|
165
182
|
if source_layer is None and len(source_layers) == 1:
|
|
166
183
|
source_layer = source_layers[0]
|
|
167
184
|
if source_layer not in source_layers:
|
|
168
|
-
raise ValueError(f
|
|
185
|
+
raise ValueError(f"source_layer should be one of {source_layers}")
|
|
169
186
|
|
|
170
187
|
source = {
|
|
171
188
|
"type": SourceType.VectorTileSource,
|
|
@@ -198,14 +215,10 @@ class GISDocument(CommWidget):
|
|
|
198
215
|
},
|
|
199
216
|
"filters": {
|
|
200
217
|
"appliedFilters": [
|
|
201
|
-
{
|
|
202
|
-
"feature": feature,
|
|
203
|
-
"operator": operator,
|
|
204
|
-
"value": value
|
|
205
|
-
}
|
|
218
|
+
{"feature": feature, "operator": operator, "value": value}
|
|
206
219
|
],
|
|
207
|
-
"logicalOp": logical_op
|
|
208
|
-
|
|
220
|
+
"logicalOp": logical_op,
|
|
221
|
+
},
|
|
209
222
|
}
|
|
210
223
|
|
|
211
224
|
return self._add_layer(OBJECT_FACTORY.create_layer(layer, self))
|
|
@@ -218,10 +231,10 @@ class GISDocument(CommWidget):
|
|
|
218
231
|
type: "circle" | "fill" | "line" = "line",
|
|
219
232
|
color: str = "#FF0000",
|
|
220
233
|
opacity: float = 1,
|
|
221
|
-
logical_op:str | None = None,
|
|
222
|
-
feature:str | None = None,
|
|
223
|
-
operator:str | None = None,
|
|
224
|
-
value:Union[str, number, float] | None = None
|
|
234
|
+
logical_op: str | None = None,
|
|
235
|
+
feature: str | None = None,
|
|
236
|
+
operator: str | None = None,
|
|
237
|
+
value: Union[str, number, float] | None = None,
|
|
225
238
|
):
|
|
226
239
|
"""
|
|
227
240
|
Add a GeoJSON Layer to the document.
|
|
@@ -268,16 +281,12 @@ class GISDocument(CommWidget):
|
|
|
268
281
|
"color": color,
|
|
269
282
|
"opacity": opacity,
|
|
270
283
|
},
|
|
271
|
-
|
|
284
|
+
"filters": {
|
|
272
285
|
"appliedFilters": [
|
|
273
|
-
{
|
|
274
|
-
"feature": feature,
|
|
275
|
-
"operator": operator,
|
|
276
|
-
"value": value
|
|
277
|
-
}
|
|
286
|
+
{"feature": feature, "operator": operator, "value": value}
|
|
278
287
|
],
|
|
279
|
-
"logicalOp": logical_op
|
|
280
|
-
|
|
288
|
+
"logicalOp": logical_op,
|
|
289
|
+
},
|
|
281
290
|
}
|
|
282
291
|
|
|
283
292
|
return self._add_layer(OBJECT_FACTORY.create_layer(layer, self))
|
|
@@ -304,10 +313,7 @@ class GISDocument(CommWidget):
|
|
|
304
313
|
source = {
|
|
305
314
|
"type": SourceType.ImageSource,
|
|
306
315
|
"name": f"{name} Source",
|
|
307
|
-
"parameters": {
|
|
308
|
-
"url": url,
|
|
309
|
-
"coordinates": coordinates
|
|
310
|
-
},
|
|
316
|
+
"parameters": {"url": url, "coordinates": coordinates},
|
|
311
317
|
}
|
|
312
318
|
|
|
313
319
|
source_id = self._add_source(OBJECT_FACTORY.create_source(source, self))
|
|
@@ -343,10 +349,7 @@ class GISDocument(CommWidget):
|
|
|
343
349
|
source = {
|
|
344
350
|
"type": SourceType.VideoSource,
|
|
345
351
|
"name": f"{name} Source",
|
|
346
|
-
"parameters": {
|
|
347
|
-
"urls": urls,
|
|
348
|
-
"coordinates": coordinates
|
|
349
|
-
},
|
|
352
|
+
"parameters": {"urls": urls, "coordinates": coordinates},
|
|
350
353
|
}
|
|
351
354
|
|
|
352
355
|
source_id = self._add_source(OBJECT_FACTORY.create_source(source, self))
|
|
@@ -359,7 +362,7 @@ class GISDocument(CommWidget):
|
|
|
359
362
|
}
|
|
360
363
|
|
|
361
364
|
return self._add_layer(OBJECT_FACTORY.create_layer(layer, self))
|
|
362
|
-
|
|
365
|
+
|
|
363
366
|
def add_tiff_layer(
|
|
364
367
|
self,
|
|
365
368
|
url: str,
|
|
@@ -370,7 +373,7 @@ class GISDocument(CommWidget):
|
|
|
370
373
|
wrapX: bool = False,
|
|
371
374
|
attribution: str = "",
|
|
372
375
|
opacity: float = 1.0,
|
|
373
|
-
color_expr
|
|
376
|
+
color_expr=None,
|
|
374
377
|
):
|
|
375
378
|
"""
|
|
376
379
|
Add a tiff layer
|
|
@@ -383,79 +386,93 @@ class GISDocument(CommWidget):
|
|
|
383
386
|
:param bool wrapX: Render tiles beyond the tile grid extent, defaults to False
|
|
384
387
|
:param float opacity: The opacity, between 0 and 1, defaults to 1.0
|
|
385
388
|
:param _type_ color_expr: The style expression used to style the layer, defaults to None
|
|
386
|
-
"""
|
|
387
|
-
|
|
389
|
+
"""
|
|
390
|
+
|
|
388
391
|
source = {
|
|
389
392
|
"type": SourceType.GeoTiffSource,
|
|
390
393
|
"name": f"{name} Source",
|
|
391
394
|
"parameters": {
|
|
392
|
-
"urls": [{
|
|
393
|
-
"url": url,
|
|
394
|
-
"min": min,
|
|
395
|
-
"max": max
|
|
396
|
-
}],
|
|
395
|
+
"urls": [{"url": url, "min": min, "max": max}],
|
|
397
396
|
"normalize": normalize,
|
|
398
397
|
"wrapX": wrapX,
|
|
399
398
|
},
|
|
400
399
|
}
|
|
401
400
|
source_id = self._add_source(OBJECT_FACTORY.create_source(source, self))
|
|
402
|
-
|
|
401
|
+
|
|
403
402
|
layer = {
|
|
404
403
|
"type": LayerType.WebGlLayer,
|
|
405
404
|
"name": name,
|
|
406
405
|
"visible": True,
|
|
407
|
-
"parameters": {
|
|
406
|
+
"parameters": {
|
|
407
|
+
"source": source_id,
|
|
408
|
+
"opacity": opacity,
|
|
409
|
+
"color": color_expr,
|
|
410
|
+
},
|
|
408
411
|
}
|
|
409
412
|
|
|
410
413
|
return self._add_layer(OBJECT_FACTORY.create_layer(layer, self))
|
|
411
|
-
|
|
412
|
-
def create_color_expr(
|
|
414
|
+
|
|
415
|
+
def create_color_expr(
|
|
416
|
+
self,
|
|
417
|
+
color_stops: Dict,
|
|
418
|
+
band: float = 1.0,
|
|
419
|
+
interpolation_type: str = "linear",
|
|
420
|
+
):
|
|
413
421
|
"""
|
|
414
422
|
Create a color expression used to style the layer
|
|
415
423
|
|
|
416
424
|
:param Dict color_stops: Dictionary of stop values to [r, g, b, a] colors
|
|
417
425
|
:param float band: The band to be colored, defaults to 1.0
|
|
418
426
|
:param str interpolation_type: The interpolation function. Can be linear, discrete, or exact, defaults to 'linear'
|
|
419
|
-
"""
|
|
420
|
-
|
|
427
|
+
"""
|
|
428
|
+
|
|
421
429
|
if interpolation_type not in ["linear", "discrete", "exact"]:
|
|
422
|
-
raise ValueError(
|
|
423
|
-
|
|
430
|
+
raise ValueError(
|
|
431
|
+
"Interpolation type must be one of linear, discrete, or exact"
|
|
432
|
+
)
|
|
433
|
+
|
|
424
434
|
color = []
|
|
425
|
-
if interpolation_type ==
|
|
426
|
-
color = [
|
|
427
|
-
color.append([
|
|
435
|
+
if interpolation_type == "linear":
|
|
436
|
+
color = ["interpolate", ["linear"]]
|
|
437
|
+
color.append(["band", band])
|
|
428
438
|
# Transparency for nodata
|
|
429
439
|
color.append(0.0)
|
|
430
440
|
color.append([0.0, 0.0, 0.0, 0.0])
|
|
431
|
-
|
|
441
|
+
|
|
432
442
|
for value, colorVal in color_stops.items():
|
|
433
443
|
color.append(value)
|
|
434
444
|
color.append(colorVal)
|
|
435
|
-
|
|
445
|
+
|
|
436
446
|
return color
|
|
437
|
-
|
|
438
|
-
if interpolation_type ==
|
|
439
|
-
operator =
|
|
440
|
-
|
|
441
|
-
if interpolation_type ==
|
|
442
|
-
operator =
|
|
443
|
-
|
|
444
|
-
color = [
|
|
447
|
+
|
|
448
|
+
if interpolation_type == "discrete":
|
|
449
|
+
operator = "<="
|
|
450
|
+
|
|
451
|
+
if interpolation_type == "exact":
|
|
452
|
+
operator = "=="
|
|
453
|
+
|
|
454
|
+
color = ["case"]
|
|
445
455
|
# Transparency for nodata
|
|
446
456
|
color.append(["==", ["band", band], 0.0])
|
|
447
457
|
color.append([0.0, 0.0, 0.0, 0.0])
|
|
448
|
-
|
|
458
|
+
|
|
449
459
|
for value, colorVal in color_stops.items():
|
|
450
460
|
color.append([operator, ["band", band], value])
|
|
451
461
|
color.append(colorVal)
|
|
452
|
-
|
|
462
|
+
|
|
453
463
|
# Fallback color
|
|
454
464
|
color.append([0.0, 0.0, 0.0, 1.0])
|
|
455
|
-
|
|
456
|
-
return color
|
|
457
|
-
|
|
458
|
-
def add_filter(
|
|
465
|
+
|
|
466
|
+
return color
|
|
467
|
+
|
|
468
|
+
def add_filter(
|
|
469
|
+
self,
|
|
470
|
+
layer_id: str,
|
|
471
|
+
logical_op: str,
|
|
472
|
+
feature: str,
|
|
473
|
+
operator: str,
|
|
474
|
+
value: Union[str, number, float],
|
|
475
|
+
):
|
|
459
476
|
"""
|
|
460
477
|
Add a filter to a layer
|
|
461
478
|
|
|
@@ -472,30 +489,36 @@ class GISDocument(CommWidget):
|
|
|
472
489
|
raise ValueError(f"No layer found with ID: {layer_id}")
|
|
473
490
|
|
|
474
491
|
# Initialize filters if it doesn't exist
|
|
475
|
-
if
|
|
476
|
-
layer[
|
|
477
|
-
|
|
478
|
-
{
|
|
479
|
-
'feature': feature,
|
|
480
|
-
'operator': operator,
|
|
481
|
-
'value': value
|
|
482
|
-
}
|
|
492
|
+
if "filters" not in layer:
|
|
493
|
+
layer["filters"] = {
|
|
494
|
+
"appliedFilters": [
|
|
495
|
+
{"feature": feature, "operator": operator, "value": value}
|
|
483
496
|
],
|
|
484
|
-
|
|
497
|
+
"logicalOp": logical_op,
|
|
498
|
+
}
|
|
485
499
|
|
|
486
500
|
self._layers[layer_id] = layer
|
|
487
501
|
return
|
|
488
502
|
|
|
489
503
|
# Add new filter
|
|
490
|
-
filters = layer[
|
|
491
|
-
filters[
|
|
504
|
+
filters = layer["filters"]
|
|
505
|
+
filters["appliedFilters"].append(
|
|
506
|
+
{"feature": feature, "operator": operator, "value": value}
|
|
507
|
+
)
|
|
492
508
|
|
|
493
509
|
# update the logical operation
|
|
494
|
-
filters[
|
|
510
|
+
filters["logicalOp"] = logical_op
|
|
495
511
|
|
|
496
512
|
self._layers[layer_id] = layer
|
|
497
513
|
|
|
498
|
-
def update_filter(
|
|
514
|
+
def update_filter(
|
|
515
|
+
self,
|
|
516
|
+
layer_id: str,
|
|
517
|
+
logical_op: str,
|
|
518
|
+
feature: str,
|
|
519
|
+
operator: str,
|
|
520
|
+
value: Union[str, number, float],
|
|
521
|
+
):
|
|
499
522
|
"""
|
|
500
523
|
Update a filter applied to a layer
|
|
501
524
|
|
|
@@ -511,20 +534,25 @@ class GISDocument(CommWidget):
|
|
|
511
534
|
if layer is None:
|
|
512
535
|
raise ValueError(f"No layer found with ID: {layer_id}")
|
|
513
536
|
|
|
514
|
-
if
|
|
537
|
+
if "filters" not in layer:
|
|
515
538
|
raise ValueError(f"No filters applied to layer: {layer_id}")
|
|
516
539
|
|
|
517
540
|
# Find the feature within the layer
|
|
518
|
-
feature = next(
|
|
541
|
+
feature = next(
|
|
542
|
+
(f for f in layer["filters"]["appliedFilters"] if f["feature"] == feature),
|
|
543
|
+
None,
|
|
544
|
+
)
|
|
519
545
|
if feature is None:
|
|
520
|
-
raise ValueError(
|
|
546
|
+
raise ValueError(
|
|
547
|
+
f"No feature found with ID: {feature} in layer: {layer_id}"
|
|
548
|
+
)
|
|
521
549
|
return
|
|
522
550
|
|
|
523
551
|
# Update the feature value
|
|
524
|
-
feature[
|
|
552
|
+
feature["value"] = value
|
|
525
553
|
|
|
526
554
|
# update the logical operation
|
|
527
|
-
layer[
|
|
555
|
+
layer["filters"]["logicalOp"] = logical_op
|
|
528
556
|
|
|
529
557
|
self._layers[layer_id] = layer
|
|
530
558
|
|
|
@@ -540,10 +568,10 @@ class GISDocument(CommWidget):
|
|
|
540
568
|
if layer is None:
|
|
541
569
|
raise ValueError(f"No layer found with ID: {layer_id}")
|
|
542
570
|
|
|
543
|
-
if
|
|
571
|
+
if "filters" not in layer:
|
|
544
572
|
raise ValueError(f"No filters applied to layer: {layer_id}")
|
|
545
573
|
|
|
546
|
-
layer[
|
|
574
|
+
layer["filters"]["appliedFilters"] = []
|
|
547
575
|
self._layers[layer_id] = layer
|
|
548
576
|
|
|
549
577
|
def _add_source(self, new_object: "JGISObject"):
|
|
@@ -602,7 +630,7 @@ class JGISLayer(BaseModel):
|
|
|
602
630
|
IVectorTileLayer,
|
|
603
631
|
IHillshadeLayer,
|
|
604
632
|
IImageLayer,
|
|
605
|
-
IWebGlLayer
|
|
633
|
+
IWebGlLayer,
|
|
606
634
|
]
|
|
607
635
|
_parent = Optional[GISDocument]
|
|
608
636
|
|
|
@@ -624,7 +652,7 @@ class JGISSource(BaseModel):
|
|
|
624
652
|
IGeoJSONSource,
|
|
625
653
|
IImageSource,
|
|
626
654
|
IVideoSource,
|
|
627
|
-
IGeoTiffSource
|
|
655
|
+
IGeoTiffSource,
|
|
628
656
|
]
|
|
629
657
|
_parent = Optional[GISDocument]
|
|
630
658
|
|
|
@@ -671,7 +699,7 @@ class ObjectFactoryManager(metaclass=SingletonMeta):
|
|
|
671
699
|
visible=visible,
|
|
672
700
|
type=object_type,
|
|
673
701
|
parameters=obj_params,
|
|
674
|
-
filters=filters
|
|
702
|
+
filters=filters,
|
|
675
703
|
)
|
|
676
704
|
|
|
677
705
|
return None
|