NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #2080 most downloaded on crates.io
Geospatial primitives and algorithms
Last release 5 months ago
20 Apr 2026
Release timing varies
gaps range from 2 weeks to 8 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
92 releases · first in 2015
prepare for 0.33.1 release
prepare for 0.33.1 release
prepare for geo v0.33.0 release
prepare for geo v0.33.0 release
PreparedGeometry to cache R-tree structures for interior/exterior containment checks, improving validation speed for polygons with many holes.
i_overlay to 4.4 and enable OGC-compliant polygon extraction for all boolean operations, fixing cases where holes sharing vertices produced invalid geometry.
CoordinatePosition for LineString to handle dimensionally collapsed input e.g. LINESTRING(0 0) is treated like POINT(0 0).
CoordinatePosition for Triangle to correctly return CoordPos::OnBoundary for coordinate within vertical segment.TriangulateDelaunay trait to support Point collections in addition to existing geometries
LineStrings to consider the last vertex (avoids incorrect LineString-to-LineString distances for separable geometries).
float_next_after dependency to 2.0.0earcutr dependency to 0.5.0Triangles returned by earcut_triangles are now oriented CCW.earcut_triangles_raw now omits the redundant "closing" coordinate from vertices.
It wasn't referenced by the triangle_indices cut by earcutr, but you may notice a different triangulation for a given input.StitchTriangulation. Instead convert your triangles to Polygon and use unary_union.
earcutr crate with the faster earcut crate.
TriangulateEarcut::earcut_triangles API hasn't changed, but may return a different triangulation.TriangulateEarcut::earcut_triangles_raw API now groups coordinates [[x0, y0],[x1 y1]]], previously it was flattened: [x0, y1, x1, y1]triangulate_delaunayMakeValid trait for (Multi)Polygon repair using the prepair algorithmrand dependency to 0.10.0MonotoneChain-backed geometry types
LineString, MultiLineString, Polygon, MultiPolygon which are backed by Monotone ChainsSubstring / SubstringableLine traits for extracting the section of a Line or LineString between two distance- or ratio-along-line bounds. Generic over any metric space implementing InterpolatePoint + Length (Euclidean, Haversine, Geodesic, Rhumb).One column per quarter.
prepare for geo-0.32.0 release
prepare for geo-0.32.0 release
PreparedGeometry into a new indexed module intended to provide index-backed geometries. relate::PreparedGeometry has been deprecated.distance_within method with default impl for any geometry that implements Distance, with similar semantics to the PostGIS ST_DWithin functionContainsProperly trait to relate and as a standalone operation
ContainsProperly is faster for Polygon and MultiPolygon when inputs are smaller than about 650 vertices, otherwise use Relate.is_contains_properlyminimum_rotated_rect is about 1.3-2x faster, but might return slightly different results.
use-proj, use-serde to simply proj and serde (removing the use- prefix)
and deprecated the old spelling.
ConcaveHull algorithm with implementation of mapbox/concaveman.
concave_hull method now has no concavity parameter.concave_hull_with_options method which requires ConcaveHullOptions as a parameter with concavity and length_threshold options.Covers trait to relate and as a standalone operation
Rect, Triangle, Line, Point, CoordPoint and MultiPointAdded: Geometry buffering to "grow" or "shrink" a geometry by creating a buffer whose boundary is the specified offset from the input.
BoolOpsNum must now implement GeoFloat, not just GeoNum. In practice, this shouldn't break for any concrete types (like f32, f64).
Simplify, SimplifyVw, and SimplifyVwIdx traits no longer require a borrowed epsilon parameter as these are Copy typesFillRule, LineCap, and LineJoin options, which are re-exported from i_overlay,
are now compatible with 4.0
https://github.com/georust/geo/pull/1405outlier_detection when calculating LRD and LOFBearing and Destination trait implementations for EuclideanFillRule-configurable boolean operations to BooleanOps trait
algorithm::simplify::compute_rdp with one pointold_sweep moduleIntersections with new implementation of the Bentley-Ottmann sweep-line algorithm to efficiently find sparse intersections between groups of lines.
panic's when given pathological inputIntersections now computes intersections lazilyCrosses trait used by Intersections now returns a Line, not a LineOrPoint.Crosses trait no longer needs to implement Clone
is_convex to correctly handle duplicate pointsgraham_hull to correctly handle duplicate points when on_hull is set to true
graham_hull now always returns a boundary with no duplicated pointsIntersects<LineString> into specific traits
Rect, Triangle, MultiPolygon, Polygon intersects LineStringContains implementation for all remaining geometries.Deprecate LineInterpolatePoint which was implicitly Euclidean only.
geo MSRV to 1.81FrechetDistance is now defined on the metric space, rather than a method on a Linestring.
// before (implicitly Euclidean)
line_string_1.frechet_distance(&line_string_2);
// after
Euclidean.frechet_distance(&line_string_1, &line_string_2);
Haversine.frechet_distance(&line_string_1, &line_string_2);
Densify and Length are now defined on the metric space, rather than a generic method on the geometry.
// before
line_string.length::<Euclidean>()
line_string.densify::<Euclidean>()
line_string.densify::<Haversine>()
// after
Euclidean.length(&line_string)
Euclidean.densify(&line_string)
Haversine.densify(&line_string)
HaversineMeasure for doing calculations on a custom sphere. Use the Haversine instance for the default Earth radius.
// before
Haversine::distance(point1, point2)
// after
Haversine.distance(point1, point2)
// For custom earth (or non-earth!) radius
HaversineMeasure::new(3_389_500.0).distance(point1, point2)
GeodesicMeasure for doing calculations on a custom geoid. Use the Geodesic instance for the default Earth geoid.
// before
Geodesic::distance(point1, point2)
// after
Geodesic.distance(point1, point2)
// For custom Earth (or non-earth!) geoids:
let nad83_flattening = 1. / 298.257222101;
GeodesicMeasure::new(6_378_137, nad83_flattening).distance(point1, point2)
InterpolateLine to interpolate a point along a line using Euclidean, Haversine, Geodesic, Rhumb metric spaces.LineInterpolatePoint which was implicitly Euclidean only.SegmentizeHaversine which caused segments to be unequal lengths
triangulate_spade and TriangulateSpade to triangulate_delaunay and TriangulateDelaunayInteriorPointRemoveRepeatedPoints trait (num_traits::FromPrimitive isn't required)
Validation trait to check validity of Geometry.
// use in control flow
if polygon.is_valid() { foo() }
// raise an error if invalid
polygon.check_validation()?;
// get all validation errors
let errors = polygon.validation_errors();
// error implements Display for human readable explanations
println!("{}", errors[0]);
i_overlay, which is used by the BoolOps trait.
Relate for PreparedGeometry - this did require
changing some trait constraints, but they are unlikely to affect you in
practice unless you have your own Relate implementation.
Fix crash in BoolOps by updating i_overlay to 1.9.0.
BoolOps by updating i_overlay to 1.9.0.
Pin i_overlay to < 1.8.0 to work around recursion bug.
i_overlay to < 1.8.0 to work around recursion bug.
Multi* geometries
Allow configuring of the i_overlay Rayon transitive dependency with a new Cargo multithreading flag.
i_overlay Rayon transitive dependency with a new Cargo multithreading flag.
BREAKING: Remove deprecated Bearing trait
Implement getter methods on AffineTransform to access internal elements.
Fix issue in Debug impl for AffineTransform where yoff is shown instead of xoff
Polygon in Rect performance improvements.
Fix AffineTransform::compose ordering to be conventional - such that the argument is applied after self.
Add PreparedGeometry to speed up repeated Relate operations.
Implement Frechet distance using linear algorithm to avoid fatal runtime error: stack overflow and improve overall performances.
Bump geo MSRV to 1.74 and update CI
Add StitchTriangles trait which implements a new kind of combining algorithm for Triangles
BREAKING: Remove deprecated Bearing trait
Unify various line measurements under new line_measures::{Bearing, Distance, Destination, InterpolatePoint} traits
Before:
use geo::{GeodesicBearing, HaversineBearing, GeodesicDistance, HaversineDistance, EuclideanDistance};
p1.geodesic_bearing(p2)
p1.haversine_bearing(p2)
p1.geodesic_distance(p2)
p1.haversine_distance(p2)
p1.euclidean_distance(p2)
After:
use geo::{Geodesic, Haversine, Euclidean, Bearing, Distance};
Geodesic::bearing(p1, p2)
Haversine::bearing(p1, p2)
Geodesic::distance(p1, p2)
Haversine::distance(p1, p2)
Euclidean::distance(p1, p2)
Deprecated legacy line measure traits in favor of those added in the previous changelog entry:
GeodesicBearing, GeodesicDistance, GeodesicDestination, GeodesicIntermediateRhumbBearing, RhumbDistance, RhumbDestination, RhumbIntermediateHaversineBearing, HaversineDistance, HaversineDestination, HaversineIntermediateEuclideanDistanceDeprecated HaversineLength, EuclideanLength, RhumbLength, GeodesicLength in favor of new generic Length trait.
// Before
line_string.euclidean_length();
line_string.haversine_length();
// After
line_string.length::<Euclidean>();
line_string.length::<Haversine>();
Deprecated DensifyHaversine
BREAKING: Densify::densify is no longer strictly Euclidean, and now accepts a generic line measure parameter.
// Before
line_string.densify();
line_string.densify_haversine();
// After
line_string.densify::<Euclidean>();
line_string.densify::<Haversine>();
// Additional measures are now supported
line_string.densify::<Geodesic>();
line_string.densify::<Rhumb>();
Added InterpolatePoint::point_at_distance_between for line_measures.
Change IntersectionMatrix::is_equal_topo to now consider empty geometries as equal.
Fix (LINESTRING EMPTY).contains(LINESTRING EMPTY) and (MULTIPOLYGON EMPTY).contains(MULTIPOINT EMPTY) which previously
reported true
Improve HasDimensions::dimensions to handle dimensionally collapsed and empty geometries more consistently.
A collection (like MultiPolygon) will now have EmptyDimensions when all of its elements have EmptyDimensions.
Enable i128 geometry types
BREAKING: The HasKernel trait was removed and it's functionality was merged into GeoNum. If you are using common scalars for your geometry (f32, f64,
HasKernel trait was removed and it's functionality was merged
into GeoNum. If you are using common scalars for your geometry (f32, f64,
i64, i32, i16, isize), this should have no effect on you. If you are using an
exotic scalar type, you'll need to implement GeoNum for it instead of
HasKernel. If you had functionality defined in terms of HasKernel before,
define it in terms of GeoNum instead.
total_cmp method to GeoNum. This avoids some
potential crashes when working with geometries that contain NaN points. This
shouldn't break for any common numeric types, but if you are using something
exotic you'll need to manually implement GeoNum for your numeric type.
SimplifyVwPreserve trait implementation moved from
geo_types::CoordNum to geo::GeoNum as a consequence of introducing the
GeoNum::total_cmp. This shouldn't break anything for common numeric
types, but if you are using something exotic you'll need to manually
implement GeoNum for your numeric type.LineStringSegmentizeHaversine trait as a an alternative to LineStringSegmentize for geographic coordinates.
SpadeTriangulationConfig actually configurable
CoordsIter for arrays and slices. This is useful when you'd like to use traits
implemented for CoordsIter without re-allocating (e.g., creating a MultiPoint).compose_many method to AffineOps
Triangle and Rect performance improvemnets
BooleanOps
Use CachedEnvelope in R-Trees when computing euclidean distance between polygons
CachedEnvelope in R-Trees when computing euclidean distance between polygons
inverse method to AffineTransform
Densify trait to avoid panic with empty line string.
DensifyHaversine trait to densify spherical line geometry.
LineStringSegmentize trait to split a single LineString into n LineStrings as a MultiLineString.
EuclideanDistance implementations for all remaining geometries.
HausdorffDistance algorithm trait to calculate the Hausdorff distance between any two geometries.
matches method to IntersectionMatrix for ergonomic de-9im comparisons.
CoordsIter and MinimumRotatedRect traits with GATs by removing an unneeded trait lifetime.
ToDegrees and ToRadians traits.
RhumbBearing, RhumbDestination, RhumbDistance, RhumbIntermediate, RhumbLength.
HaversineDestination
wkt! macro to define geometries at compile time.
TriangulateSpade trait which provides (un)constrained Delaunay Triangulations for all geo_types via the spade crate
len() and is_empty() to MultiPoint
Implement "Closest Point" from a Point on a Geometry using spherical geometry.
Point on a Geometry using spherical geometry. https://github.com/georust/geo/pull/958Add TriangulateEarcut algorithm trait to triangulate polygons with the earcut algorithm.
Add TriangulateEarcut algorithm trait to triangulate polygons with the earcut algorithm.
Add Vector2DOps trait to algorithms module and implemented it for Coord<T::CoordFloat>
Add a fast point-in-polygon query datastructure that pre-processes a Polygon as a set of monotone polygons. Ref. crate::algorithm::MonotonicPolygons.
BREAKING: Remove deprecated methods
CrossTrackDistance trait to calculate the distance from a point
to the nearest point on a line
map_coords_inplace use map_coords_in_placeRotatePoint use RotateTranslate#translate_inplace use Translate#translate_mutRename Bearing::bearing to HaversineBearing::haversine_bearing to clarify it uses great circle calculations.
BREAKING: Make SimplifyVw naming consistent
SimplifyVw naming consistent
Polygon implementation of the Simplify algorithm to always return Polygons with at least four coordinates.
rstar dependency to 0.10.0 and enable use-rstar_0_10 feature for `geo-types.
https://github.com/georust/geo/pull/987MinimumRotatedRect trait to calculate the MBR of geometry
https://github.com/georust/geo/pull/959GeodesicArea trait to support geodesic area and perimeter calculations from geographlib-rs
https://github.com/georust/geo/pull/988GeodesicDestination trait to support geodesic destination calculations
https://github.com/georust/geo/pull/991GeodesicBearing trait to support geodesic bearing calculations
https://github.com/georust/geo/pull/991Update to geo-types-0.7.8 which deprecated Coordinate in favor of Coord.
Coordinate in favor of Coord.
https://github.com/georust/geo/pull/924RemoveRepeatedPoints trait allowing the removal of (consecutive)
repeated points.Removed deprecated Rotate::rotate method, use Rotate::rotate_around_center or Rotate::roate_around_centroid instead.
AffineOps, Scale, and Skew traits allowing the definition and
composition of 2-D affine transforms.
Rotate and Translate traits leverage this new AffineOps
trait.RotatePoint::rotate_around_point method ontoRotate::rotate_around_point and removed RotatePoint trait.Rotate::rotate method, use
Rotate::rotate_around_center or Rotate::roate_around_centroid
instead.Translate::translate_in_place in favor of
Translate::translate_mut to line up with naming elsewhere in the crate.BooleanOps::clip to clip a 1-D geometry with a 2-D geometry.
InteriorPoint trait to calculate a representative point inside a
Geometry.
Within trait to determine if one Geometry is completely within
another.
ConvexHull implementation for all remaining geometries.
Contains implementation for all remaining geometries.
ToGeo trait. Use std::convert::TryFrom<$geometry>
instead.
Fix some floating point issues with BoolOps
BoolOps
Add densification algorithm for linear geometry components
Geometry rather than Geometry<f64> since we've added
a default trait implementation. You may still explicitly declare the numeric
type as f64, or any other implementation of CoordNum, but this should save
you some typing if you're using f64. The same change applies to Coordinates
and all the geometry variants, like Point, LineString, etc.
proj crate
geometry module which re-exports all the inner geometry variants, so you
can use geo::geometry::* to concisely include Point, LineString, etc.
Winding trait is rexported under geo::algorithm::Winding (and thus
geo::Winding and geo::prelude::Winding)
WindingOrder from geo::WindingOrder/geo::algorithms::WindingOrder.
Instead, go back to use geo::winding_order::WindingOrder - it was briefly rexported as
geo::WindingOrder and geo::algorithms::WindingOrder.
Boolean operations for Polygons and MultiPolygons: intersect, union, xor, and difference. Refer trait bool_ops::BooleanOps for more info.
Boolean operations for Polygons and MultiPolygons: intersect, union, xor,
and difference. Refer trait bool_ops::BooleanOps for more info.
POSSIBLY BREAKING: Minimum supported version of Rust (MSRV) is now 1.58
BREAKING: rstar version upgraded to 0.9.x
POSSIBLY BREAKING: GeoFloat types must now implement num_traits::Signed and num_traits::Bounded. This shouldn't
affect you if you are using a standard Geometry<f64> or Geometry<f32> or geo::GeoFloat generically.
Speed up Relate and Contains traits for large LineStrings and Polygons by using an RTree to more efficiently
inspect edges in our topology graph.
Flatten algorithm namespace. For example:
# Before
use geo::algorithm::area::Area;
use geo::algorithm::bounding_rect::BoundingRect;
# After
use geo::{Area, BoundingRect};
Speed up intersects checks by using a preliminary bbox check
BREAKING: Remove unneeded reference for *MapCoords* closure parameter.
BREAKING: Bump proj dependency to 0.26 which uses PROJ version 9.0
rename Translate::translate_inplace -> Translate::translate_in_place
MapCoords restructuring: https://github.com/georust/geo/pull/811
MapCoordsInplace::map_coords_inplace -> MapCoordsInPlace::map_coords_in_placeTryMapCoordsInplace::try_map_coords_inplace -> TryMapCoordsInPlace::try_map_coords_in_placeTryMapCoords into MapCoords and TryMapCoordsInplace into MapCoordsInPlaceImplement ChamberlainDuquetteArea for all geo types.
Add {Convert,TryConvert} traits for coordinate value type conversion.
BREAKING: MapCoords/MapCoordsInPlace now map Coordinates rather than (x,y) tuples
Tidy fast-path distance algorithm
FIX: update to proper minimum geo-types version
Add LinesIter algorithm to iterate over the lines in geometries.
LinesIter algorithm to iterate over the lines in geometries.
CoordsIter, but only implemented where it makes sense (e.g., for Polygon, Rect, but not Point).TryMapCoordsInplace algorithm that is similar to TryMapCoords but modifies a geometry in-place
Bump proj crate to 0.25.0, using PROJ 8.1.0
proj crate to 0.25.0, using PROJ 8.1.0
ChaikinSmoothing algorithm
rotate for multipolygons to rotate around the collection's centroid, instead of rotating each individual polygon around its own centroid.
KNearestConcaveHull algorithm
ClosestPoint for Polygon's handling of internal points
ClosestPoint method for types Triangle, Rect, GeometryCollection, Coordinate and the Geometry enum.
TryMapCoords Result is now generic rather than a Box<dyn Error>.
Transform algorithm
Intersects implementations
get() to IntersectionMatrix for directly querying DE-9IM matrices
Add line_intersection to compute point or segment intersection of two Lines.
line_intersection to compute point or segment intersection of two Lines.
Relate trait to topologically relate two geometries based on DE-9IM semantics.
Contains implementation for Polygons to match the OGC spec using the new Relate trait
Contains no longer supports Integer Polygon and Geometry. This was a trade-off for a Contains implementation that was more correct for Floats.
Rewrite the crate documentation
Centroid algorithm for MultiLineString when all members have only one
point.
Centroid algorithm on Geometry and its remaining variants.
GeodesicIntermediate algorithm
BREAKING: update geo-types to 0.7
coords_count method on CoordsIter.
EuclideanDistance implementations: impl EuclideanDistance<Coordinate<T>> for Line, impl EuclideanDistance<Line> for Coordinate, impl EuclideanDistance<Coordinate> for Coordinate
geo::GeoFloat and geo::GeoNum trait so external crates can implement methods which
operate on geometries generically.
HasKernel public to allow geo on exotic numeric types.
simplify is given a negative epsilon
simplify
T generic parameter for CoordsIter is now an associated type
CoordsIter::exterior_coords_iter method to iterate over exterior coordinates of a geometry
ExtremeIndices and ExtremePoints traits have been combined into a new Extremes trait containing an extremes method. The output of the extremes method contains both indices and coordinates. The new implementation is based on CoordsIter instead of ConvexHull, and now runs 6x faster.
Fix panic when simplify is given a negative epsilon
simplify is given a negative epsilon
CoordsIter trait for iterating over coordinates in geometries.
Contains
line_locate_point
proj-network feature enables network grid for optional proj integration.
HasDimensions trait for working with Geometry dimensionality
Add Intersects implementations for all pairs of types
Intersects implementations for all pairs of types
ConcaveHull algorithm
Change closure for exterior_mut() and interiors_mut() to be FnOnce
exterior_mut() and interiors_mut() to be FnOnce
contains for degenerate zero-area triangles
Fix bug in Line-Polygon Euclidean distance
Bump geo-types version to 0.6.0
geo-postgis crate
GeodesicDistance and GeodesicLength algorithms
Area for all types
BoundingRect for all types
Contains implementations
Area#area, which can return a negative value depending on winding order, has been renamed to Area#signed_area. Most likely, if you aren't sure which one to use, you'll want unsigned_area which is always positive.
Bump geo-types dependency to 0.5.0
BoundingRect implementation for Rect
ToGeo as deprecated
Introduce point!, line_string!, and polygon! macros.
point!, line_string!, and polygon! macros.
- Add FrechetDistance algorithm -
FrechetDistance algorithm
Bump geo-types dependency to 0.4.0
geo-types dependency to 0.4.0rstar and proj dependencies
Centroid for MultiPoint
Replace the spade crate with the rstar crate
Rewrite vincenty/haversine docs; specify param/return units.
MapCoords for Rects
Area can work on some non-Float geometries (e.g. Rect<Integer>)
Add to_degrees and to_radians methods on Points
to_degrees and to_radians methods on Points
Fix some edge case on centroid computation
Remove unnecessary borrows in function params for Copy types.
Copy types.
Fix Line-Polygon euclidean distance
EuclideanDistance for MultiPolygon to Line and Line to MultiPolygon
Line-LineString euclidean distance
VincentyDistance and VincentyLength algorithms
HaversineIntermediate algorithmMake serde an optional dependency for geo, rename feature to use-serde
geo, rename feature to use-serde
proj crate, rename feature to use-proj
LineString::lines, Winding::points_cw, and Winding::points_ccw
proj feature
Polygon-Polygon and LineString-LineString distance
Reexport core types from geo-types
geo-types
Fix documentation generation on docs.rs
Fix centroid calculation for degenerate polygons
Prefix Euclidean distance/length traits with 'Euclidean'.
SpatialObject for Line type
TryMapCoords trait
`cross_prod` method added to `Point`
Allow coordinates to be more types (not just `Float`s)
Easy methods to convert a Geometry to the underlying type
- Add Haversine length algorithm
Add `Line` to the `Geometry` `enum`
Initial implementation of a `ClosestPoint` algorithm
- Add a prelude: `use geo::*
Add a `lines` iterator method on `LineString`
Remove unnecessary trait bound on `Translate`
Reimplement `Translate` trait using `MapCoords`
Implement Simplification traits for more types
Improve robustness when calculating distance from a point to a line-segment
Add `From`, `IntoIterator`, `Into` impls; add doc comments
Your coding agent can read these notes before it upgrades. Set up the MCP server →