Skip to main content

Crate geo_core

Crate geo_core 

Source
Expand description

§geo-core

Format-agnostic geospatial domain types, geometry helpers, and transforms for video-analysis.

This crate owns stable internal concepts such as coordinates, bounding boxes, geometry, features, collections, and geometry simplification. It intentionally does not depend on GeoJSON or expose wire-format crate types.

§Install

[dependencies]
geo-core = { package = "moritzbrantner-geo-core", version = "0.1.0" }
use geo_core::{Coordinate, Geometry};

Modules§

surface
Library-owned runtime surface for geo-core.

Structs§

BBox
Data type for a 2D bounding box.
Coordinate
Data type for a 2D geographic coordinate.
GeoFeature
GeoJSON-compatible feature data.
GeoFeatureCollection
GeoJSON-compatible feature collection data.

Enums§

Geometry
GeoJSON-shaped geometry data.

Functions§

assemble_multipolygon
Assembles polygon or multipolygon geometry from outer and inner ring segments.
geometry_intersects_bbox
Returns true when a geometry intersects a bbox.
is_valid_closed_ring
Returns true when a ring has at least four positions and matching first/last points.
line_string
Creates linestring geometry from coordinates.
map_feature_coordinates
Applies a coordinate transform to every coordinate in a feature.
map_geometry_coordinates
Applies a coordinate transform to every coordinate in a geometry.
normalize_ring_orientation
Reverses a ring when needed to match the requested orientation.
point
Creates point geometry.
point_in_ring
Returns true when a point lies inside a closed ring.
polygon_or_multipolygon
Creates polygon or multipolygon geometry from polygon rings.
ring_area
Returns signed planar area for a closed ring.
simplify_geometry
Simplifies lines and rings in a geometry using Douglas-Peucker simplification.
simplify_line
Simplifies an open line using Douglas-Peucker simplification.
simplify_ring
Simplifies a closed ring and preserves ring closure.
stitch_rings
Stitches line segments into closed rings.
translate_geometry
Translates every coordinate in a geometry by a longitude/x and latitude/y delta.

Type Aliases§

Position
Two-dimensional coordinate position in [longitude, latitude] order.
Properties
JSON object used for feature properties.