Class Raster
Internal representation of raster data
Return copy of raster layer
This copy will be equal to self in the sense defined by __eq__
Get N values between the min and the max occurred in this dataset.
Return sorted list of length N+1 where the first element is min and the last is max. Intermediate values depend on the keyword quantiles: If quantiles is True, they represent boundaries between quantiles. If quantiles is False, they represent equidistant interval boundaries.
Get bounding box coordinates for raster layer
Get raster data as numeric array
If nan is True (default), nodata values will be replaced with numpy.nan If keyword nan has a numeric value, nodata values will be replaced by that value. E.g. to set missing values to 0, do get_data(nan=0.0)
if it has been resampled. Admissible values are False: data is retrieved without modification. True: Data is rescaled based on the squared ratio
between its current and native resolution. This is typically required if raster data represents a density such as population per km^2
“population” associated with the layer. If it is “density”, scaling will be applied otherwise not. This is the default.
that will be use to scale the data
Get min and max from raster Note:
If raster has a nominated no_data value, this is ignored.
Return longitudes and latitudes (the axes) for grid.
Return two vectors (longitudes and latitudes) corresponding to grid. The values are offset by half a pixel size to correspond to pixel registration.
I.e. If the grid origin (top left corner) is (105, 10) and the resolution is 1 degrees in each direction, then the vectors will take the form
longitudes = [100.5, 101.5, ..., 109.5] latitudes = [0.5, 1.5, ..., 9.5]
Return geotransform for this raster layer
Returns: * geotransform: 6 digit vector
- (top left x, w-e pixel resolution, rotation,
top left y, rotation, n-s pixel resolution).
Get the internal representation of NODATA
Get raster resolution as a 2-tuple (resx, resy)
If False return 2-tuple (dx, dy)
available. Otherwise return actual.
Convert raster grid to vector point data
Convert raster grid to vector point data
Save raster data to file
Gdal documentation at: http://www.gdal.org/classGDALRasterBand.html
This module forms part of the InaSAFE tool.