wradlib.georef.raster.reproject_raster_dataset

wradlib.georef.raster.reproject_raster_dataset#

wradlib.georef.raster.reproject_raster_dataset(src_ds, **kwargs)[source]#

Reproject/Resample given dataset according to keyword arguments

Parameters:

src_ds (osgeo.gdal.Dataset) – raster image with georeferencing (GeoTransform at least)

Keyword Arguments:
  • spacing (float) – float or tuple of two floats pixel spacing of destination dataset, same unit as pixel coordinates

  • size (int) – tuple of two ints X/YRasterSize of destination dataset

  • resample (gdal:osgeo.gdalconst.ResampleAlg) – defaults to GRA_Bilinear GRA_NearestNeighbour = 0, GRA_Bilinear = 1, GRA_Cubic = 2, GRA_CubicSpline = 3, GRA_Lanczos = 4, GRA_Average = 5, GRA_Mode = 6, GRA_Max = 8, GRA_Min = 9, GRA_Med = 10, GRA_Q1 = 11, GRA_Q3 = 12

  • src_crs

    Coordinate Reference System (CRS) of source dataset. Can be one of:

    Defaults to None (get projection from source dataset)

  • trg_crs

    Coordinate Reference System (CRS) of source dataset. Can be one of:

    Defaults to None.

  • align (bool or tuple) – If False, there is no destination grid aligment. If True, aligns the destination grid to the next integer multiple of destination grid. If tuple (upper-left x,y-coordinate), the destination grid is aligned to this point.

Returns:

dst_ds (osgeo.gdal.Dataset) – reprojected/resampled raster dataset