GeometryResult

class geodetic_engine.geodesy.geometry.GeometryResult[source]

Bases: object

A transformed geometry, its provenance, and its encodings.

geometry

The geometry in the target CRS, xy, at full precision; None when None was transformed.

source_crs

The CRS it was transformed from.

target_crs

The CRS it is in.

transformation

The provenance: CRSs, operation, grids, epoch and pipeline, as metadata_json_dict() gives it, written out each time it is read.

axis_order

The axis order the encodings below are written in.

wkt(decimals=None, **options)[source]

WKT, as write_geometry() writes it.

Return type:

str | None

wkb(decimals=None, **options)[source]

ISO WKB, as write_geometry() writes it.

Return type:

bytes | None

wkb_hex(decimals=None, **options)[source]

ISO WKB as upper-case hex, as write_geometry() writes it.

Return type:

str | None

ewkt(decimals=None, **options)[source]

EWKT with the target CRS’s SRID, as write_geometry() writes it.

Return type:

str | None

ewkb(decimals=None, **options)[source]

Extended WKB with the target CRS’s SRID.

Return type:

bytes | None

ewkb_hex(decimals=None, **options)[source]

Extended WKB with the target CRS’s SRID, as hex, as PostGIS prints it.

Return type:

str | None

geojson(decimals=None, **options)[source]

A GeoJSON geometry object.

Return type:

Any

esrijson(decimals=None, **options)[source]

An Esri JSON geometry with the target CRS as its spatialReference.

Return type:

Any

__init__(geometry, source_crs, target_crs, _provenance, axis_order='xy')