Skip to main content

Module geometry_ops

Module geometry_ops 

Source
Expand description

§Geometry operations – spatial computations on geographic geometries

Provides core spatial analysis functions that operate on the engine’s Geometry / GeoCoord types:

All distance/area calculations use the Haversine formula on the WGS-84 sphere (radius 6,378,137 m) for a good balance of speed and accuracy.

Functions§

bearing
Initial bearing (forward azimuth) from a to b in degrees (0–360).
geometry_bbox
Compute the geographic bounding box of a geometry.
geometry_centroid
Centroid of a geometry.
initial_bearing
Alias for bearing – initial (forward) azimuth in degrees.
interpolate_great_circle
Interpolate a point along the great-circle path between from and to.
linestring_length
Total length of a linestring in meters (Haversine).
polygon_area
Area of a polygon (exterior minus holes) in square meters.
ring_area
Signed area of a ring on a sphere using the Haversine-based excess formula.