xdem.DEM.from_array#
- classmethod DEM.from_array(data, transform, crs, nodata=None, vcrs=None)[source]#
Create a DEM from a numpy array and the georeferencing information.
- Parameters:
data (
ndarray
[Any
,dtype
[floating
[Any
]]] |MaskedArray
[Any
,dtype
[floating
[Any
]]]) – Input array.transform (
tuple
[float
,...
] |Affine
) – Affine 2D transform. Either a tuple(x_res, 0.0, top_left_x, 0.0, y_res, top_left_y) or an affine.Affine object.crs (
UnionType
[CRS
,int
,None
]) – Coordinate reference system. Either a rasterio CRS, or an EPSG integer.vcrs (
Union
[Literal
['Ellipsoid'
],Literal
['EGM08'
],Literal
['EGM96'
],VerticalCRS
,str
,Path
,int
,None
]) – Vertical coordinate reference system.
- Return type:
- Returns:
DEM created from the provided array and georeferencing.