diff --git a/grabcut/anaconda-project-lock.yml b/grabcut/anaconda-project-lock.yml new file mode 100644 index 000000000..4f4fbf23a --- /dev/null +++ b/grabcut/anaconda-project-lock.yml @@ -0,0 +1,988 @@ +# This is an Anaconda project lock file. +# The lock file locks down exact versions of all your dependencies. +# +# In most cases, this file is automatically maintained by the `anaconda-project` command or GUI tools. +# It's best to keep this file in revision control (such as git or svn). +# The file is in YAML format, please see http://www.yaml.org/start.html for more. +# + +# +# Set to false to ignore locked versions. +# +locking_enabled: true + +# +# A key goes in here for each env spec. +# +env_specs: + default: + locked: true + env_spec_hash: b20e52f7aa8badb36d23b66db5c0d70ac933a266 + platforms: + - linux-64 + - osx-64 + - osx-arm64 + - win-64 + packages: + all: + - argon2-cffi=21.3.0=pyhd3eb1b0_0 + - asttokens=2.0.5=pyhd3eb1b0_0 + - charset-normalizer=3.3.2=pyhd3eb1b0_0 + - click-plugins=1.1.1=pyhd3eb1b0_0 + - cligj=0.7.2=pyhd3eb1b0_0 + - cycler=0.11.0=pyhd3eb1b0_0 + - decorator=5.1.1=pyhd3eb1b0_0 + - defusedxml=0.7.1=pyhd3eb1b0_0 + - executing=0.8.3=pyhd3eb1b0_0 + - ipython_genutils=0.2.0=pyhd3eb1b0_1 + - pandocfilters=1.5.0=pyhd3eb1b0_0 + - parso=0.8.3=pyhd3eb1b0_0 + - prompt_toolkit=3.0.43=hd3eb1b0_0 + - pure_eval=0.2.2=pyhd3eb1b0_0 + - pycparser=2.21=pyhd3eb1b0_0 + - python-tzdata=2023.3=pyhd3eb1b0_0 + - six=1.16.0=pyhd3eb1b0_1 + - stack_data=0.2.0=pyhd3eb1b0_0 + - tzdata=2024b=h04d1e81_0 + - wcwidth=0.2.5=pyhd3eb1b0_0 + unix: + - pexpect=4.8.0=pyhd3eb1b0_3 + - ptyprocess=0.7.0=pyhd3eb1b0_2 + linux-64: + - _libgcc_mutex=0.1=main + - _openmp_mutex=5.1=1_gnu + - anyio=4.6.2=py311h06a4308_0 + - argon2-cffi-bindings=21.2.0=py311h5eee18b_0 + - attrs=24.2.0=py311h06a4308_0 + - beautifulsoup4=4.12.3=py311h06a4308_0 + - blas=1.0=mkl + - bleach=6.2.0=py311h06a4308_0 + - blosc=1.21.3=h6a678d5_0 + - bokeh=3.5.2=py311h92b7b1e_0 + - boost-cpp=1.82.0=hdb19cb5_2 + - bottleneck=1.4.2=py311hf4808d0_0 + - brotli-bin=1.0.9=h5eee18b_8 + - brotli-python=1.0.9=py311h6a678d5_8 + - brotli=1.0.9=h5eee18b_8 + - bzip2=1.0.8=h5eee18b_6 + - c-ares=1.19.1=h5eee18b_0 + - ca-certificates=2024.11.26=h06a4308_0 + - cairo=1.16.0=hb05425b_5 + - cartopy=0.22.0=py311ha02d727_0 + - certifi=2024.8.30=py311h06a4308_0 + - cffi=1.17.1=py311h1fdaa30_0 + - cfitsio=3.470=h5893167_7 + - cftime=1.6.4=py311h5eee18b_0 + - click=8.1.7=py311h06a4308_0 + - cloudpickle=3.0.0=py311h06a4308_0 + - colorcet=3.1.0=py311h06a4308_0 + - comm=0.2.1=py311h06a4308_0 + - contourpy=1.3.1=py311hdb19cb5_0 + - cyrus-sasl=2.1.28=h52b45da_1 + - dask-core=2024.8.2=py311h06a4308_0 + - datashader=0.16.3=py311h06a4308_0 + - dbus=1.13.18=hb2f20db_0 + - debugpy=1.6.7=py311h6a678d5_0 + - eigen=3.4.0=hdb19cb5_0 + - entrypoints=0.4=py311h06a4308_0 + - expat=2.6.3=h6a678d5_0 + - ffmpeg=4.2.2=h20bf706_0 + - fiona=1.9.5=py311ha02d727_0 + - fontconfig=2.14.1=h55d465d_3 + - fonttools=4.51.0=py311h5eee18b_0 + - freetype=2.12.1=h4a9f257_0 + - freexl=2.0.0=hf309648_0 + - fsspec=2024.6.1=py311h06a4308_0 + - gdal=3.6.2=py311ha0db937_7 + - geopandas-base=0.14.2=py311h06a4308_0 + - geos=3.8.0=he6710b0_0 + - geotiff=1.7.0=h2a26cda_3 + - geoviews-core=1.13.1=py311h06a4308_0 + - geoviews=1.13.1=py311h06a4308_0 + - giflib=5.2.2=h5eee18b_0 + - glib-tools=2.78.4=h6a678d5_0 + - glib=2.78.4=h6a678d5_0 + - gmp=6.2.1=h295c915_3 + - gnutls=3.6.15=he1e5248_0 + - graphite2=1.3.14=h295c915_1 + - gst-plugins-base=1.14.1=h6a678d5_1 + - gstreamer=1.14.1=h5eee18b_1 + - harfbuzz=4.3.0=hf52aaf7_2 + - hdf4=4.2.13=h3ca952b_2 + - hdf5=1.12.1=h2b7332f_3 + - holoviews=1.20.0=py311h06a4308_0 + - icu=73.1=h6a678d5_0 + - idna=3.7=py311h06a4308_0 + - importlib-metadata=8.5.0=py311h06a4308_0 + - intel-openmp=2023.1.0=hdb19cb5_46306 + - ipykernel=6.29.5=py311h06a4308_0 + - ipython=8.27.0=py311h06a4308_0 + - jedi=0.19.1=py311h06a4308_0 + - jinja2=3.1.4=py311h06a4308_1 + - jpeg=9e=h5eee18b_3 + - json-c=0.16=h5eee18b_0 + - jsonschema-specifications=2023.7.1=py311h06a4308_0 + - jsonschema=4.23.0=py311h06a4308_0 + - jupyter_client=7.4.9=py311h06a4308_0 + - jupyter_core=5.7.2=py311h06a4308_0 + - jupyter_events=0.10.0=py311h06a4308_0 + - jupyter_server=2.14.1=py311h06a4308_0 + - jupyter_server_terminals=0.4.4=py311h06a4308_1 + - jupyterlab_pygments=0.2.2=py311h06a4308_0 + - kealib=1.5.0=hd940352_1 + - kiwisolver=1.4.4=py311h6a678d5_0 + - krb5=1.20.1=h143b758_1 + - lame=3.100=h7b6447c_0 + - lcms2=2.12=h3be6417_0 + - ld_impl_linux-64=2.40=h12ee557_0 + - lerc=3.0=h295c915_0 + - libabseil=20240116.2=cxx17_h6a678d5_0 + - libboost=1.82.0=h109eef0_2 + - libbrotlicommon=1.0.9=h5eee18b_8 + - libbrotlidec=1.0.9=h5eee18b_8 + - libbrotlienc=1.0.9=h5eee18b_8 + - libclang13=14.0.6=default_he11475f_1 + - libclang=14.0.6=default_hc6dbbc7_1 + - libcups=2.4.2=h2d74bed_1 + - libcurl=8.9.1=h251f7ec_0 + - libdeflate=1.17=h5eee18b_1 + - libedit=3.1.20230828=h5eee18b_0 + - libev=4.33=h7f8727e_1 + - libffi=3.4.4=h6a678d5_1 + - libgcc-ng=11.2.0=h1234567_1 + - libgdal=3.6.2=hd4d5da2_7 + - libgfortran-ng=11.2.0=h00389a5_1 + - libgfortran5=11.2.0=h1234567_1 + - libglib=2.78.4=hdc74915_0 + - libgomp=11.2.0=h1234567_1 + - libiconv=1.16=h5eee18b_3 + - libidn2=2.3.4=h5eee18b_0 + - libkml=1.3.0=h096b73e_7 + - libllvm14=14.0.6=hecde1de_4 + - libnetcdf=4.8.1=h14805e7_4 + - libnghttp2=1.57.0=h2d74bed_0 + - libopus=1.3.1=h5eee18b_1 + - libpng=1.6.39=h5eee18b_0 + - libpq=17.0=hdbd6064_0 + - libprotobuf=4.25.3=he621ea3_0 + - libsodium=1.0.18=h7b6447c_0 + - libspatialite=5.1.0=h040243e_1 + - libssh2=1.11.1=h251f7ec_0 + - libstdcxx-ng=11.2.0=h1234567_1 + - libtasn1=4.19.0=h5eee18b_0 + - libtiff=4.5.1=h6a678d5_0 + - libunistring=0.9.10=h27cfd23_0 + - libuuid=1.41.5=h5eee18b_0 + - libvpx=1.7.0=h439df22_0 + - libwebp-base=1.3.2=h5eee18b_1 + - libxcb=1.15=h7f8727e_0 + - libxkbcommon=1.0.1=h097e994_2 + - libxml2=2.13.5=hfdd30dd_0 + - libzip=1.8.0=h6ac8c49_1 + - linkify-it-py=2.0.0=py311h06a4308_0 + - llvmlite=0.43.0=py311h6a678d5_0 + - locket=1.0.0=py311h06a4308_0 + - lz4-c=1.9.4=h6a678d5_1 + - markdown-it-py=2.2.0=py311h06a4308_1 + - markdown=3.4.1=py311h06a4308_0 + - markupsafe=2.1.3=py311h5eee18b_0 + - matplotlib-base=3.9.2=py311hbfdbfaf_1 + - matplotlib-inline=0.1.6=py311h06a4308_0 + - mdit-py-plugins=0.3.0=py311h06a4308_0 + - mdurl=0.1.0=py311h06a4308_0 + - minizip=4.0.3=hf59b114_0 + - mistune=2.0.4=py311h06a4308_0 + - mkl-service=2.4.0=py311h5eee18b_1 + - mkl=2023.1.0=h213fc3f_46344 + - mkl_fft=1.3.11=py311h5eee18b_0 + - mkl_random=1.2.8=py311ha02d727_0 + - multipledispatch=0.6.0=py311h06a4308_0 + - mysql=8.4.0=h29a9f33_1 + - nbclassic=1.1.0=py311h06a4308_0 + - nbclient=0.8.0=py311h06a4308_0 + - nbconvert=7.16.4=py311h06a4308_0 + - nbformat=5.10.4=py311h06a4308_0 + - ncurses=6.4=h6a678d5_0 + - nest-asyncio=1.6.0=py311h06a4308_0 + - netcdf4=1.6.2=py311h0e679e6_0 + - nettle=3.7.3=hbbd107a_1 + - notebook-shim=0.2.3=py311h06a4308_0 + - notebook=6.5.7=py311h06a4308_0 + - nspr=4.35=h6a678d5_0 + - nss=3.89.1=h6a678d5_0 + - numba=0.60.0=py311ha02d727_0 + - numexpr=2.10.1=py311h3c60e43_0 + - numpy-base=1.26.4=py311hf175353_0 + - numpy=1.26.4=py311h08b1b3b_0 + - opencv=4.10.0=py311hab19f7d_0 + - openh264=2.1.1=h4ff587b_0 + - openjpeg=2.5.2=he7f1fd0_0 + - openldap=2.6.4=h42fbc30_0 + - openssl=3.0.15=h5eee18b_0 + - overrides=7.4.0=py311h06a4308_0 + - packaging=24.1=py311h06a4308_0 + - pandas=2.2.3=py311h6a678d5_0 + - panel=1.5.3=py311h06a4308_0 + - param=2.1.1=py311h06a4308_0 + - partd=1.4.1=py311h06a4308_0 + - pcre2=10.42=hebb0a14_1 + - pillow=11.0.0=py311hfdbf927_0 + - pip=24.2=py311h06a4308_0 + - pixman=0.40.0=h7f8727e_1 + - platformdirs=3.10.0=py311h06a4308_0 + - pooch=1.8.2=py311h06a4308_0 + - poppler-data=0.4.11=h06a4308_1 + - poppler=24.09.0=h55ad6a6_0 + - proj=9.3.1=he5811b7_0 + - prometheus_client=0.21.0=py311h06a4308_0 + - prompt-toolkit=3.0.43=py311h06a4308_0 + - psutil=5.9.0=py311h5eee18b_0 + - pyct=0.5.0=py311h06a4308_0 + - pygments=2.15.1=py311h06a4308_1 + - pyparsing=3.2.0=py311h06a4308_0 + - pyproj=3.6.1=py311h76fdc58_0 + - pyshp=2.3.1=py311h06a4308_0 + - pysocks=1.7.1=py311h06a4308_0 + - python-dateutil=2.9.0post0=py311h06a4308_2 + - python-fastjsonschema=2.20.0=py311h06a4308_0 + - python-json-logger=2.0.7=py311h06a4308_0 + - python=3.11.10=he870216_0 + - pytz=2024.1=py311h06a4308_0 + - pyviz_comms=3.0.2=py311h06a4308_0 + - pyyaml=6.0.2=py311h5eee18b_0 + - pyzmq=24.0.1=py311h5eee18b_0 + - qhull=2020.2=hdb19cb5_2 + - qt-main=5.15.2=hb6262e9_11 + - readline=8.2=h5eee18b_0 + - referencing=0.30.2=py311h06a4308_0 + - requests=2.32.3=py311h06a4308_1 + - rfc3339-validator=0.1.4=py311h06a4308_0 + - rfc3986-validator=0.1.1=py311h06a4308_0 + - rpds-py=0.10.6=py311h4aa5aa6_1 + - scipy=1.14.1=py311h08b1b3b_0 + - send2trash=1.8.2=py311h06a4308_0 + - setuptools=75.1.0=py311h06a4308_0 + - shapely=2.0.5=py311h24a2a10_0 + - sniffio=1.3.0=py311h06a4308_0 + - soupsieve=2.5=py311h06a4308_0 + - sqlite=3.45.3=h5eee18b_0 + - tbb=2021.8.0=hdb19cb5_0 + - terminado=0.17.1=py311h06a4308_0 + - tiledb=2.3.3=h77177df_3 + - tinycss2=1.2.1=py311h06a4308_0 + - tk=8.6.14=h39e8969_0 + - toolz=0.12.0=py311h06a4308_0 + - tornado=6.4.1=py311h5eee18b_0 + - tqdm=4.66.5=py311h92b7b1e_0 + - traitlets=5.14.3=py311h06a4308_0 + - typing-extensions=4.11.0=py311h06a4308_0 + - typing_extensions=4.11.0=py311h06a4308_0 + - uc-micro-py=1.0.1=py311h06a4308_0 + - unicodedata2=15.1.0=py311h5eee18b_0 + - uriparser=0.9.7=h5eee18b_0 + - urllib3=2.2.3=py311h06a4308_0 + - webencodings=0.5.1=py311h06a4308_1 + - websocket-client=1.8.0=py311h06a4308_0 + - wheel=0.44.0=py311h06a4308_0 + - x264=1!157.20191217=h7b6447c_0 + - xarray=2023.6.0=py311h06a4308_0 + - xerces-c=3.2.4=h6a678d5_1 + - xyzservices=2022.9.0=py311h06a4308_1 + - xz=5.4.6=h5eee18b_1 + - yaml=0.2.5=h7b6447c_0 + - zeromq=4.3.5=h6a678d5_0 + - zipp=3.21.0=py311h06a4308_0 + - zlib=1.2.13=h5eee18b_1 + - zstd=1.5.6=hc292b87_0 + osx-64: + - anyio=4.6.2=py311hecd8cb5_0 + - appnope=0.1.2=py311hecd8cb5_1001 + - argon2-cffi-bindings=21.2.0=py311h6c40b1e_0 + - attrs=24.2.0=py311hecd8cb5_0 + - beautifulsoup4=4.12.3=py311hecd8cb5_0 + - blas=1.0=mkl + - bleach=6.2.0=py311hecd8cb5_0 + - blosc=1.21.3=hcec6c5f_0 + - bokeh=3.5.2=py311h85bffb1_0 + - boost-cpp=1.82.0=ha357a0b_2 + - bottleneck=1.4.2=py311h9b7fc35_0 + - brotli-bin=1.0.9=h6c40b1e_8 + - brotli-python=1.0.9=py311hcec6c5f_8 + - brotli=1.0.9=h6c40b1e_8 + - bzip2=1.0.8=h6c40b1e_6 + - c-ares=1.19.1=h6c40b1e_0 + - ca-certificates=2024.11.26=hecd8cb5_0 + - cairo=1.16.0=h3ce6f7e_5 + - cartopy=0.22.0=py311hdb55bb0_0 + - certifi=2024.8.30=py311hecd8cb5_0 + - cffi=1.17.1=py311h9205ec4_0 + - cfitsio=3.470=hbd21bf8_7 + - cftime=1.6.4=py311h46256e1_0 + - click=8.1.7=py311hecd8cb5_0 + - cloudpickle=3.0.0=py311hecd8cb5_0 + - colorcet=3.1.0=py311hecd8cb5_0 + - comm=0.2.1=py311hecd8cb5_0 + - contourpy=1.3.1=py311h1962661_0 + - cyrus-sasl=2.1.28=h3973f50_1 + - dask-core=2024.8.2=py311hecd8cb5_0 + - datashader=0.16.3=py311hecd8cb5_0 + - debugpy=1.6.7=py311hcec6c5f_0 + - eigen=3.4.0=ha357a0b_0 + - entrypoints=0.4=py311hecd8cb5_0 + - expat=2.6.3=h6d0c2b6_0 + - ffmpeg=4.2.2=h97e5cf8_0 + - fiona=1.9.5=py311hdb55bb0_0 + - fontconfig=2.14.1=h269ac6a_3 + - fonttools=4.51.0=py311h6c40b1e_0 + - freetype=2.12.1=hd8bbffd_0 + - freexl=2.0.0=hce1ea5d_0 + - fsspec=2024.6.1=py311hecd8cb5_0 + - gdal=3.6.2=py311he4f215e_7 + - geopandas-base=0.14.2=py311hecd8cb5_0 + - geos=3.8.0=hb1e8313_0 + - geotiff=1.7.0=hf6ff7a4_3 + - geoviews-core=1.13.1=py311hecd8cb5_0 + - geoviews=1.13.1=py311hecd8cb5_0 + - gettext=0.21.0=h4e8c18a_2 + - giflib=5.2.2=h46256e1_0 + - glib-tools=2.78.4=hcec6c5f_0 + - glib=2.78.4=hcec6c5f_0 + - gmp=6.2.1=he9d5cce_3 + - gnutls=3.6.15=hed9c0bf_0 + - graphite2=1.3.14=he9d5cce_1 + - gst-plugins-base=1.14.1=hcec6c5f_1 + - gstreamer=1.14.1=h6c40b1e_1 + - harfbuzz=4.3.0=hffc734d_2 + - hdf4=4.2.13=h39711bb_2 + - hdf5=1.12.1=ha01d115_3 + - holoviews=1.20.0=py311hecd8cb5_0 + - icu=73.1=hcec6c5f_0 + - idna=3.7=py311hecd8cb5_0 + - importlib-metadata=8.5.0=py311hecd8cb5_0 + - intel-openmp=2023.1.0=ha357a0b_43548 + - ipykernel=6.29.5=py311hecd8cb5_0 + - ipython=8.27.0=py311hecd8cb5_0 + - jedi=0.19.1=py311hecd8cb5_0 + - jinja2=3.1.4=py311hecd8cb5_1 + - jpeg=9e=h46256e1_3 + - json-c=0.16=hca72f7f_0 + - jsonschema-specifications=2023.7.1=py311hecd8cb5_0 + - jsonschema=4.23.0=py311hecd8cb5_0 + - jupyter_client=7.4.9=py311hecd8cb5_0 + - jupyter_core=5.7.2=py311hecd8cb5_0 + - jupyter_events=0.10.0=py311hecd8cb5_0 + - jupyter_server=2.14.1=py311hecd8cb5_0 + - jupyter_server_terminals=0.4.4=py311hecd8cb5_1 + - jupyterlab_pygments=0.2.2=py311hecd8cb5_0 + - kealib=1.5.0=h72c422f_1 + - kiwisolver=1.4.4=py311hcec6c5f_0 + - krb5=1.20.1=h428f121_1 + - lame=3.100=h1de35cc_0 + - lcms2=2.12=hf1fd2bf_0 + - lerc=3.0=he9d5cce_0 + - libabseil=20240116.2=cxx17_h548131f_0 + - libboost=1.82.0=hf53b9f2_2 + - libbrotlicommon=1.0.9=h6c40b1e_8 + - libbrotlidec=1.0.9=h6c40b1e_8 + - libbrotlienc=1.0.9=h6c40b1e_8 + - libclang13=14.0.6=default_habbcc1a_1 + - libclang=14.0.6=default_hd95374b_1 + - libcurl=8.9.1=h3a17b82_0 + - libcxx=14.0.6=h9765a3e_0 + - libdeflate=1.17=hb664fd8_1 + - libedit=3.1.20230828=h6c40b1e_0 + - libev=4.33=h9ed2024_1 + - libffi=3.4.4=hecd8cb5_1 + - libgdal=3.6.2=hfaf651c_7 + - libgfortran5=11.3.0=h9dfd629_28 + - libgfortran=5.0.0=11_3_0_hecd8cb5_28 + - libglib=2.78.4=h19e1a8f_0 + - libiconv=1.16=h6c40b1e_3 + - libidn2=2.3.4=h6c40b1e_0 + - libkml=1.3.0=h85bf17e_7 + - libllvm14=14.0.6=h26321d7_4 + - libnetcdf=4.8.1=h9f5a9a2_4 + - libnghttp2=1.57.0=h9beae6a_0 + - libopus=1.3.1=h46256e1_1 + - libpng=1.6.39=h6c40b1e_0 + - libpq=17.0=h184c1cd_0 + - libprotobuf=4.25.3=h34eed0b_0 + - libsodium=1.0.18=h1de35cc_0 + - libspatialite=5.1.0=hd7ca590_1 + - libssh2=1.11.1=h3a17b82_0 + - libtasn1=4.19.0=h6c40b1e_0 + - libtiff=4.5.1=hcec6c5f_0 + - libunistring=0.9.10=h9ed2024_0 + - libvpx=1.7.0=h378b8a2_0 + - libwebp-base=1.3.2=h46256e1_1 + - libxml2=2.13.5=h6070cd6_0 + - libzip=1.8.0=h29ab7a1_1 + - linkify-it-py=2.0.0=py311hecd8cb5_0 + - llvm-openmp=14.0.6=h0dcd299_0 + - llvmlite=0.43.0=py311h6d0c2b6_0 + - locket=1.0.0=py311hecd8cb5_0 + - lz4-c=1.9.4=hcec6c5f_1 + - markdown-it-py=2.2.0=py311hecd8cb5_1 + - markdown=3.4.1=py311hecd8cb5_0 + - markupsafe=2.1.3=py311h6c40b1e_0 + - matplotlib-base=3.9.2=py311h919b35b_1 + - matplotlib-inline=0.1.6=py311hecd8cb5_0 + - mdit-py-plugins=0.3.0=py311hecd8cb5_0 + - mdurl=0.1.0=py311hecd8cb5_0 + - minizip=4.0.3=h79ad51c_0 + - mistune=2.0.4=py311hecd8cb5_0 + - mkl-service=2.4.0=py311h6c40b1e_1 + - mkl=2023.1.0=h8e150cf_43560 + - mkl_fft=1.3.8=py311h6c40b1e_0 + - mkl_random=1.2.4=py311ha357a0b_0 + - multipledispatch=0.6.0=py311hecd8cb5_0 + - mysql=8.4.0=hbfece55_1 + - nbclassic=1.1.0=py311hecd8cb5_0 + - nbclient=0.8.0=py311hecd8cb5_0 + - nbconvert=7.16.4=py311hecd8cb5_0 + - nbformat=5.10.4=py311hecd8cb5_0 + - ncurses=6.4=hcec6c5f_0 + - nest-asyncio=1.6.0=py311hecd8cb5_0 + - netcdf4=1.6.2=py311h42ba51d_0 + - nettle=3.7.3=h230ac6f_1 + - notebook-shim=0.2.3=py311hecd8cb5_0 + - notebook=6.5.7=py311hecd8cb5_0 + - nspr=4.35=hcec6c5f_0 + - nss=3.89.1=hcec6c5f_0 + - numba=0.60.0=py311he327ffe_0 + - numexpr=2.8.7=py311h728a8a3_0 + - numpy-base=1.26.4=py311h53bf9ac_0 + - numpy=1.26.4=py311h728a8a3_0 + - opencv=4.10.0=py311h8d4578f_0 + - openh264=2.1.1=h8346a28_0 + - openjpeg=2.5.2=hbf2204d_0 + - openldap=2.6.4=h6e6fb41_0 + - openssl=3.0.15=h46256e1_0 + - overrides=7.4.0=py311hecd8cb5_0 + - packaging=24.1=py311hecd8cb5_0 + - pandas=2.2.3=py311h6d0c2b6_0 + - panel=1.5.3=py311hecd8cb5_0 + - param=2.1.1=py311hecd8cb5_0 + - partd=1.4.1=py311hecd8cb5_0 + - pcre2=10.42=h9b97e30_1 + - pillow=11.0.0=py311h9c91434_0 + - pip=24.2=py311hecd8cb5_0 + - pixman=0.40.0=h9ed2024_1 + - platformdirs=3.10.0=py311hecd8cb5_0 + - pooch=1.8.2=py311hecd8cb5_0 + - poppler-data=0.4.11=hecd8cb5_1 + - poppler=24.09.0=haccdbf8_0 + - proj=9.3.1=h1972728_0 + - prometheus_client=0.21.0=py311hecd8cb5_0 + - prompt-toolkit=3.0.43=py311hecd8cb5_0 + - psutil=5.9.0=py311h6c40b1e_0 + - pybind11-abi=4=hd3eb1b0_1 + - pyct=0.5.0=py311hecd8cb5_0 + - pygments=2.15.1=py311hecd8cb5_1 + - pyparsing=3.2.0=py311hecd8cb5_0 + - pyproj=3.6.1=py311h717f92e_0 + - pyshp=2.3.1=py311hecd8cb5_0 + - pysocks=1.7.1=py311hecd8cb5_0 + - python-dateutil=2.9.0post0=py311hecd8cb5_2 + - python-fastjsonschema=2.20.0=py311hecd8cb5_0 + - python-json-logger=2.0.7=py311hecd8cb5_0 + - python=3.11.10=h4d6d9e5_0 + - pytz=2024.1=py311hecd8cb5_0 + - pyviz_comms=3.0.2=py311hecd8cb5_0 + - pyyaml=6.0.2=py311h46256e1_0 + - pyzmq=24.0.1=py311h6c40b1e_0 + - qhull=2020.2=ha357a0b_2 + - qt-main=5.15.2=hf83fbd5_11 + - readline=8.2=hca72f7f_0 + - referencing=0.30.2=py311hecd8cb5_0 + - requests=2.32.3=py311hecd8cb5_1 + - rfc3339-validator=0.1.4=py311hecd8cb5_0 + - rfc3986-validator=0.1.1=py311hecd8cb5_0 + - rpds-py=0.10.6=py311h83de92b_1 + - scipy=1.13.0=py311h224febf_0 + - send2trash=1.8.2=py311hecd8cb5_0 + - setuptools=75.1.0=py311hecd8cb5_0 + - shapely=2.0.5=py311h41c673d_0 + - sniffio=1.3.0=py311hecd8cb5_0 + - soupsieve=2.5=py311hecd8cb5_0 + - sqlite=3.45.3=h6c40b1e_0 + - tbb=2021.8.0=ha357a0b_0 + - terminado=0.17.1=py311hecd8cb5_0 + - tiledb=2.3.3=h1b93210_3 + - tinycss2=1.2.1=py311hecd8cb5_0 + - tk=8.6.14=h4d00af3_0 + - toolz=0.12.0=py311hecd8cb5_0 + - tornado=6.4.1=py311h46256e1_0 + - tqdm=4.66.5=py311h85bffb1_0 + - traitlets=5.14.3=py311hecd8cb5_0 + - typing-extensions=4.11.0=py311hecd8cb5_0 + - typing_extensions=4.11.0=py311hecd8cb5_0 + - uc-micro-py=1.0.1=py311hecd8cb5_0 + - unicodedata2=15.1.0=py311h6c40b1e_0 + - uriparser=0.9.7=h6c40b1e_0 + - urllib3=2.2.3=py311hecd8cb5_0 + - webencodings=0.5.1=py311hecd8cb5_1 + - websocket-client=1.8.0=py311hecd8cb5_0 + - wheel=0.44.0=py311hecd8cb5_0 + - x264=1!157.20191217=h1de35cc_0 + - xarray=2023.6.0=py311hecd8cb5_0 + - xerces-c=3.2.4=hcec6c5f_1 + - xyzservices=2022.9.0=py311hecd8cb5_1 + - xz=5.4.6=h6c40b1e_1 + - yaml=0.2.5=haf1e3a3_0 + - zeromq=4.3.5=hcec6c5f_0 + - zipp=3.21.0=py311hecd8cb5_0 + - zlib=1.2.13=h4b97444_1 + - zstd=1.5.6=h138b38a_0 + osx-arm64: + - anyio=4.6.2=py311hca03da5_0 + - appnope=0.1.2=py311hca03da5_1001 + - argon2-cffi-bindings=21.2.0=py311h80987f9_0 + - attrs=24.2.0=py311hca03da5_0 + - beautifulsoup4=4.12.3=py311hca03da5_0 + - blas=1.0=openblas + - bleach=6.2.0=py311hca03da5_0 + - blosc=1.21.3=h313beb8_0 + - bokeh=3.5.2=py311hb6e6a13_0 + - boost-cpp=1.82.0=h48ca7d4_2 + - bottleneck=1.4.2=py311hb9f6ed7_0 + - brotli-bin=1.0.9=h80987f9_8 + - brotli-python=1.0.9=py311h313beb8_8 + - brotli=1.0.9=h80987f9_8 + - bzip2=1.0.8=h80987f9_6 + - c-ares=1.19.1=h80987f9_0 + - ca-certificates=2024.11.26=hca03da5_0 + - cairo=1.16.0=h302bd0f_5 + - cartopy=0.22.0=py311h7aedaa7_0 + - certifi=2024.8.30=py311hca03da5_0 + - cffi=1.17.1=py311h3eb5a62_0 + - cfitsio=3.470=h7f6438f_7 + - cftime=1.6.4=py311h80987f9_0 + - click=8.1.7=py311hca03da5_0 + - cloudpickle=3.0.0=py311hca03da5_0 + - colorcet=3.1.0=py311hca03da5_0 + - comm=0.2.1=py311hca03da5_0 + - contourpy=1.3.1=py311h48ca7d4_0 + - cyrus-sasl=2.1.28=h9131b1a_1 + - dask-core=2024.8.2=py311hca03da5_0 + - datashader=0.16.3=py311hca03da5_0 + - debugpy=1.6.7=py311h313beb8_0 + - eigen=3.4.0=h48ca7d4_0 + - entrypoints=0.4=py311hca03da5_0 + - expat=2.6.3=h313beb8_0 + - ffmpeg=4.2.2=h04105a8_0 + - fiona=1.9.5=py311h7aedaa7_0 + - fontconfig=2.14.1=h6402c1e_3 + - fonttools=4.51.0=py311h80987f9_0 + - freetype=2.12.1=h1192e45_0 + - freexl=2.0.0=ha3de405_0 + - fsspec=2024.6.1=py311hca03da5_0 + - gdal=3.6.2=py311h950983f_7 + - geopandas-base=0.14.2=py311hca03da5_0 + - geos=3.9.1=hc377ac9_1 + - geotiff=1.7.0=h41f0982_3 + - geoviews-core=1.13.1=py311hca03da5_0 + - geoviews=1.13.1=py311hca03da5_0 + - gettext=0.21.0=hbdbcc25_2 + - giflib=5.2.2=h80987f9_0 + - glib-tools=2.78.4=h313beb8_0 + - glib=2.78.4=h313beb8_0 + - gmp=6.2.1=hc377ac9_3 + - gnutls=3.6.15=h887c41c_0 + - graphite2=1.3.14=hc377ac9_1 + - gst-plugins-base=1.14.1=h313beb8_1 + - gstreamer=1.14.1=h80987f9_1 + - harfbuzz=4.3.0=he9eebac_2 + - hdf4=4.2.13=h5e329fb_3 + - hdf5=1.12.1=h05c076b_3 + - holoviews=1.20.0=py311hca03da5_0 + - icu=73.1=h313beb8_0 + - idna=3.7=py311hca03da5_0 + - importlib-metadata=8.5.0=py311hca03da5_0 + - ipykernel=6.29.5=py311hca03da5_0 + - ipython=8.27.0=py311hca03da5_0 + - jedi=0.19.1=py311hca03da5_0 + - jinja2=3.1.4=py311hca03da5_1 + - jpeg=9e=h80987f9_3 + - json-c=0.16=h1a28f6b_0 + - jsonschema-specifications=2023.7.1=py311hca03da5_0 + - jsonschema=4.23.0=py311hca03da5_0 + - jupyter_client=7.4.9=py311hca03da5_0 + - jupyter_core=5.7.2=py311hca03da5_0 + - jupyter_events=0.10.0=py311hca03da5_0 + - jupyter_server=2.14.1=py311hca03da5_0 + - jupyter_server_terminals=0.4.4=py311hca03da5_1 + - jupyterlab_pygments=0.2.2=py311hca03da5_0 + - kealib=1.5.0=hba2eb73_1 + - kiwisolver=1.4.4=py311h313beb8_0 + - krb5=1.20.1=hf3e1bf2_1 + - lame=3.100=h1a28f6b_0 + - lcms2=2.12=hba8e193_0 + - lerc=3.0=hc377ac9_0 + - libabseil=20240116.2=cxx17_h313beb8_0 + - libboost=1.82.0=h0bc93f9_2 + - libbrotlicommon=1.0.9=h80987f9_8 + - libbrotlidec=1.0.9=h80987f9_8 + - libbrotlienc=1.0.9=h80987f9_8 + - libclang13=14.0.6=default_h24352ff_1 + - libclang=14.0.6=default_h1b80db6_1 + - libcurl=8.9.1=h3e2b118_0 + - libcxx=14.0.6=h848a8c0_0 + - libdeflate=1.17=h80987f9_1 + - libedit=3.1.20230828=h80987f9_0 + - libev=4.33=h1a28f6b_1 + - libffi=3.4.4=hca03da5_1 + - libgdal=3.6.2=h51eea9d_7 + - libgfortran5=11.3.0=h009349e_28 + - libgfortran=5.0.0=11_3_0_hca03da5_28 + - libglib=2.78.4=h0a96307_0 + - libiconv=1.16=h80987f9_3 + - libidn2=2.3.4=h80987f9_0 + - libkml=1.3.0=hc4d7c42_7 + - libllvm14=14.0.6=h19fdd8a_4 + - libnetcdf=4.8.1=h0fce390_4 + - libnghttp2=1.57.0=h62f6fdd_0 + - libopenblas=0.3.21=h269037a_0 + - libopus=1.3.1=h80987f9_1 + - libpng=1.6.39=h80987f9_0 + - libpq=17.0=h02f6b3c_0 + - libprotobuf=4.25.3=h514c7bf_0 + - libsodium=1.0.18=h1a28f6b_0 + - libspatialite=5.1.0=h3e2df84_1 + - libssh2=1.11.1=h3e2b118_0 + - libtasn1=4.19.0=h80987f9_0 + - libtiff=4.5.1=h313beb8_0 + - libunistring=0.9.10=h1a28f6b_0 + - libvpx=1.10.0=hc377ac9_0 + - libwebp-base=1.3.2=h80987f9_1 + - libxml2=2.13.5=h0b34f26_0 + - libzip=1.8.0=h62fee54_1 + - linkify-it-py=2.0.0=py311hca03da5_0 + - llvm-openmp=14.0.6=hc6e5704_0 + - llvmlite=0.43.0=py311h313beb8_0 + - locket=1.0.0=py311hca03da5_0 + - lz4-c=1.9.4=h313beb8_1 + - markdown-it-py=2.2.0=py311hca03da5_1 + - markdown=3.4.1=py311hca03da5_0 + - markupsafe=2.1.3=py311h80987f9_0 + - matplotlib-base=3.9.2=py311h7ef442a_1 + - matplotlib-inline=0.1.6=py311hca03da5_0 + - mdit-py-plugins=0.3.0=py311hca03da5_0 + - mdurl=0.1.0=py311hca03da5_0 + - minizip=4.0.3=ha89c15f_0 + - mistune=2.0.4=py311hca03da5_0 + - multipledispatch=0.6.0=py311hca03da5_0 + - mysql=8.4.0=h3a6587f_1 + - nbclassic=1.1.0=py311hca03da5_0 + - nbclient=0.8.0=py311hca03da5_0 + - nbconvert=7.16.4=py311hca03da5_0 + - nbformat=5.10.4=py311hca03da5_0 + - ncurses=6.4=h313beb8_0 + - nest-asyncio=1.6.0=py311hca03da5_0 + - netcdf4=1.6.2=py311h55fefbe_0 + - nettle=3.7.3=h84b5d62_1 + - notebook-shim=0.2.3=py311hca03da5_0 + - notebook=6.5.7=py311hca03da5_0 + - nspr=4.35=h313beb8_0 + - nss=3.89.1=h313beb8_0 + - numba=0.60.0=py311h7aedaa7_0 + - numexpr=2.10.1=py311h5d9532f_0 + - numpy-base=1.26.4=py311hfbfe69c_0 + - numpy=1.26.4=py311he598dae_0 + - opencv=4.10.0=py311h92f7fcd_0 + - openh264=1.8.0=h98b2900_0 + - openjpeg=2.5.2=h54b8e55_0 + - openldap=2.6.4=he7ef289_0 + - openssl=3.0.15=h80987f9_0 + - overrides=7.4.0=py311hca03da5_0 + - packaging=24.1=py311hca03da5_0 + - pandas=2.2.3=py311hcf29cfe_0 + - panel=1.5.3=py311hca03da5_0 + - param=2.1.1=py311hca03da5_0 + - partd=1.4.1=py311hca03da5_0 + - pcre2=10.42=hb066dcc_1 + - pillow=11.0.0=py311hfaf4e14_0 + - pip=24.2=py311hca03da5_0 + - pixman=0.40.0=h1a28f6b_0 + - platformdirs=3.10.0=py311hca03da5_0 + - pooch=1.8.2=py311hca03da5_0 + - poppler-data=0.4.11=hca03da5_1 + - poppler=24.09.0=hc1b0c3b_0 + - proj=9.3.1=h805f6d4_0 + - prometheus_client=0.21.0=py311hca03da5_0 + - prompt-toolkit=3.0.43=py311hca03da5_0 + - psutil=5.9.0=py311h80987f9_0 + - pyct=0.5.0=py311hca03da5_0 + - pygments=2.15.1=py311hca03da5_1 + - pyparsing=3.2.0=py311hca03da5_0 + - pyproj=3.6.1=py311h041c639_0 + - pyshp=2.3.1=py311hca03da5_0 + - pysocks=1.7.1=py311hca03da5_0 + - python-dateutil=2.9.0post0=py311hca03da5_2 + - python-fastjsonschema=2.20.0=py311hca03da5_0 + - python-json-logger=2.0.7=py311hca03da5_0 + - python=3.11.10=hb885b13_0 + - pytz=2024.1=py311hca03da5_0 + - pyviz_comms=3.0.2=py311hca03da5_0 + - pyyaml=6.0.2=py311h80987f9_0 + - pyzmq=24.0.1=py311h80987f9_0 + - qhull=2020.2=h48ca7d4_2 + - qt-main=5.15.2=h0917680_11 + - readline=8.2=h1a28f6b_0 + - referencing=0.30.2=py311hca03da5_0 + - requests=2.32.3=py311hca03da5_1 + - rfc3339-validator=0.1.4=py311hca03da5_0 + - rfc3986-validator=0.1.1=py311hca03da5_0 + - rpds-py=0.10.6=py311h2aea54e_1 + - scipy=1.14.1=py311hac8794a_0 + - send2trash=1.8.2=py311hca03da5_0 + - setuptools=75.1.0=py311hca03da5_0 + - shapely=2.0.5=py311h3713c0e_0 + - sniffio=1.3.0=py311hca03da5_0 + - soupsieve=2.5=py311hca03da5_0 + - sqlite=3.45.3=h80987f9_0 + - tbb=2021.8.0=h48ca7d4_0 + - terminado=0.17.1=py311hca03da5_0 + - tiledb=2.3.3=hb4a6b97_3 + - tinycss2=1.2.1=py311hca03da5_0 + - tk=8.6.14=h6ba3021_0 + - toolz=0.12.0=py311hca03da5_0 + - tornado=6.4.1=py311h80987f9_0 + - tqdm=4.66.5=py311hb6e6a13_0 + - traitlets=5.14.3=py311hca03da5_0 + - typing-extensions=4.11.0=py311hca03da5_0 + - typing_extensions=4.11.0=py311hca03da5_0 + - uc-micro-py=1.0.1=py311hca03da5_0 + - unicodedata2=15.1.0=py311h80987f9_0 + - uriparser=0.9.7=h80987f9_0 + - urllib3=2.2.3=py311hca03da5_0 + - webencodings=0.5.1=py311hca03da5_1 + - websocket-client=1.8.0=py311hca03da5_0 + - wheel=0.44.0=py311hca03da5_0 + - x264=1!152.20180806=h1a28f6b_0 + - xarray=2023.6.0=py311hca03da5_0 + - xerces-c=3.2.4=h313beb8_1 + - xyzservices=2022.9.0=py311hca03da5_1 + - xz=5.4.6=h80987f9_1 + - yaml=0.2.5=h1a28f6b_0 + - zeromq=4.3.5=h313beb8_0 + - zipp=3.21.0=py311hca03da5_0 + - zlib=1.2.13=h18a0788_1 + - zstd=1.5.6=hfb09047_0 + win-64: + - anyio=4.6.2=py311haa95532_0 + - argon2-cffi-bindings=21.2.0=py311h2bbff1b_0 + - attrs=24.2.0=py311haa95532_0 + - beautifulsoup4=4.12.3=py311haa95532_0 + - blas=1.0=mkl + - bleach=6.2.0=py311haa95532_0 + - blosc=1.21.3=h6c2663c_0 + - bokeh=3.5.2=py311h746a85d_0 + - boost-cpp=1.82.0=h59b6b97_2 + - bottleneck=1.4.2=py311h57dcf0c_0 + - brotli-bin=1.0.9=h2bbff1b_8 + - brotli-python=1.0.9=py311hd77b12b_8 + - brotli=1.0.9=h2bbff1b_8 + - bzip2=1.0.8=h2bbff1b_6 + - ca-certificates=2024.11.26=haa95532_0 + - cairo=1.16.0=hc68a040_5 + - cartopy=0.22.0=py311h786e728_0 + - certifi=2024.8.30=py311haa95532_0 + - cffi=1.17.1=py311h827c3e9_0 + - cfitsio=3.470=h2bbff1b_7 + - cftime=1.6.4=py311h827c3e9_0 + - click=8.1.7=py311haa95532_0 + - cloudpickle=3.0.0=py311haa95532_0 + - colorama=0.4.6=py311haa95532_0 + - colorcet=3.1.0=py311haa95532_0 + - comm=0.2.1=py311haa95532_0 + - contourpy=1.3.1=py311h214f63a_0 + - dask-core=2024.8.2=py311haa95532_0 + - datashader=0.16.3=py311haa95532_0 + - debugpy=1.6.7=py311hd77b12b_0 + - eigen=3.4.0=h59b6b97_0 + - entrypoints=0.4=py311haa95532_0 + - expat=2.6.3=h5da7b33_0 + - fiona=1.9.5=py311hf62ec03_0 + - fontconfig=2.14.1=hb33846d_3 + - fonttools=4.51.0=py311h2bbff1b_0 + - freetype=2.12.1=ha860e81_0 + - freexl=2.0.0=hd7a5696_0 + - fsspec=2024.6.1=py311haa95532_0 + - gdal=3.6.2=py311h4e7b5b2_7 + - geopandas-base=0.14.2=py311haa95532_0 + - geos=3.8.0=h33f27b4_0 + - geotiff=1.7.0=h4545760_3 + - geoviews-core=1.13.1=py311haa95532_0 + - geoviews=1.13.1=py311haa95532_0 + - glib-tools=2.78.4=hd77b12b_0 + - glib=2.78.4=hd77b12b_0 + - graphite2=1.3.14=hd77b12b_1 + - gst-plugins-base=1.22.3=hfc3ed34_1 + - gstreamer=1.22.3=h1779075_1 + - harfbuzz=4.3.0=hb646838_2 + - hdf4=4.2.13=h712560f_2 + - hdf5=1.12.1=h51c971a_3 + - holoviews=1.20.0=py311haa95532_0 + - icc_rt=2022.1.0=h6049295_2 + - icu=73.1=h6c2663c_0 + - idna=3.7=py311haa95532_0 + - importlib-metadata=8.5.0=py311haa95532_0 + - intel-openmp=2023.1.0=h59b6b97_46320 + - ipykernel=6.29.5=py311haa95532_0 + - ipython=8.27.0=py311haa95532_0 + - jedi=0.19.1=py311haa95532_0 + - jinja2=3.1.4=py311haa95532_1 + - jpeg=9e=h827c3e9_3 + - jsonschema-specifications=2023.7.1=py311haa95532_0 + - jsonschema=4.23.0=py311haa95532_0 + - jupyter_client=7.4.9=py311haa95532_0 + - jupyter_core=5.7.2=py311haa95532_0 + - jupyter_events=0.10.0=py311haa95532_0 + - jupyter_server=2.14.1=py311haa95532_0 + - jupyter_server_terminals=0.4.4=py311haa95532_1 + - jupyterlab_pygments=0.2.2=py311haa95532_0 + - kealib=1.5.0=hde4a422_1 + - kiwisolver=1.4.4=py311hd77b12b_0 + - krb5=1.20.1=h5b6d351_0 + - lcms2=2.12=h83e58a3_0 + - lerc=3.0=hd77b12b_0 + - libabseil=20240116.2=cxx17_h5da7b33_0 + - libboost=1.82.0=h3399ecb_2 + - libbrotlicommon=1.0.9=h2bbff1b_8 + - libbrotlidec=1.0.9=h2bbff1b_8 + - libbrotlienc=1.0.9=h2bbff1b_8 + - libclang13=14.0.6=default_h8e68704_1 + - libclang=14.0.6=default_hb5a9fac_1 + - libcurl=8.9.1=h0416ee5_0 + - libdeflate=1.17=h2bbff1b_1 + - libffi=3.4.4=hd77b12b_1 + - libgdal=3.6.2=h0e70117_7 + - libglib=2.78.4=ha17d25a_0 + - libiconv=1.16=h2bbff1b_3 + - libkml=1.3.0=h63940dd_7 + - libnetcdf=4.8.1=h6685c40_4 + - libogg=1.3.5=h2bbff1b_1 + - libpng=1.6.39=h8cc25b3_0 + - libpq=17.0=h70ee33d_0 + - libprotobuf=4.25.3=hf2fb9eb_0 + - libsodium=1.0.18=h62dcd97_0 + - libspatialite=5.1.0=h25d3e1c_1 + - libssh2=1.11.1=h2addb87_0 + - libtiff=4.5.1=hd77b12b_0 + - libvorbis=1.3.7=he774522_0 + - libwebp-base=1.3.2=h3d04722_1 + - libxml2=2.13.5=h24da03e_0 + - libzip=1.8.0=h289538f_1 + - linkify-it-py=2.0.0=py311haa95532_0 + - llvmlite=0.43.0=py311hf2fb9eb_0 + - locket=1.0.0=py311haa95532_0 + - lz4-c=1.9.4=h2bbff1b_1 + - markdown-it-py=2.2.0=py311haa95532_1 + - markdown=3.4.1=py311haa95532_0 + - markupsafe=2.1.3=py311h2bbff1b_0 + - matplotlib-base=3.9.2=py311he19b0ae_1 + - matplotlib-inline=0.1.6=py311haa95532_0 + - mdit-py-plugins=0.3.0=py311haa95532_0 + - mdurl=0.1.0=py311haa95532_0 + - minizip=4.0.3=hb68bac4_0 + - mistune=2.0.4=py311haa95532_0 + - mkl-service=2.4.0=py311h2bbff1b_1 + - mkl=2023.1.0=h6b88ed4_46358 + - mkl_fft=1.3.11=py311h827c3e9_0 + - mkl_random=1.2.8=py311hea22821_0 + - multipledispatch=0.6.0=py311haa95532_0 + - nbclassic=1.1.0=py311haa95532_0 + - nbclient=0.8.0=py311haa95532_0 + - nbconvert=7.16.4=py311haa95532_0 + - nbformat=5.10.4=py311haa95532_0 + - nest-asyncio=1.6.0=py311haa95532_0 + - netcdf4=1.6.2=py311hec71f40_0 + - notebook-shim=0.2.3=py311haa95532_0 + - notebook=6.5.7=py311haa95532_0 + - numba=0.60.0=py311hea22821_0 + - numexpr=2.10.1=py311h4cd664f_0 + - numpy-base=1.26.4=py311hd01c5d8_0 + - numpy=1.26.4=py311hdab7c0b_0 + - opencv=4.10.0=py311h66e330a_0 + - openjpeg=2.5.2=hae555c5_0 + - openssl=3.0.15=h827c3e9_0 + - overrides=7.4.0=py311haa95532_0 + - packaging=24.1=py311haa95532_0 + - pandas=2.2.3=py311h5da7b33_0 + - panel=1.5.3=py311haa95532_0 + - param=2.1.1=py311haa95532_0 + - partd=1.4.1=py311haa95532_0 + - pcre2=10.42=h0ff8eda_1 + - pillow=11.0.0=py311hb5480e2_0 + - pip=24.2=py311haa95532_0 + - pixman=0.40.0=h2bbff1b_1 + - platformdirs=3.10.0=py311haa95532_0 + - pooch=1.8.2=py311haa95532_0 + - poppler-data=0.4.11=haa95532_1 + - poppler=24.09.0=h4f47ea2_0 + - proj=9.3.1=ha107b6e_0 + - prometheus_client=0.21.0=py311haa95532_0 + - prompt-toolkit=3.0.43=py311haa95532_0 + - psutil=5.9.0=py311h2bbff1b_0 + - pyct=0.5.0=py311haa95532_0 + - pygments=2.15.1=py311haa95532_1 + - pyparsing=3.2.0=py311haa95532_0 + - pyproj=3.6.1=py311ha997c60_0 + - pyshp=2.3.1=py311haa95532_0 + - pysocks=1.7.1=py311haa95532_0 + - python-dateutil=2.9.0post0=py311haa95532_2 + - python-fastjsonschema=2.20.0=py311haa95532_0 + - python-json-logger=2.0.7=py311haa95532_0 + - python=3.11.10=h4607a30_0 + - pytz=2024.1=py311haa95532_0 + - pyviz_comms=3.0.2=py311haa95532_0 + - pywin32=305=py311h2bbff1b_0 + - pywinpty=2.0.14=py311h72d21ff_0 + - pyyaml=6.0.2=py311h827c3e9_0 + - pyzmq=24.0.1=py311h2bbff1b_0 + - qhull=2020.2=h59b6b97_2 + - qt-main=5.15.2=h19c9488_11 + - referencing=0.30.2=py311haa95532_0 + - requests=2.32.3=py311haa95532_1 + - rfc3339-validator=0.1.4=py311haa95532_0 + - rfc3986-validator=0.1.1=py311haa95532_0 + - rpds-py=0.10.6=py311h636fa0f_1 + - scipy=1.14.1=py311h9f229c6_0 + - send2trash=1.8.2=py311haa95532_0 + - setuptools=75.1.0=py311haa95532_0 + - shapely=2.0.5=py311h82fc408_0 + - sniffio=1.3.0=py311haa95532_0 + - soupsieve=2.5=py311haa95532_0 + - sqlite=3.45.3=h2bbff1b_0 + - tbb=2021.8.0=h59b6b97_0 + - terminado=0.17.1=py311haa95532_0 + - tiledb=2.3.3=hd8964de_3 + - tinycss2=1.2.1=py311haa95532_0 + - tk=8.6.14=h0416ee5_0 + - toolz=0.12.0=py311haa95532_0 + - tornado=6.4.1=py311h827c3e9_0 + - tqdm=4.66.5=py311h746a85d_0 + - traitlets=5.14.3=py311haa95532_0 + - typing-extensions=4.11.0=py311haa95532_0 + - typing_extensions=4.11.0=py311haa95532_0 + - uc-micro-py=1.0.1=py311haa95532_0 + - unicodedata2=15.1.0=py311h2bbff1b_0 + - uriparser=0.9.7=h2bbff1b_0 + - urllib3=2.2.3=py311haa95532_0 + - vc=14.40=haa95532_2 + - vs2015_runtime=14.42.34433=h9531ae6_2 + - webencodings=0.5.1=py311haa95532_1 + - websocket-client=1.8.0=py311haa95532_0 + - wheel=0.44.0=py311haa95532_0 + - win_inet_pton=1.1.0=py311haa95532_0 + - winpty=0.4.3=4 + - xarray=2023.6.0=py311haa95532_0 + - xerces-c=3.2.4=hd77b12b_1 + - xyzservices=2022.9.0=py311haa95532_1 + - xz=5.4.6=h8cc25b3_1 + - yaml=0.2.5=he774522_0 + - zeromq=4.3.5=hd77b12b_0 + - zipp=3.21.0=py311haa95532_0 + - zlib=1.2.13=h8cc25b3_1 + - zstd=1.5.6=h8880b57_0 diff --git a/grabcut/anaconda-project.yml b/grabcut/anaconda-project.yml new file mode 100644 index 000000000..c54bdc1e7 --- /dev/null +++ b/grabcut/anaconda-project.yml @@ -0,0 +1,53 @@ +# To reproduce: install 'anaconda-project', then 'anaconda-project run' +name: grabcut +description: Extract coast/shoreline contour with GrabCut +examples_config: + created: 2018-11-16 + maintainers: + - philippjfr + categories: + - "Geospatial" + labels: + - geoviews + - panel + no_data_ingestion: true + +user_fields: [examples_config] + +channels: [defaults] + +packages: &pkgs + - python=3.11 + - notebook>=6,<7 + - cartopy + - geoviews + - holoviews + - panel + - datashader + - pillow + - numpy + - pandas + - opencv + - notebook + - shapely + +dependencies: *pkgs + +commands: + notebook: + notebook: grabcut.ipynb + dashboard: + unix: panel serve --rest-session-info --session-history -1 grabcut.ipynb --show + supports_http_options: true + +variables: + # Avoid "Dask dataframe query planning is disabled because dask-expr is not installed." + DASK_DATAFRAME__QUERY_PLANNING: "False" + +downloads: {} + +platforms: +- linux-64 +- osx-64 +- win-64 +- osx-arm64 diff --git a/grabcut/grabcut.ipynb b/grabcut/grabcut.ipynb new file mode 100644 index 000000000..b1f585f1f --- /dev/null +++ b/grabcut/grabcut.ipynb @@ -0,0 +1,163 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Grabcut" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Extract a coast- and shoreline contour with GrabCut\n", + "\n", + "The [GrabCut algorithm](https://en.wikipedia.org/wiki/GrabCut) provides a way to annotate an image using polygons or lines to demark the foreground and background. The algorithm estimates the color distribution of the target object and that of the background using a Gaussian mixture model. This is used to construct a Markov random field over the pixel labels, with an energy function that prefers connected regions having the same label, and running a graph-cut-based optimization to infer their values. This procedure is repeated until convergence, resulting in an image mask denoting the foreground and background.\n", + "\n", + "In this example this algorithm is applied to map tiles to automatically extract a coast or shoreline contour. First we specify a rectangular region in which to download the map tiles using the `SelectRegionPanel`, then we can declare the `GrabCutPanel` to annotate the region and let the algorithm compute a contour." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import panel as pn\n", + "import holoviews as hv\n", + "import geoviews as gv\n", + "\n", + "gv.extension('bokeh')\n", + "\n", + "from grabcut import paths_to_polys, GrabCutPanel, SelectRegionPanel" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "select_region = SelectRegionPanel(hv.Bounds((-77.5, 34.45, -77.3, 34.75)), magnification=1)\n", + "pn.Row(select_region.param, select_region.view())" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The toolbar in the plot on the left contains two polygon/polyline drawing tools to annotate the image with foreground (in red) and background (in cyan) regions respectively. To demonstrate this process in a static notebook there are already two polygons declared, one marking the land as the foreground and one marking the sea as the background." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "background = np.array([\n", + " [-77.3777271 , 34.66037492], [-77.35987035, 34.62251189], [-77.34130751, 34.64016586],\n", + " [-77.35563287, 34.65360275], [-77.36083954, 34.66560481], [-77.3777271 , 34.66037492]\n", + "])\n", + "foreground = np.array([\n", + " [-77.46585666, 34.66965009], [-77.46451121, 34.62795592], [-77.43105867, 34.64501054],\n", + " [-77.41376085, 34.62573423], [-77.37886112,34.63780581], [-77.41283172, 34.6800562 ],\n", + " [-77.46585666, 34.66965009]\n", + "])\n", + "dashboard = GrabCutPanel(\n", + " select_region.get_image(),\n", + " fg_data=[foreground], bg_data=[background],\n", + " minimum_size=500, tolerance=0.001, width=400,\n", + ")\n", + "pn.Row(dashboard.param, dashboard.view())" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Pressing the `Update Contour` runs the *GrabCut* algorithm on the selected region with the foreground and background polygons/paths given as input. The output of this process is a contour that delineates the foreground and background. This countour is also filtered and simplified to make it smaller to export and easier to edit. Try to set `Minimum size` to 1 and `Tolerance` to 200 to observe the effects of filtering and simplifying the contour, respectively. To speed up the calculation we can also downsample the image before applying the Grabcut algorithm by reducing the value of `magnification` set when instantiating `SelectRegionPanel`.\n", + "\n", + "Next we can further edit the extracted contour, by attaching a `PolyEdit` stream to the contour:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "poly_edit = gv.streams.PolyEdit(source=dashboard.result, vertex_style={'color': 'red'}, shared=True)\n", + "(gv.tile_sources.ESRI * dashboard.result).opts(active_tools=['poly_edit'], width=500, height=500)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Once we are done we can convert the paths to a polygon and view the result in a separate cell:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "gv.tile_sources.ESRI * paths_to_polys(poly_edit.element).opts(width=500, height=500, color_index=None)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Deploy as a dashboard\n", + "\n", + "We will allow the first two stages of the workflow introduced above to be deployed with Panel as a pipeline, where the ouput of a stage feeds the input of a next stage. Marking the pipeline with the `.servable()` method allows Panel to know which object to serve when the notebook is executed with the command `panel serve grabcut.ipynb`." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "stages = [\n", + " ('Select Region', SelectRegionPanel),\n", + " ('Grabcut', GrabCutPanel),\n", + "]\n", + "\n", + "pipeline = pn.pipeline.Pipeline(stages)\n", + "\n", + "pn.Column(\n", + " '# Grabcut dashboard',\n", + " '1. Download map tiles of your zone of interest\\n2. Draw the background & foreground of the image before running the grabcut algorithm.',\n", + " pipeline,\n", + ").servable()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.10" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/grabcut/grabcut.py b/grabcut/grabcut.py new file mode 100644 index 000000000..7b0652230 --- /dev/null +++ b/grabcut/grabcut.py @@ -0,0 +1,470 @@ +""" +Module that supports the grabcut.ipynb example. + +Its content has been extracted and adapted from earthsim.holoviz.org. +""" + +import math + +import param +import panel as pn +import numpy as np +import holoviews as hv +import geoviews as gv +import cartopy.crs as ccrs +import datashader as ds + +from PIL import Image, ImageDraw +from geoviews.util import path_to_geom_dicts +from holoviews.core.operation import Operation +from holoviews.core.options import Store, Options +from holoviews.core.spaces import DynamicMap +from holoviews.core.util import pd +from holoviews.element.util import split_path +from holoviews.operation.datashader import ResampleOperation2D, rasterize, regrid +from holoviews.operation import contours +from holoviews.streams import FreehandDraw, BoxEdit +from shapely.geometry import Polygon, LinearRing, MultiPolygon + + +def paths_to_polys(path): + """ + Converts a Path object to a Polygons object by extracting all paths + interpreting inclusion zones as holes and then constructing Polygon + and MultiPolygon geometries for each path. + """ + geoms = path_to_geom_dicts(path) + + polys = [] + for geom in geoms: + g = geom['geometry'] + found = False + for p in list(polys): + if Polygon(p['geometry']).contains(g): + if 'holes' not in p: + p['holes'] = [] + p['holes'].append(g) + found = True + elif Polygon(g).contains(p['geometry']): + polys.pop(polys.index(p)) + if 'holes' not in geom: + geom['holes'] = [] + geom['holes'].append(p['geometry']) + if not found: + polys.append(geom) + + polys_with_holes = [] + for p in polys: + geom = p['geometry'] + holes = [] + if 'holes' in p: + holes = [LinearRing(h) for h in p['holes']] + + if 'Multi' in geom.geom_type: + polys = [] + for g in geom: + subholes = [h for h in holes if g.intersects(h)] + polys.append(Polygon(g, subholes)) + poly = MultiPolygon(polys) + else: + poly = Polygon(geom, holes) + p['geometry'] = poly + polys_with_holes.append(p) + return path.clone(polys_with_holes, new_type=gv.Polygons) + + +class rasterize_polygon(ResampleOperation2D): + """ + Rasterizes Polygons elements to a boolean mask using PIL + """ + + def _process(self, element, key=None): + sampling = self._get_sampling(element, 0, 1) + (x_range, y_range), (xvals, yvals), (width, height), (xtype, ytype) = sampling + (x0, x1), (y0, y1) = x_range, y_range + img = Image.new('L', (width, height), 0) + draw = ImageDraw.Draw(img) + for poly in element.split(): + poly = poly.reindex(vdims=[]) + for p in split_path(poly): + xs, ys = (p.values if pd else p).T + xs = ((xs - x0) / (x1-x0) * width) + ys = ((ys - y0) / (y1-y0) * height) + draw.polygon(list(zip(xs, ys)), outline=1, fill=1) + img = np.array(img).astype('bool') + return hv.Image((xvals, yvals, img), element.kdims) + + +class extract_foreground(Operation): + """ + Uses Grabcut algorithm to extract the foreground from an image given + path or polygon types. + """ + + foreground = param.ClassSelector(class_=hv.Path) + + background = param.ClassSelector(class_=hv.Path) + + iterations = param.Integer(default=5, bounds=(0, 20), doc=""" + Number of iterations to run the GrabCut algorithm for.""") + + + def _process(self, element, key=None): + try: + import cv2 as cv + except: + # HACK: Avoids error loading OpenCV the first time + # ImportError dlopen: cannot load any more object with static TLS + try: + import cv2 as cv + except ImportError: + raise ImportError('GrabCut algorithm requires openCV') + + if isinstance(self.p.foreground, hv.Polygons): + rasterize_op = rasterize_polygon + else: + rasterize_op = rasterize.instance(aggregator=ds.any()) + + kwargs = {'dynamic': False, 'target': element} + fg_mask = rasterize_op(self.p.foreground, **kwargs) + bg_mask = rasterize_op(self.p.background, **kwargs) + fg_mask = fg_mask.dimension_values(2, flat=False) + bg_mask = bg_mask.dimension_values(2, flat=False) + + # UPDATE wrt earthsim: Newer versions of holoviews return np.nan instead of 0 (I think) + fg_mask = np.nan_to_num(fg_mask) + bg_mask = np.nan_to_num(bg_mask) + + if fg_mask[np.isfinite(fg_mask)].sum() == 0 or bg_mask[np.isfinite(bg_mask)].sum() == 0: + return element.clone([], vdims=['Foreground'], new_type=gv.Image, + crs=element.crs) + + mask = np.where(fg_mask, 1, 2) + mask = np.where(bg_mask, 0, mask).copy() + bgdModel = np.zeros((1,65), np.float64) + fgdModel = np.zeros((1,65), np.float64) + + if isinstance(element, hv.RGB): + img = np.dstack([element.dimension_values(d, flat=False) + for d in element.vdims]) + else: + img = element.dimension_values(2, flat=False) + mask, _, _ = cv.grabCut(img, mask.astype('uint8'), None, bgdModel, fgdModel, + self.p.iterations, cv.GC_INIT_WITH_MASK) + fg_mask = np.where((mask==2)|(mask==0),0,1).astype('bool') + xs, ys = (element.dimension_values(d, expanded=False) for d in element.kdims) + return element.clone((xs, ys, fg_mask), vdims=['Foreground'], new_type=gv.Image, + crs=element.crs) + +class filter_polygons(Operation): + + minimum_size = param.Integer(default=10) + + link_inputs = param.Boolean(default=True) + + def _process(self, element, key=None): + paths = [] + for path in element.split(): + # UPDATE wrt earthsim: len(path) returns 1 I guess because it's a multipath and that is has only one path + # UPDATE wrt earthsim: Is there a better way to get the number of vertices in a path? + # if len(path) < self.p.minimum_size: + if len(path.dimension_values('Longitude')) < self.p.minimum_size: + continue + for p in split_path(path): + if len(p) > self.p.minimum_size: + paths.append(p) + return element.clone(paths) + + +class simplify_paths(Operation): + + tolerance = param.Number(default=0.01) + + def _process(self, element, key=None): + paths = [] + for g in path_to_geom_dicts(element): + geom = g['geometry'] + g = dict(g, geometry=geom.simplify(self.p.tolerance)) + paths.append(g) + return element.clone(paths) + + +class GrabCutPanel(param.Parameterized): + """ + Defines a Panel for extracting contours from an Image. + """ + + crs = param.ClassSelector(default=ccrs.PlateCarree(), class_=ccrs.Projection, + precedence=-1, doc=""" + Projection the inputs and output paths are defined in.""") + + image = param.ClassSelector(class_=gv.RGB, precedence=-1, doc=""" + The Image to compute contours on""") + + path_type = param.ClassSelector(default=gv.Path, class_=hv.Path, + precedence=-1, is_instance=False, doc=""" + The element type to draw into.""") + + downsample = param.Magnitude(default=1, precedence=1, doc=""" + Amount to downsample image by before applying grabcut.""") + + iterations = param.Integer(default=5, precedence=1, bounds=(0, 20), doc=""" + Number of iterations to run the GrabCut algorithm for.""") + + clear = param.Action(default=lambda o: o._trigger_clear(), + precedence=2, doc=""" + Button to clear drawn annotations.""") + + update_contour = param.Action(default=lambda o: o.param.trigger('update_contour'), + precedence=2, doc=""" + Button triggering GrabCut.""") + + minimum_size = param.Integer(default=100, precedence=3) + + filter_contour = param.Action(default=lambda o: o.param.trigger('filter_contour'), + precedence=4, doc=""" + Button triggering filtering of contours.""") + + tolerance = param.Number(default=0.01, precedence=5) + + simplify_contour = param.Action(default=lambda o: o.param.trigger('simplify_contour'), + precedence=6, doc=""" + Simplifies contour.""" ) + + width = param.Integer(default=500, precedence=-1, doc=""" + Width of the plot""") + + height = param.Integer(default=None, precedence=-1, doc=""" + Height of the plot""") + + def __init__(self, image, fg_data=[], bg_data=[], **params): + super().__init__(image=image, **params) + self._bg_data = bg_data + self._fg_data = fg_data + self.bg_paths = DynamicMap(self.bg_path_view) + self.fg_paths = DynamicMap(self.fg_path_view) + self.draw_bg = FreehandDraw(source=self.bg_paths, tooltip="draw_fg") + self.draw_fg = FreehandDraw(source=self.fg_paths, tooltip="draw_bg") + self._clear = False + + def _trigger_clear(self): + self._clear = True + self.param.trigger('clear') + self._clear = False + + @param.depends('clear') + def bg_path_view(self): + if self._clear: + self._bg_data = [] + elif self.bg_paths.data: + self._bg_data = self.draw_bg.element.data + else: + self._bg_data = gv.project(self.path_type(self._bg_data, crs=self.crs), projection=self.image.crs) + return self.path_type(self._bg_data, crs=self.image.crs).opts(color='cyan') + + @param.depends('clear') + def fg_path_view(self): + if self._clear: + self._fg_data = [] + elif self.fg_paths.data: + self._fg_data = self.draw_fg.element.data + else: + self._fg_data = gv.project(self.path_type(self._fg_data, crs=self.crs), projection=self.image.crs) + return self.path_type(self._fg_data, crs=self.image.crs).opts(color='red') + + @param.depends('update_contour', 'image') + def extract_foreground(self, **kwargs): + img = self.image + bg, fg = self.bg_path_view(), self.fg_path_view() + + if not len(bg) or not len(fg): + return gv.Path([], img.kdims, crs=img.crs) + + if self.downsample != 1: + kwargs = {'dynamic': False} + h, w = img.interface.shape(img, gridded=True) + kwargs['width'] = int(w*self.downsample) + kwargs['height'] = int(h*self.downsample) + img = regrid(img, **kwargs) + + foreground = extract_foreground(img, background=bg, foreground=fg, + iterations=self.iterations) + # UPDATE wrt earthsim: No need here to wrap the outpout of countours() in a list + foreground = gv.Path(contours(foreground, filled=True, levels=1).split()[0].data, + kdims=foreground.kdims, crs=foreground.crs) + self.result = gv.project(foreground, projection=self.crs) + return foreground + + @param.depends('filter_contour') + def _filter_contours(self, obj, **kwargs): + if self.minimum_size > 0: + obj = filter_polygons(obj, minimum_size=self.minimum_size) + return obj + + @param.depends('simplify_contour') + def _simplify_contours(self, obj, **kwargs): + if self.tolerance > 0: + obj = simplify_paths(obj, tolerance=self.tolerance) + self.result = gv.project(obj, projection=self.crs) + return obj + + def view(self): + height = self.height + if height is None: + h, w = self.image.dimension_values(2, flat=False).shape[:2] + height = int(self.width*(h/w)) + options = dict(width=self.width, height=height, xaxis=None, yaxis=None, + projection=self.image.crs) + dmap = hv.DynamicMap(self.extract_foreground) + dmap = hv.util.Dynamic(dmap, operation=self._filter_contours) + dmap = hv.util.Dynamic(dmap, operation=self._simplify_contours) + return (self.image.opts(**options) * self.bg_paths * self.fg_paths + + dmap.opts(**options)).opts(toolbar="left") + + @param.output(polys=hv.Path) + def output(self): + return self.result + + def panel(self): + return pn.Row(self.param, self.view()) + + +class SelectRegionPanel(param.Parameterized): + """ + Visualization that allows selecting a bounding box anywhere on a tile source. + """ + + # Tile servers + misc_servers = {'OpenStreetMap': 'http://c.tile.openstreetmap.org/{Z}/{X}/{Y}.png', + 'Basemaps CartoCDN': 'https://s.basemaps.cartocdn.com/light_all/{Z}/{X}/{Y}.png', + 'Stamen': 'http://tile.stamen.com/terrain/{Z}/{X}/{Y}.png'} + + arcgis_paths = {'World Imagery': 'World_Imagery/MapServer/tile/{Z}/{Y}/{X}', + 'World Topo Map': 'World_Topo_Map/MapServer/tile/{Z}/{Y}/{X}', + 'World Terrain Base': 'World_Terrain_Base/MapServer/tile/{Z}/{Y}/{X}', + 'World Street Map': 'World_Street_Map/MapServer/tile/{Z}/{Y}/{X}', + 'World Shaded Relief': 'World_Shaded_Relief/MapServer/tile/{Z}/{Y}/{X}', + 'World Physical Map': 'World_Physical_Map/MapServer/tile/{Z}/{Y}/{X}', + 'USA Topo Maps': 'USA_Topo_Maps/MapServer/tile/{Z}/{Y}/{X}', + 'Ocean Basemap': 'Ocean_Basemap/MapServer/tile/{Z}/{Y}/{X}', + 'NatGeo World Map': 'NatGeo_World_Map/MapServer/tile/{Z}/{Y}/{X}'} + + arcgis_urls = {k: 'https://server.arcgisonline.com/ArcGIS/rest/services/' + v + for k, v in arcgis_paths.items()} + + tile_urls = dict(misc_servers, **arcgis_urls) + + # Parameters + name = param.String(default='Region Settings') + + width = param.Integer(default=900, precedence=-1, doc="Width of the plot in pixels") + + height = param.Integer(default=700, precedence=-1, doc="Height of the plot in pixels") + + zoom_level = param.Integer(default=7, bounds=(1,21), precedence=-1, doc=""" + The zoom level is updated when the bounding box is drawn.""" ) + + tile_server = param.ObjectSelector(default=tile_urls['World Imagery'], objects=tile_urls) + + magnification = param.Integer(default=1, bounds=(1,10), precedence=0.1) + + def __init__(self, poly_data=[], **params): + super().__init__(**params) + self.boxes = gv.Polygons(poly_data).opts( + fill_alpha=0.5, color='grey', line_color='white', + line_width=2, width=self.width, height=self.height + ) + if not self.boxes: + self.boxes = self.boxes.opts(global_extent=True) + self.box_stream = BoxEdit(source=self.boxes, num_objects=1) + + @classmethod + def bounds_to_zoom_level(cls, bounds, width, height, + tile_width=256, tile_height=256, max_zoom=21): + """ + Computes the zoom level from the lat/lon bounds and the plot width and height + + bounds: tuple(float) + Bounds in the form (lon_min, lat_min, lon_max, lat_max) + width: int + Width of the overall plot + height: int + Height of the overall plot + tile_width: int (default=256) + Width of each tile + tile_width: int (default=256) + Height of each tile + max_zoom: int (default=21) + Maximum allowed zoom level + """ + + def latRad(lat): + sin = math.sin(lat * math.pi / 180); + if sin == 1: + radX2 = 20 + else: + radX2 = math.log((1 + sin) / (1 - sin)) / 2; + return max(min(radX2, math.pi), -math.pi) / 2; + + def zoom(mapPx, worldPx, fraction): + return math.floor(math.log(mapPx / worldPx / fraction) / math.log(2)); + + x0, y0, x1, y1 = bounds + latFraction = (latRad(y1) - latRad(y0)) / math.pi + lngDiff = x1 - x0 + lngFraction = ((lngDiff + 360) if lngDiff < 0 else lngDiff)/360 + latZoom = zoom(height, tile_height, latFraction) + lngZoom = zoom(width, tile_width, lngFraction) + return min(latZoom, lngZoom, max_zoom) + + @param.depends('tile_server') + def callback(self): + return gv.WMTS(self.tile_server) + + @property + def bbox(self): + element = self.box_stream.element if self.box_stream.data else self.boxes + # Update shared_state with bounding box (if any) + if element: + xs, ys = element.array().T + bbox = (xs[0], ys[0], xs[2], ys[1]) + # Set the zoom level + zoom_level = self.bounds_to_zoom_level(bbox, self.width, self.height) + self.zoom_level = zoom_level + self.magnification + return bbox + else: + return None + + # UPDATE wrt earthsim: add the get_image method that replaces the former get_tiff method. + # get_image uses get_tile_rgb, a new util function from geoviews, while get_tiff + # required the quest library as an external dependency. + def get_image(self): + bbox = self.bbox + if bbox is None: + raise ValueError('Please supply a bounding box in order to extract an image.') + + img = gv.util.get_tile_rgb( + tile_source=self.tile_server, + bbox=bbox, + zoom_level=self.zoom_level, + bbox_crs=ccrs.PlateCarree(), + ) + + return img + + def view(self): + return (gv.DynamicMap(self.callback) * self.boxes).opts(active_tools=['wheel_zoom']) + + @param.output(image=hv.Image) + def output(self): + return self.get_image() + + def panel(self): + return pn.Row(self.param, self.view()) + + +options = Store.options('bokeh') + +options.Points = Options('plot', padding=0.1) +options.Path = Options('plot', padding=0.1) +options.Polygons = Options('plot', padding=0.1) diff --git a/grabcut/thumbnails/grabcut.png b/grabcut/thumbnails/grabcut.png new file mode 100644 index 000000000..3d6757043 Binary files /dev/null and b/grabcut/thumbnails/grabcut.png differ