Raster#
- class caris.coverage.Raster#
- add_band()#
Add a new band
- begin_transaction()#
Begin a new transaction
- block_areas()#
Iterates over areas of the raster using the raster’s preferred block size. :returns: Iterator that returns grid-areas to process as tuples. :rtype:
GridBoxIterator
- commit_transaction()#
Commit a transaction
- create_copy()#
Save a copy of this Raster
Either uri or path must be specified.
- read()#
Read raster data
- Parameters:
- Returns:
raster data from left to right, then bottom to top
- Return type:
- read_np_array()#
Read raster data as a numpy array
- Parameters:
- Returns:
The data read
- Return type:
- set_band_min_max()#
Added in version 5.5.0.
Set the band’s minimum and maximum values.
- Parameters:
band_name (
str) – The name of the band to update.min – A tuple/value of size tuple_length containing the minimum value
max – A tuple/value of size tuple_length containing the maximum value
- set_band_true_pos()#
Added in version 5.6.8.
Set the band’s true position band which contains the true coordinates for data of the band.
- set_string_table()#
Added in version 5.3.0.
Replace a band’s string table
- write()#
Write data to a Raster
- Parameters:
band_name (
str) – The name of the band to write tooffset ((x_offset, y_offset), (width, height) – The lower-left offset into the Raster to begin the write and the width and height of the area to write.
data (
numpy.ndarray) – The data to write
When using the unnamed parameters, the offset must be specified. Area is not supported in this context.
- Keyword Arguments:
band_name (
str) – The name of the band to write tooffset ((x_offset, y_offset), (width, height) – The lower-left offset into the Raster to begin the write and the width and height of the area to write.
area ((x1, y1), (x2, y2)) – The lower-left and upper-right corners of the area to write.
data (
numpy.ndarray) – The data to write
When using the named keyword arguments, either offset or area must be specified. Both cannot be specified at the same time.
- property bounding_polygon#
Added in version 5.1.0.
str: The bounding polygon in WKT format.
- property transform#
The raster transform.
- Type: