makeCoordGridFromHeader(rasterHeader, cellSizeNew=None, larger=False)[source]

Get x and y (2D) grid description vectors for a mesh with a given number of rows and columns, lower left center and cellSize. If ‘cellSizeNew’ is not None use cellSizeNew instead of rasterHeader[‘cellsize’] Make sure the new grid is at least as big as the old one if larger=True (can happen if ‘cellSizeNew’ is not None)

  • rasterHeader (dict) – ratser header with info on ncols, nrows, csz, xllcenter, yllcenter, noDataValue

  • cellSizeNew (float) – If not None, use cellSizeNew as cell size

  • larger (boolean) – If True, make sure the extend of the (xGrid, yGrid) is larger or equal than the header one


  • xGrid, yGrid (2D numpy arrays) – 2D vector of x and y values for mesh center coordinates (produced using meshgrid)

  • ncols, nrows (int) – number of columns and rows