gdalmetadata — GDAL File Metadata

The gdalmetadata file contains a generic metadata parser for formats that GDAL can read

New in version 0.1.0.

class amg.gdalmetadata.GDALMetadata(datafile)[source]

This class wraps GDAL accessible data files and makes homogenizes access to metadata elements.

Parameters

datafile (str) – The path to the datafile to read

data

THe GDAL object returned by a gdal.Open call

Type

obj

productid

The name of the product without file extension

Type

str

srs

The spatial reference objected through which spatial reference metadata are accessible

Type

obj

crs

A pyproj projection object

Type

obj

projstr

A proj4 projection string

Type

str

projjson

The projection string in JSON format

Type

dict

wkt2

The projection string in wkt2 format

Type

str

epsg

THe inferred EPSG code for the data. This is often incorrect for planetary data.

Type

int

extent_x

The dataset size in the x direction

Type

int

extent_y

THe dataset size in the y direction

Type

int

extent_z

THe number of bands or dataset size in the z direction

Type

int

geotransform

The six element affine geotransformation

Type

list

resolution_x

The pixel resolution in the x direction

Type

float

resolution_y

The pixel resolution in the y direction

Type

float

gsd

The reported ground sample distance

Type

float

bands

of band objects that contain band dependent metadata, e.g., min/max data values

Type

list

longitude_origin

The projection lon origin

Type

float

inverse_flattening

The ellipsoid inverse flattening.

Type

float

semi_major_axis

The semi-major axis of the body in GDAL reported units.

Type

float

bbox

Four element bounding box coordinates

Type

list