rasterio.enums module

Enumerations.

class rasterio.enums.ColorInterp

Bases: enum.IntEnum

Raster band color interpretation.

Cb = 15
Cr = 16
Y = 14
alpha = 6
black = 13
blue = 5
cyan = 10
gray = 1
green = 4
grey = 1
hue = 7
lightness = 9
magenta = 11
palette = 2
red = 3
saturation = 8
undefined = 0
yellow = 12
class rasterio.enums.Compression

Bases: enum.Enum

Available compression algorithms.

ccittfax3 = 'CCITTFAX3'
ccittfax4 = 'CCITTFAX4'
ccittrle = 'CCITTRLE'
deflate = 'DEFLATE'
jpeg = 'JPEG'
jpeg2000 = 'JPEG2000'
lerc = 'LERC'
lzma = 'LZMA'
lzw = 'LZW'
none = 'NONE'
packbits = 'PACKBITS'
webp = 'WEBP'
zstd = 'ZSTD'
class rasterio.enums.Interleaving

Bases: enum.Enum

An enumeration.

band = 'BAND'
line = 'LINE'
pixel = 'PIXEL'
class rasterio.enums.MaskFlags

Bases: enum.IntEnum

An enumeration.

all_valid = 1
alpha = 4
nodata = 8
per_dataset = 2
class rasterio.enums.MergeAlg

Bases: enum.Enum

Available rasterization algorithms

add = 'ADD'
replace = 'REPLACE'
class rasterio.enums.PhotometricInterp

Bases: enum.Enum

An enumeration.

black = 'MINISBLACK'
cielab = 'CIELAB'
cmyk = 'CMYK'
icclab = 'ICCLAB'
itulab = 'ITULAB'
rgb = 'RGB'
white = 'MINISWHITE'
ycbcr = 'YCbCr'
class rasterio.enums.Resampling

Bases: enum.IntEnum

Available warp resampling algorithms.

The first 8, ‘nearest’, ‘bilinear’, ‘cubic’, ‘cubic_spline’, ‘lanczos’, ‘average’, ‘mode’, and ‘gauss’, are available for making dataset overviews.

‘max’, ‘min’, ‘med’, ‘q1’, ‘q3’ are only supported in GDAL >= 2.0.0.

‘nearest’, ‘bilinear’, ‘cubic’, ‘cubic_spline’, ‘lanczos’, ‘average’, ‘mode’ are always available (GDAL >= 1.10).

Note: ‘gauss’ is not available to the functions in rio.warp.

average = 5
bilinear = 1
cubic = 2
cubic_spline = 3
gauss = 7
lanczos = 4
max = 8
med = 10
min = 9
mode = 6
nearest = 0
q1 = 11
q3 = 12