Expand description
GeoJSON-compatible geometry types.
Supports Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection. Stored as GeoJSON for JSON compatibility. Includes distance (Haversine), area, bearing, and centroid calculations.
Structs§
- Coord
- A 2D coordinate (longitude, latitude) following GeoJSON convention. Note: GeoJSON uses [lng, lat] order, NOT [lat, lng].
Enums§
- Geometry
- GeoJSON-compatible geometry types.
Functions§
- haversine_
bearing - Haversine bearing from point A to point B in degrees (0-360).
- haversine_
distance - Haversine distance between two points in meters.
- point_
in_ polygon - Check if a point is inside a polygon (ray casting algorithm).
- polygon_
area - Approximate area of a polygon on Earth’s surface in square meters.