Cartopy-Installation ==================== Mit :doc:`jupyter-tutorial:productive/envs/spack/index` könnt ihr Cartopy in eurem Kernel bereitstellen, z.B. mit: .. code-block:: console $ spack env activate python-38 $ spack install py-cartopy@0.18.0%gcc@11.2.0~epsg~ows~plotting Dies installiert Cartopy mit Unterstützung von: * `epsg <_epsg.io>`_ * `Open Geospatial Consortium (OGC) `_ * Plot-Funktionalität Zusätzlich werden folgende Pakete mitinstalliert: * `gdal `_ * :doc:`/matplotlib/index` * `OWSLib `_ * `Pillow `_ * `pyepsg `_ * `PyShp `_ * `shapely `_ * `six `_ Alternativ könnt ihr Cartopy auch mit anderen Paketmanagern installieren, z.B. für Debian≥9 (Stretch) mit: .. code-block:: console $ sudo apt install proj-bin $ sudo apt install libproj-dev $ sudo apt install libgeos-dev Oder für Mac OS X mit: .. code-block:: console $ brew install proj $ brew install geos Anschließend kann Cartopy für euren Kernel installiert werden, z.B. mit: .. code-block:: console $ export PIP_NO_BINARY=:shapely: $ pipenv install cython numpy cartopy Für die :doc:`examples` benötigt ihr dann zusätzlich die folgenden beiden Python-Pakete: .. code-block:: console $ pipenv install matplotlib scipy Optionale Anforderungen ----------------------- * `rtree `_ für `libspatialindex `_ * `psycopg2 `_ für `PostGIS `_ * `geopy `_ Anforderungen zum Plotten ------------------------- * :doc:`/matplotlib/index` * `descartes `_ * `mapclassify `_ Überprüfen ---------- Schließlich könnt ihr die Installation überprüfen mit: .. code-block:: python >>> import cartopy