Average rainfall 2001-2016, global tropics

Map: Average rainfall 2001-2016, global tropics

Additional packages

This post was originally written prior to setting up the conda virtual environment.

Introduction

The full suite of capabilities that come with Karttur’s GeoImagine Framework requires that you install some extra python packages with Anaconda. Which packages to install depends both on the Anaconda distribution and version, as well as the GeoImagine Framework packages.

If you are going to download data from https://earthdata.nasa.gov (e.g.SMAP or MODIS) you must also setup your machine to handle wget, as explained towards the end of this blog.

Additional packages

With a full installation of the Framework and Anaconda3 installed with Python 3.6.7, I needed to add the following python packages:

  • GDAL
  • pypng
  • pyproj
  • reportlab
  • svgis
  • svgwrite
  • seasonal
  • sentinelsat
  • shapely
  • xmltodict
  • geopandas (not yet completed)
  • georasters (not yet completed)
  • rasterio (not yet completed, but installed)
  • fiona (not yet completed)

See the excellent web page

GDAL

The Geographic Data Abstraction Library (GDAL) is the core of all spatial processing in Karttur’s GeoImagine Framework. Anaconda suggests that GDAL be installed using conda-forge:

$ conda install -c conda-forge gdal

However, dependent on how you installed other packages it might be better to use pip install:

$ pip install gdal

pypng

The Pure Python PNG (pypng) image encoder/decoder is a stand alone module that is used for writing png images. In the Framework pypng is used both for generating image maps, including movie frames, and other graphical output (e.g. legends). Use pip install to get pypng added to your project.

$ pip install pypng

pyproj

The package pyproj is a map projection library. In the Framework it is used for importing SMAP data. You can install pyproj either using conda-forge:

$ conda install -c conda-forge pyproj

or pip install

$ pip install pyproj

reportlab

In the Framework, reportlab is used for generating pdf outputs, mainly for creating map legends. You can install reportlab either using conda:

$ conda install -c anaconda reportlab

or pip install

$ pip install reportlab

svgis

SVGIS converts vector geodata to Scalable Vector Graphics (SVG). SVG can be styled using Cascade Style Sheets (CSS) and also read and manipulated by drawing programs. In the Framework SVGIS is primarily used for exporting vector data to use as overlays in map layouts.

SVGIS is installed with pip install

$ pip install svgis

svgwrite

SVGwrite is a more general library for writing SVG formated vector graphics.

SVGwrite is installed with pip install

$ pip install svgwrite

seasonal

The seasonal package estimate and remove trend and periodicity in time-series. In the Framework it is used for time-series decompostion and trend estimations.

NOTE that in the Framework the seasonal package is edited to include more options and with altered default settings.

The seasonal package is installed with pip install

$ pip install seasonal

sentinelsat

In the Framework Sentinelsat is used for searching, downloading and retrieving the metadata and the actual data of Sentinel satellite images from the Copernicus Open Access Hub.

Sentinelsat is installed with pip install.

$ pip install sentinelsat

Shapely

Shapley is a versatile tool for manipulation and analysis of geometric objects in the Cartesian plane. In the Framework it is used for vector processing.

You can install shapely either using conda-forge:

$ conda install -c conda-forge shapely

or with pip install.

$ pip install Shapely

xmltodict

In Karttur’s GeoImagine Framework, xmltodict is used for reading all the instructions. The Framework will not function without it.

You can install shapely either using conda-forge:

$ conda install -c conda-forge xmltodist

or with pip install.

$ pip install xmltodict

landsatxplore

For downloading Landsat data from EarthExplorer (yu need to register) #

$ pip install landsatxplore

plotnine

$conda install -c conda-forge plotnine

wget

Wget is a command-line tool for retrieving files using HTTP, HTTPS, FTP and FTPS (the most widely-used Internet protocols). In Karttur´s GeoImagine Framework, wget is used for accessing online available data from e.g.https://earthdata.nasa.gov, including MODIS and SMAP. To install Wget on Mac osx you can use Homebrew.

$ brew install wget

The installation of Homebrew itself is covered in the blog post on ImageMagick.