odc.geo.geom.Geometry

class odc.geo.geom.Geometry(geom, crs=None)[source]

2D Geometry with CRS.

This is a wrapper around shapely.geometry.BaseGeometry that adds projection information.

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]

Methods

__init__(geom[, crs])

buffer(distance[, resolution])

rtype

Geometry

clone()

rtype

Geometry

contains(other)

rtype

bool

crosses(other)

rtype

bool

difference(other)

rtype

Geometry

disjoint(other)

rtype

bool

geojson([properties, simplify, resolution, ...])

Render geometry to GeoJSON.

interpolate(distance)

Returns a point distance units along the line.

intersection(other)

rtype

Geometry

intersects(other)

rtype

bool

overlaps(other)

rtype

bool

segmented(resolution)

Increase resolution of the geometry.

simplify(tolerance[, preserve_topology])

rtype

Geometry

split(splitter)

rtype

Iterable[Geometry]

svg(*args, **kw)

rtype

str

svg_path([ndecimal])

Produce SVG path text.

symmetric_difference(other)

rtype

Geometry

to_crs(crs[, resolution, wrapdateline])

Convert geometry to a different Coordinate Reference System.

touches(other)

rtype

bool

transform(func)

Map through arbitrary transform.

union(other)

rtype

Geometry

within(other)

rtype

bool

Attributes

area

rtype

float

boundary

rtype

Geometry

boundingbox

rtype

BoundingBox

centroid

rtype

Geometry

convex_hull

rtype

Geometry

coords

rtype

List[Tuple[float, float]]

envelope

rtype

Geometry

exterior

rtype

Geometry

geoms

rtype

Iterator[Geometry]

interiors

rtype

List[Geometry]

is_empty

rtype

bool

is_multi

True for multi-geometry types.

is_ring

rtype

bool

is_valid

rtype

bool

json

length

rtype

float

points

rtype

List[Tuple[float, float]]

type

rtype

str

wkt

rtype

str

xy

rtype

Tuple[array, array]