geoanalytics.sql.Raster
band_values
- geoanalytics.sql.Raster.band_values(self, band)
Returns a list of floats containing the pixel values for the specified band.
- Parameters:
band (int) – The band number (1-based index) to get the values for.
- Returns:
A list of floats containing the pixel values for the specified band.
- Return type:
list
mask_values
- geoanalytics.sql.Raster.mask_values(self, band)
Returns a list of booleans containing the mask for the specified band.
- Parameters:
band (int) – The band number (1-based index) to get the mask for.
- Returns:
A list of booleans containing the mask for the specified band. True corresponds to valid and False to invalid pixels.
- Return type:
list
np_band_values
- geoanalytics.sql.Raster.np_band_values(self, band, masked=False)
Returns a 2D NumPy array of shape (num_rows, num_columns) containing the pixel values for the specified band.
- Parameters:
band (int) – The band number (1-based index) to get the values for.
masked (boolean, optional) – Controls whether the returned NumPy array includes masking for invalid or NoData pixels. When masked=`True`, the method returns a NumPy.ma.MaskedArray with the masked pixels represented as ma.masked. When masked=`False` (default), a standard NumPy array is returned, and NoData values are included as-is.
- Returns:
A 2D NumPy array of shape (num_rows, num_columns) containing the pixel values for the specified band.
- Return type:
array
np_values
- geoanalytics.sql.Raster.np_values(self, masked=False)
Returns a 3D NumPy array of shape (num_bands, num_rows, num_columns) containing the pixel values for all bands.
- Parameters:
masked (boolean, optional) – Controls whether the returned NumPy array includes masking for invalid or NoData pixels. When masked=`True`, the method returns a NumPy.ma.MaskedArray with the masked pixels represented as ma.masked. When masked=`False` (default), a standard NumPy array is returned, and NoData values are included as-is.
- Returns:
A 3D NumPy array of shape (num_rows, num_columns) containing the pixel values for the specified band.
- Return type:
array
np_band_mask
- geoanalytics.sql.Raster.np_band_mask(self, band)
Returns a 2D NumPy array of shape (num_rows, num_columns) containing the mask for the specified band.
- Parameters:
band (int) – The band number (1-based index) to get the values for.
- Returns:
A 2D NumPy array of shape (num_rows, num_columns) containing the mask for the specified band. True corresponds to invalid (masked) and False to valid (unmasked) pixels.
- Return type:
array
np_mask
- geoanalytics.sql.Raster.np_mask(self)
Returns a 3D NumPy array of shape (num_bands, num_rows, num_columns) containing the mask for each band.
- Returns:
A 3D NumPy array of shape (num_bands, num_rows, num_columns) containing the mask for each band. True corresponds to invalid (masked) and False to valid (unmasked) pixels.
- Return type:
array
create
- geoanalytics.sql.Raster.create(data, extent=None, sr=None)
Creates a new Raster object.
- Parameters:
data (array) – The data to create the raster from.
extent (BoundingBox, optional) – The extent of the new raster.
sr (int, str, optional) – The spatial reference in which the raster will be created.
- Returns:
A Raster object
- Return type:
Raster