Input/Output¶
ela.io module¶
-
class
ela.io.GeotiffExporter(crs, transform)¶ Bases:
objectHelper class to save matrices into georeferenced, GeoTiff images
-
crs¶ The coordinate reference system.
- Type
str, dict, or CRS
-
transform¶ Affine transformation mapping the pixel space to geographic space.
- Type
Affine instance
-
export_geotiff(matrix, full_filename, classes_cmap)¶ Save a matrix of numeric classes to an image, using a color to convert numeric values to colors
- Parameters
matrix (ndarray) – numpy array, 2 dims
full_filename (str) – Full file name to save the GeoTiff image to.
classes_cmap (dict) – color map with keys as zero based numeric integers and values RGBA tuples.
-
export_rgb_geotiff(matrix, full_filename, classes_cmap)¶ Save a matrix of numeric classes to an image, using a color to convert numeric values to colors
- Parameters
matrix (ndarray) – numpy array, 2 dims
full_filename (str) – Full file name to save the GeoTiff image to.
classes_cmap (dict) – color map with keys as zero based numeric integers and values RGBA tuples.
-