sedona.spark.raster package
Submodules
sedona.spark.raster.awt_raster module
- class sedona.spark.raster.awt_raster.AWTRaster(min_x, min_y, width, height, sample_model: SampleModel, data_buffer: DataBuffer)[source]
Bases:
object
Raster data structure of Java AWT Raster used by GeoTools GridCoverage2D.
- __init__(min_x, min_y, width, height, sample_model: SampleModel, data_buffer: DataBuffer)[source]
- data_buffer: DataBuffer
- sample_model: SampleModel
sedona.spark.raster.data_buffer module
sedona.spark.raster.meta module
- class sedona.spark.raster.meta.AffineTransform(scale_x, skew_y, skew_x, scale_y, ip_x, ip_y, pixel_anchor: PixelAnchor)[source]
Bases:
object
- __init__(scale_x, skew_y, skew_x, scale_y, ip_x, ip_y, pixel_anchor: PixelAnchor)[source]
- pixel_anchor: PixelAnchor
- with_anchor(pixel_anchor: PixelAnchor)[source]
- class sedona.spark.raster.meta.PixelAnchor(value)[source]
Bases:
Enum
Anchor of the pixel cell. GeoTools anchors the coordinates at the center of pixels, while GDAL anchors the coordinates at the upper-left corner of the pixels. This difference requires us to convert the affine transformation between these conventions.
- CENTER = 1
- UPPER_LEFT = 2
sedona.spark.raster.raster_serde module
sedona.spark.raster.sample_model module
- class sedona.spark.raster.sample_model.ComponentSampleModel(data_type, width, height, pixel_stride, scanline_stride, bank_indices, band_offsets)[source]
Bases:
SampleModel
- __init__(data_type, width, height, pixel_stride, scanline_stride, bank_indices, band_offsets)[source]
- as_numpy(data_buffer: DataBuffer) ndarray [source]
- class sedona.spark.raster.sample_model.MultiPixelPackedSampleModel(data_type, width, height, num_bits, scanline_stride, data_bit_offset)[source]
Bases:
SampleModel
- as_numpy(data_buffer: DataBuffer) ndarray [source]
- class sedona.spark.raster.sample_model.PixelInterleavedSampleModel(data_type, width, height, pixel_stride, scanline_stride, band_offsets)[source]
Bases:
SampleModel
- as_numpy(data_buffer: DataBuffer) ndarray [source]
- class sedona.spark.raster.sample_model.SampleModel(sample_model_type, data_type, width, height)[source]
Bases:
ABC
The SampleModel class and its subclasses are defined according to the data structure of SampleModel class in Java AWT.
- TYPE_BANDED = 1
- TYPE_COMPONENT = 6
- TYPE_COMPONENT_JAI = 5
- TYPE_MULTI_PIXEL_PACKED = 4
- TYPE_PIXEL_INTERLEAVED = 2
- TYPE_SINGLE_PIXEL_PACKED = 3
- abstractmethod as_numpy(data_buffer: DataBuffer) ndarray [source]
- class sedona.spark.raster.sample_model.SinglePixelPackedSampleModel(data_type, width, height, scanline_stride, bit_masks)[source]
Bases:
SampleModel
- as_numpy(data_buffer: DataBuffer) ndarray [source]