Collection

class aeronet.dataset.raster.BandCollection(bands)[source]

Bases: aeronet.dataset.raster.geoobject.GeoObject

__init__(bands)[source]
Parameters:bands – list of Band or list of file paths
append(other)[source]

Add band to collection

bounds

The lower left and upper right bounds of the dataset in the units of its coordinate reference system.

Returns:(lower left x, lower left y, upper right x, upper right y)
Return type:Tuple (float, float, float, float)
count

(int) number of channels/bands.

Type:Returns
crs

Geographic coordinate reference system of the object

Returns: rasterio.CRS object

generate_samples(height, width)[source]
height

Height of the raster data object

Returns:(int) image height in pixels.
is_valid

Check if all bands have the same resolution, shape and coordinate system

nodata

The value that should be interpreted as ‘No data’. May be None or a value within dtype range

numpy()[source]
ordered(*names)[source]
Parameters:*names – order of names
Returns:reordered BandCollectionSample
reproject(dst_crs, directory=None, interpolation='nearest')[source]
reproject_to_utm(directory=None, interpolation='nearest')[source]

Alias of reproject method with automatic utm zone determining

res

Resolution or ground sampling distance along X and Y axes.

Returns:(x_resolution, y_resolution)
Return type:Tuple [int, int]
resample(dst_res, directory=None, interpolation='nearest')[source]
sample(y, x, height, width)[source]

Sample memory object from BandCollection :param x: int, top left corner X offset in pixels :param y: int, top left corner Y offset in pixels :param width: int, width of samples in pixels :param height: int, height of samples in pixels

Returns:BandCollectionSample instance
shape

(count, height, width); or (height, width)

Type:A tuple of int
transform

The BandCollection’s georeferencing transformation matrix

This transform maps pixel row/column coordinates to coordinates in the dataset’s coordinate reference system. It is the same as the transform of the Bands that consist the Collection (which must be same)

width

Width of the raster data object

Returns:(int) image width in pixels.
class aeronet.dataset.raster.BandCollectionSample(samples)[source]

Bases: aeronet.dataset.raster.geoobject.GeoObject

append(obj)[source]

Add sample to collection

count

Number of bands (layers) in the object

crs

Geographic coordinate reference system of the object

Returns: rasterio.CRS object

generate_samples(height, width)[source]
height

Height of the raster data object

Returns:(int) image height in pixels.
is_valid

Check if all bands have the same resolution, shape and coordinate system

nodata

The value that should be interpreted as ‘No data’. May be None or a value within dtype range

numpy()[source]
ordered(*names)[source]
Parameters:*names – order of names
Returns:reordered BandCollectionSample
reproject(dst_crs, interpolation='nearest')[source]
reproject_to_utm(interpolation='nearest')[source]

Alias of reproject method with automatic utm zone determining

res

Resolution or ground sampling distance along X and Y axes.

Returns:(x_resolution, y_resolution)
Return type:Tuple [int, int]
resample(dst_res=None, dst_shape=None, interpolation='nearest')[source]
sample(y, x, height, width)[source]
save(directory, extension='.tif', **kwargs)[source]
shape

(count, height, width); or (height, width)

Type:A tuple of int
transform

The BandSampleCollection’s georeferencing transformation matrix

This transform maps pixel row/column coordinates to coordinates in the dataset’s coordinate reference system. It is the same as the transform of the Samples that consist the Collection (which must be same)

width

Width of the raster data object

Returns:(int) image width in pixels.