windkit.spatial.reproject
- windkit.spatial.reproject(obj, to_crs, copy=True)[source]
Reprojects WindKit object a new CRS without changing the data.
If the input is a xarray.Dataset or xarray.DataArray with a ‘cuboid’ spatial structure, the spatial structure will be changed to ‘point’, since the coordiates of the new dataset will no longer be regularly spaced.
- Parameters:
obj (geopandas.GeoDataFrame, xarray.DataArray, xarray.Dataset, or BBox) – WindKit object that will be reprojected.
crs (int, dict, str or pyproj.crs.CRS) – Value to initialize
pyproj.crs.CRS
copy (bool) – If true, the object is copied. Defaults to True.
- Returns:
WindKit object with new projection
- Return type:
geopandas.GeoDataFrame, xarray.DataArray,xarray.Dataset, or BBox
See also
Notes
This script reprojects the coordinates of the data, and potentially reshapes the data from 2D to 1D in geographic space. This is done so that none of the data is interpolated, but rather the coordinates are just changed to match those of the new projection.