I/O#
WindKit supports reading and writing topographic maps in both vector and raster formats. The same file formats can be used for all topographic data types (elevation, roughness, and land cover).
Supported Formats#
The following vector and raster topography map formats are supported:
Format |
Type |
Read |
Write |
Description |
|---|---|---|---|---|
|
Vector |
yes |
yes |
WAsP MAP format |
|
Vector |
yes |
yes |
GeoPackage |
|
Vector |
yes |
yes |
Geography Markup Language |
|
Raster |
yes |
yes |
GeoTIFF |
|
Raster |
yes |
yes |
Golden Software ASCII Grid |
|
Raster |
yes |
no |
GDAL Virtual Format |
|
Raster |
yes |
yes |
NetCDF |
See the individual map type pages for more details:
Elevation Maps - Elevation data structure and usage
Roughness Maps - Roughness data structure, values, and best practices
Land Cover Maps - Land cover classifications and tables
Reading from Zip Archives#
A map inside a zip archive can be read without extracting it: pass the open
archive member to windkit.read_elevation_map(),
windkit.read_roughness_map() or windkit.read_landcover_map().
The format is taken from the member’s name, as for a file on disk:
import zipfile
with zipfile.ZipFile("site_data.zip") as archive:
with archive.open("maps/terrain.map") as member:
elev_map = wk.read_elevation_map(member, crs="EPSG:32629")
Only the member itself is read. Files that belong with it elsewhere in the
archive, such as the .aux.xml of a .grd or the sources of a .vrt,
are not.