datacube.utils.geometry.Geometry

class datacube.utils.geometry.Geometry(geom, crs=None)[source]

2D Geometry with CRS

Instantiate with a GeoJSON structure

If 3D coordinates are supplied, they are converted to 2D by dropping the Z points.

__init__(geom, crs=None)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(geom[, crs])

Initialize self.

buffer(distance[, resolution])

rtype

Geometry

clone()

rtype

Geometry

contains(other)

rtype

bool

crosses(other)

rtype

bool

difference(other)

rtype

Geometry

disjoint(other)

rtype

bool

interpolate(distance)

Returns a point distance units along the line.

intersection(other)

rtype

Geometry

intersects(other)

rtype

bool

overlaps(other)

rtype

bool

segmented(resolution)

Possibly add more points to the geometry so that no edge is longer than resolution.

simplify(tolerance[, preserve_topology])

rtype

Geometry

split(splitter)

rtype

Iterable[Geometry]

svg()

rtype

str

symmetric_difference(other)

rtype

Geometry

to_crs(crs[, resolution, wrapdateline])

Convert geometry to a different Coordinate Reference System

touches(other)

rtype

bool

transform(func)

Applies func to all coordinates of Geometry and returns a new Geometry of the same type and in the same projection from the transformed coordinates.

union(other)

rtype

Geometry

within(other)

rtype

bool

Attributes

area

float

boundary

Geometry

boundingbox

BoundingBox

centroid

Geometry

convex_hull

Geometry

coords

List[Tuple[float, float]]

envelope

Geometry

exterior

Geometry

interiors

List[Geometry]

is_empty

bool

is_valid

bool

json

length

float

points

List[Tuple[float, float]]

type

str

wkt

str

xy

Tuple[array, array]