raster¶
Band¶
-
class
espatools.raster.Band(**kwargs)[source]¶ Bases:
properties.base.base.HasPropertiesContains raster metadata and data for a single band.
Required Properties:
- data_type (
String): Band data type, a unicode string - file_name (
String): Original file name, a unicode string - fill_value (
Integer): fill value, an integer, Default: -9999 - long_name (
String): Long display name, a unicode string - name (
String): Name of the band, a unicode string - nlines (
Integer): number of lines, an integer - nsamps (
Integer): number of samples, an integer - pixel_size (
PixelSize): The pixel size, an instance of PixelSize - product (
String): Data product, a unicode string - short_name (
String): Short name, a unicode string
Optional Properties:
- add_offset (
Float): Add offset, a float - app_version (
String): app version, a unicode string - bitmap_description (
Dictionary): band bitmap description (not always present), a dictionary (keys: a unicode string; values: a unicode string) - category (
String): Band category, a unicode string - data_units (
String): Data units, a unicode string - percent_coverage (
Float): percent coverage, a float - production_date (
String): production date, a unicode string - qa_description (
String): QA description, a unicode string - radiance (
Lum): The radiance, an instance of Lum - reflectance (
Lum): The reflectance, an instance of Lum - resample_method (
String): resample method, a unicode string - saturate_value (
Integer): Saturate value, an integer - scale_factor (
Float): Scaling factor, a float - source (
String): Band source, a unicode string - thermal_const (
ThermalConst): The thermal const, an instance of ThermalConst - valid_range (
ValidRange): The valid data range, an instance of ValidRange
-
bitmap_description¶ bitmap_description (
Dictionary) – band bitmap description (not always present), a dictionary (keys – a unicode string; values: a unicode string)
-
data= None¶
-
thermal_const¶ thermal_const (
ThermalConst) – The thermal const, an instance of ThermalConst
-
valid_range¶ valid_range (
ValidRange) – The valid data range, an instance of ValidRange
- data_type (
ColorSchemes¶
-
class
espatools.raster.ColorSchemes[source]¶ Bases:
objectA class to hold various RGB color schemes fo reference. These color schemes are defined on the USGS website.
-
LOOKUP_FALSE_COLOR_A= {'LANDSAT_4': ['sr_band5', 'sr_band4', 'sr_band3'], 'LANDSAT_5': ['sr_band5', 'sr_band4', 'sr_band3'], 'LANDSAT_7': ['sr_band5', 'sr_band4', 'sr_band3'], 'LANDSAT_8': ['sr_band6', 'sr_band5', 'sr_band4']}¶
-
LOOKUP_FALSE_COLOR_B= {'LANDSAT_4': ['sr_band7', 'sr_band5', 'sr_band3'], 'LANDSAT_5': ['sr_band7', 'sr_band5', 'sr_band3'], 'LANDSAT_7': ['sr_band7', 'sr_band5', 'sr_band3'], 'LANDSAT_8': ['sr_band7', 'sr_band6', 'sr_band4']}¶
-
LOOKUP_FALSE_COLOR_C= {'LANDSAT_4': ['sr_band7', 'sr_band4', 'sr_band2'], 'LANDSAT_5': ['sr_band7', 'sr_band4', 'sr_band2'], 'LANDSAT_7': ['sr_band7', 'sr_band4', 'sr_band2'], 'LANDSAT_8': ['sr_band7', 'sr_band5', 'sr_band3']}¶
-
LOOKUP_INFRARED= {'LANDSAT_4': ['sr_band4', 'sr_band3', 'sr_band2'], 'LANDSAT_5': ['sr_band4', 'sr_band3', 'sr_band2'], 'LANDSAT_7': ['sr_band4', 'sr_band3', 'sr_band2'], 'LANDSAT_8': ['sr_band5', 'sr_band4', 'sr_band3']}¶
-
LOOKUP_TRUE_COLOR= {'LANDSAT_4': ['sr_band3', 'sr_band2', 'sr_band1'], 'LANDSAT_5': ['sr_band3', 'sr_band2', 'sr_band1'], 'LANDSAT_7': ['sr_band3', 'sr_band2', 'sr_band1'], 'LANDSAT_8': ['sr_band4', 'sr_band3', 'sr_band2']}¶
-
RasterSet¶
-
class
espatools.raster.RasterSet(**kwargs)[source]¶ Bases:
properties.base.base.HasProperties- The main class to hold a set of raster data. This contains all of the bands
- for a given set of rasters. This is generated by the
RasterSetReader.
Required Properties:
- bands (
Dictionary): A dictionary of bands for the swath, a dictionary (keys: a unicode string; values: an instance of Band) - global_metadata (
RasterMetaData): Raster metadata, an instance of RasterMetaData - nlines (
Integer): The number of lines, an integer - nsamps (
Integer): The number of samples, an integer - pixel_size (
PixelSize): The pixel size, an instance of PixelSize
Optional Properties:
- version (
String): version, a unicode string
-
RGB_SCHEMES= {'false_a': {'LANDSAT_8': ['sr_band6', 'sr_band5', 'sr_band4'], 'LANDSAT_5': ['sr_band5', 'sr_band4', 'sr_band3'], 'LANDSAT_4': ['sr_band5', 'sr_band4', 'sr_band3'], 'LANDSAT_7': ['sr_band5', 'sr_band4', 'sr_band3']}, 'false_b': {'LANDSAT_8': ['sr_band7', 'sr_band6', 'sr_band4'], 'LANDSAT_5': ['sr_band7', 'sr_band5', 'sr_band3'], 'LANDSAT_4': ['sr_band7', 'sr_band5', 'sr_band3'], 'LANDSAT_7': ['sr_band7', 'sr_band5', 'sr_band3']}, 'false_c': {'LANDSAT_8': ['sr_band7', 'sr_band5', 'sr_band3'], 'LANDSAT_5': ['sr_band7', 'sr_band4', 'sr_band2'], 'LANDSAT_4': ['sr_band7', 'sr_band4', 'sr_band2'], 'LANDSAT_7': ['sr_band7', 'sr_band4', 'sr_band2']}, 'infrared': {'LANDSAT_8': ['sr_band5', 'sr_band4', 'sr_band3'], 'LANDSAT_5': ['sr_band4', 'sr_band3', 'sr_band2'], 'LANDSAT_4': ['sr_band4', 'sr_band3', 'sr_band2'], 'LANDSAT_7': ['sr_band4', 'sr_band3', 'sr_band2']}, 'true': {'LANDSAT_8': ['sr_band4', 'sr_band3', 'sr_band2'], 'LANDSAT_5': ['sr_band3', 'sr_band2', 'sr_band1'], 'LANDSAT_4': ['sr_band3', 'sr_band2', 'sr_band1'], 'LANDSAT_7': ['sr_band3', 'sr_band2', 'sr_band1']}}¶
-
bands¶ bands (
Dictionary) – A dictionary of bands for the swath, a dictionary (keys – a unicode string; values: an instance of Band)
-
get_rgb(scheme='infrared', names=None)[source]¶ Get an RGB color scheme based on predefined presets or specify your own band names to use. A given set of names always overrides a scheme.
Note
Available schemes are defined in
RGB_SCHEMESand include:trueinfraredfalse_afalse_bfalse_c
-
global_metadata¶ global_metadata (
RasterMetaData) – Raster metadata, an instance of RasterMetaData