Advanced#

Map Conversion from Lines to Polygons#

Convert between polygon and line map formats:

Downloading Data#

windkit.get_raster_map() and windkit.get_vector_map() download topographic data for a bounding box. The source argument selects where from:

bbox = wk.spatial.BBox.from_cornerpts(
    minx=-8.2, miny=41.7, maxx=-8.0, maxy=41.8, crs="EPSG:4326"
)
elevation = wk.get_raster_map(bbox, dataset="NASADEM")

The API documentation of each function lists the available datasets.

Note

The Planetary Computer and Earth Engine sources need the data_apis optional dependencies (pip install "windkit[data_apis]").

Google Earth Engine also needs an authenticated account. WindKit connects to it the first time an Earth Engine dataset is requested, not on import, and raises a RuntimeError if that fails; run earthengine authenticate on the command line and try again.

Please read the terms of service of these platforms before downloading and using their data.