geovista.pantry#

Download, cache and load geovista assets.

Notes

Added in version 0.5.0.

Submodules#

Package Contents#

Functions#

fetch_coastlines([resolution])

Get the Natural Earth coastlines for the required resolution.

fetch_raster(fname)

Download, uncompress and cache a raster file.

geovista.pantry.fetch_coastlines(resolution=None)[source]#

Get the Natural Earth coastlines for the required resolution.

If the resource is not already available in the geovista geovista.cache.CACHE, then it will be downloaded from the geovista.cache.BASE_URL.

Parameters:
resolutionstr, optional

The resolution of the Natural Earth coastlines, which may be either 110m, 50m or 10m. Defaults to geovista.common.COASTLINES_RESOLUTION.

Returns:
PolyData

The coastlines mesh.

Notes

Added in version 0.1.0.

geovista.pantry.fetch_raster(fname)[source]#

Download, uncompress and cache a raster file.

If the resource is not already available in the geovista geovista.cache.CACHE, then it will be downloaded from the geovista.cache.BASE_URL.

Parameters:
fnamestr

The name of the raster file to be downloaded, uncompressed and cached.

Returns:
Path

The absolute path to the raster file.

Notes

Added in version 0.5.0.