geovista.geometry#
Provide Natural Earth geometry support.
Notes#
Added in version 0.1.0.
Module Contents#
Functions#
|
Create or fetch the cached mesh of the coastlines. |
|
Download Natural Earth coastline shapefile for the required resolution. |
|
Create a mesh of coastline geometries at the specified resolution. |
- geovista.geometry.coastlines(resolution=None, radius=None, zlevel=None, zscale=None)[source]#
Create or fetch the cached mesh of the coastlines.
- Parameters:
- resolution
str, optional The resolution of the Natural Earth coastlines, which may be either
110m,50m, or10m. Defaults togeovista.common.COASTLINES_RESOLUTION.- radius
float, optional The radius of the sphere. Defaults to
geovista.common.RADIUS.- zlevel
int, default=1 The z-axis level. Used in combination with the zscale to offset the radius by a proportional amount i.e.,
radius * zlevel * zscale.- zscale
float, optional The proportional multiplier for z-axis zlevel. Defaults to
geovista.common.ZLEVEL_SCALE.
- resolution
- Returns:
PolyDataA mesh of the coastlines.
Notes
Added in version 0.1.0.
- geovista.geometry.load_coastline_geometries(resolution=None)[source]#
Download Natural Earth coastline shapefile for the required resolution.
If the geometries are not already available within the cartopy cache, then they will be downloaded.
The 2-D longitude (
φ) and latitude (λ)xycoastline geometries will be unpacked as 3-Dxy0coordinates i.e.,φλ0.- Parameters:
- resolution
str, optional The resolution of the Natural Earth coastlines, which may be either
110m,50mor10m. Defaults togeovista.common.COASTLINES_RESOLUTION.
- resolution
- Returns:
listofnp.ndarrayA list containing one or more coastline
xy0geometries.
Notes
Added in version 0.1.0.
- geovista.geometry.load_coastlines(resolution=None, radius=None, zlevel=None, zscale=None)[source]#
Create a mesh of coastline geometries at the specified resolution.
- Parameters:
- resolution
str, optional The resolution of the Natural Earth coastlines, which may be either
110m,50m, or10m. Default togeovista.common.COASTLINES_RESOLUTION.- radius
float, optional The radius of the sphere. Defaults to
geovista.common.RADIUS.- zlevel
int, default=0 The z-axis level. Used in combination with the zscale to offset the radius by a proportional amount i.e.,
radius * zlevel * zscale.- zscale
float, optional The proportional multiplier for z-axis zlevel. Defaults to
geovista.common.ZLEVEL_SCALE.
- resolution
- Returns:
PolyDataA mesh of the coastlines.
Notes
Added in version 0.1.0.
Calls
load_coastline_geometries()to download the original coastline geometries.