hydromt.merge.merge#
- hydromt.merge.merge(data_arrays, dst_crs=None, dst_bounds=None, dst_res=None, align=True, mask=None, merge_method='first', **kwargs)[source]#
Merge multiple tiles to a single DataArray.
If mismatching grid CRS or resolution, tiles are reprojected to match the output DataArray grid. If no destination grid is defined it is based on the first DataArray in the list.
Based on
rasterio.merge.merge()
.- Parameters:
data_arrays (
list
ofxarray.DataArray
) – Tiles to mergedst_crs (
pyproj.CRS
,int
) – CRS (or EPSG code) of destination griddst_bounds (
list
offloat
) – Bounding box [xmin, ymin, xmax, ymax] of destination griddst_res (
float
) – Resolution of destination gridalign (
bool
, optional) – If True, align grid with dst_resmask (
geopands.GeoDataFrame
, optional) – Mask of destination area of interest. Used to determine dst_crs, dst_bounds and dst_res if missing.merge_method (
{'first','last','min','max','new'}
,callable
) –Merge method:
first: reverse painting
last: paint valid new on top of existing
min: pixel-wise min of existing and new
max: pixel-wise max of existing and new
new: assert no pixel overlap
**kwargs – Key-word arguments passed to
reproject()
- Returns:
da_out – Merged tiles.
- Return type: