- Add
EuclideanDistance
implementations for all remaining geometries. - Add
HausdorffDistance
algorithm trait to calculate the Hausdorff distance between any two geometries. - Add
matches
method to IntersectionMatrix for ergonomic de-9im comparisons.
- Implement "Closest Point" from a
Point
on aGeometry
using spherical geometry. georust#958 - Bump CI containers to use libproj 9.2.1
- BREAKING: Bump rstar and robust dependencies georust#1030
-
Add
TriangulateEarcut
algorithm trait to triangulate polygons with the earcut algorithm. -
Add
Vector2DOps
trait to algorithims module and implemented it forCoord<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
.
- Added
CrossTrackDistance
trait to calculate the distance from a point to the nearest point on a line - Performance improvements for CoordinatePosition
- BREAKING: Remove deprecated methods
- georust#1012
- Instead of
map_coords_inplace
usemap_coords_in_place
- Instead of
RotatePoint
useRotate
- Instead of
Translate#translate_inplace
useTranslate#translate_mut
- Rename Bearing::bearing to HaversineBearing::haversine_bearing to clarify it uses great circle calculations.
- Speed up intersection checks
- FIX: Simplify no longer skips simplifying minimally sized Polygons and LineString
- BREAKING: Make
SimplifyVw
naming consistent - Update the
Polygon
implementation of theSimplify
algorithm to always returnPolygon
s with at least four coordinates. - BREAKING: Update to float_next_after-1.0.0 georust#952
- POSSIBLY BREAKING: Minimum supported version of Rust (MSRV) is now 1.63
- BREAKING: Update
rstar
dependency to0.10.0
and enableuse-rstar_0_10
feature for `geo-types. georust#987 - Added
MinimumRotatedRect
trait to calculate the MBR of geometry georust#959 - Added
GeodesicArea
trait to support geodesic area and perimeter calculations fromgeographlib-rs
georust#988 - Added
GeodesicDestination
trait to support geodesic destination calculations georust#991 - Added
GeodesicBearing
trait to support geodesic bearing calculations georust#991
- Update to geo-types-0.7.8 which deprecated
Coordinate
in favor ofCoord
. georust#924 - Added doc for Transform trait to root docs index.
- Fixed an issues where calculating the convex hull of 3 collinear points would include all 3.
- Added outlier detection algorithm using LOF
- Changed license field to SPDX 2.1 license expression
- Added
RemoveRepeatedPoints
trait allowing the removal of (consecutive) repeated points. - Remove polygon-polygon fast path due to ongoing lack of reliability
- Fix RDP recursion bug
- Clarify documentation of bearing on the HaversineDestination
- Added
AffineOps
,Scale
, andSkew
traits allowing the definition and composition of 2-D affine transforms.- Related Cleanup:
- Existing
Rotate
andTranslate
traits leverage this newAffineOps
trait. - Moved
RotatePoint::rotate_around_point
method onto Rotate::rotate_around_point
and removedRotatePoint
trait.- Removed deprecated
Rotate::rotate
method, useRotate::rotate_around_center
orRotate::roate_around_centroid
instead. - Deprecated
Translate::translate_in_place
in favor ofTranslate::translate_mut
to line up with naming elsewhere in the crate.
- Existing
- Implemented across several PR's:
- Related Cleanup:
- Added
BooleanOps::clip
to clip a 1-D geometry with a 2-D geometry. - Added
InteriorPoint
trait to calculate a representative point inside aGeometry
. - Added
Within
trait to determine if one Geometry is completely within another. - Added
ConvexHull
implementation for all remaining geometries. - Added
Contains
implementation for all remaining geometries. - Removed deprecated
ToGeo
trait. Usestd::convert::TryFrom<$geometry>
instead.
- Fix some floating point issues with
BoolOps
- Add densification algorithm for linear geometry components
- You may now specify
Geometry
rather thanGeometry<f64>
since we've added a default trait implementation. You may still explicitly declare the numeric type as f64, or any other implementation ofCoordNum
, but this should save you some typing if you're using f64. The same change applies toCoordinates
and all the geometry variants, likePoint
,LineString
, etc. - Fix fast path euclidean distance
- Reexport everything from the
proj
crate - Added a
geometry
module which re-exports all the inner geometry variants, so you canuse geo::geometry::*
to concisely includePoint
,LineString
, etc. - Use robust predicates everywhere in geo
Winding
trait is rexported under geo::algorithm::Winding (and thus geo::Winding and geo::prelude::Winding)- BREAKING: de-exported
WindingOrder
fromgeo::WindingOrder
/geo::algorithms::WindingOrder
. Instead, go back touse geo::winding_order::WindingOrder
- it was briefly rexported asgeo::WindingOrder
andgeo::algorithms::WindingOrder
.
-
Boolean operations for
Polygon
s andMultiPolygon
s: intersect, union, xor, and difference. Refer traitbool_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 implementnum_traits::Signed
andnum_traits::Bounded
. This shouldn't affect you if you are using a standardGeometry<f64>
orGeometry<f32>
orgeo::GeoFloat
generically. -
Speed up
Relate
andContains
traits for largeLineStrings
andPolygons
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: georust#811- rename
MapCoordsInplace::map_coords_inplace
->MapCoordsInPlace::map_coords_in_place
- rename
TryMapCoordsInplace::try_map_coords_inplace
->TryMapCoordsInPlace::try_map_coords_in_place
- Consolidate traits
TryMapCoords
intoMapCoords
andTryMapCoordsInplace
intoMapCoordsInPlace
- rename
-
Implement
ChamberlainDuquetteArea
for all geo types. -
Add
{Convert,TryConvert}
traits for coordinate value type conversion. -
BREAKING:
MapCoords
/MapCoordsInPlace
now mapCoordinate
s 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.- Very similar to
CoordsIter
, but only implemented where it makes sense (e.g., forPolygon
,Rect
, but notPoint
). - georust#757
- Very similar to
- Add
TryMapCoordsInplace
algorithm that is similar toTryMapCoords
but modifies a geometry in-place
- Bump
proj
crate to 0.25.0, using PROJ 8.1.0 - Add
ChaikinSmoothing
algorithm - Fix
rotate
for multipolygons to rotate around the collection's centroid, instead of rotating each individual polygon around its own centroid. - Add
KNearestConcaveHull
algorithm - Remove cargo-tarpaulin due to instability (#676, #677)
- Fix:
ClosestPoint
for Polygon's handling of internal points - Implemented
ClosestPoint
method for types Triangle, Rect, GeometryCollection, Coordinate and the Geometry enum. - BREAKING:
TryMapCoords
Result is now generic rather than a Box. - Add
Transform
algorithm - Add missing
Intersects
implementations - Note: The MSRV when installing the latest dependencies has increased to 1.55
- Add
get()
toIntersectionMatrix
for directly querying DE-9IM matrices
- Add
line_intersection
to compute point or segment intersection of two Lines. - Add
Relate
trait to topologically relate two geometries based on DE-9IM semantics. - Fix
Contains
implementation for Polygons to match the OGC spec using the newRelate
trait - BREAKING:
Contains
no longer supports IntegerPolygon
andGeometry
. This was a trade-off for aContains
implementation that was more correct for Floats.
- Rewrite the crate documentation
- Fix
Centroid
algorithm forMultiLineString
when all members have only one point. - Implement
Centroid
algorithm onGeometry
and its remaining variants. - Add
GeodesicIntermediate
algorithm
- BREAKING: update geo-types to 0.7
- Introduce
coords_count
method onCoordsIter
. - Fix non-empty MultiPoint has 0-dimensions, not 1.
- Add new
EuclideanDistance
implementations:impl EuclideanDistance<Coordinate<T>> for Line
,impl EuclideanDistance<Line> for Coordinate
,impl EuclideanDistance<Coordinate> for Coordinate
- Introduce
geo::GeoFloat
andgeo::GeoNum
trait so external crates can implement methods which operate on geometries generically. - Make
HasKernel
public to allow geo on exotic numeric types. - Fix panic when
simplify
is given a negative epsilon - Performance improvements to
simplify
- BREAKING: The
T
generic parameter forCoordsIter
is now an associated type - Add
CoordsIter::exterior_coords_iter
method to iterate over exterior coordinates of a geometry - BREAKING: The
ExtremeIndices
andExtremePoints
traits have been combined into a newExtremes
trait containing anextremes
method. The output of theextremes
method contains both indices and coordinates. The new implementation is based onCoordsIter
instead ofConvexHull
, and now runs 6x faster.
- Fix panic when
simplify
is given a negative epsilon - Add
CoordsIter
trait for iterating over coordinates in geometries. - Fix edge case handling in
Contains
- Fix edge case handling in
line_locate_point
- Add
proj-network
feature enables network grid for optionalproj
integration. - Add
HasDimensions
trait for working with Geometry dimensionality
- Add
Intersects
implementations for all pairs of types - Add
ConcaveHull
algorithm - Add robust predicates
- Improve numerical stability in centroid computation
- Bump proj version to 0.20.3
- Change closure for
exterior_mut()
andinteriors_mut()
to beFnOnce
- Bump proj version to 0.20.0 (superseded by 0.20.3)
- Fix numerical stability in area computation
- Fix
contains
for degenerate zero-area triangles - Allow MapCoords on Rect to invert coords
- Centroid impl for MultiLineString
- Fix Area logic for Polygon with interiors
- Fix bug in Line-Polygon Euclidean distance
- Bump geo-types version to 0.6.0
- Bump rstar version to 0.8.0
- Bump proj version to 16.2
- Extract PostGIS integration out to new
geo-postgis
crate - Add new
GeodesicDistance
andGeodesicLength
algorithms - Implement
Area
for all types - Implement
BoundingRect
for all types - Add more
Contains
implementations - Fix Vincenty algorithms for equatorial and coincident points
- Separate area algorithms into unsigned and signed methods. For clarity, the existing
Area#area
, which can return a negative value depending on winding order, has been renamed toArea#signed_area
. Most likely, if you aren't sure which one to use, you'll wantunsigned_area
which is always positive.
- Bump geo-types dependency to 0.5.0
- Bump proj dependency to 0.15.1
- Add a mutable Coordinate iterator to LineString
- Fix for rectangle intersection check
- Bump proj to 0.14.4
- Add
BoundingRect
implementation forRect
- Add Chamberlain–Duquette area algorithm
- Make Euclidean Line-Line distance symmetrical
- Bump rstar dependency to 0.4
- Mark
ToGeo
as deprecated - Remove usages of 'failure' crate
- Introduce
point!
,line_string!
, andpolygon!
macros.
- Add
FrechetDistance
algorithm
- Bump
geo-types
dependency to 0.4.0 - Bump
rstar
andproj
dependencies - Implement
Centroid
forMultiPoint
- Add
MapCoords
forRect
s - Rewrite vincenty/haversine docs; specify param/return units.
Area
can work on some non-Float
geometries (e.g.Rect<Integer>
)
- Add
to_degrees
andto_radians
methods onPoint
s
- Fix some edge case on centroid computation
- Remove unnecessary borrows in function params for
Copy
types. - Rename bounding ‘box’ to ‘rect’; move structure to geo-types.
- Fix Line-Polygon euclidean distance
- Implement
EuclideanDistance
forMultiPolygon
toLine
andLine
toMultiPolygon
- Add
Line
-LineString
euclidean distance - Add
VincentyDistance
andVincentyLength
algorithms - Add
HaversineIntermediate
algorithm
- Make serde an optional dependency for
geo
, rename feature touse-serde
- Use the
proj
crate, rename feature touse-proj
- Return unboxed iterators from
LineString::lines
,Winding::points_cw
, andWinding::points_ccw
- Fix compilation errors when using the
proj
feature - Add
Polygon
-Polygon
andLineString
-LineString
distance - Update postgis optional dependency to 0.6
- Clarify wording for Contains algorithm.
- Reexport core types from
geo-types
- Fix documentation generation on docs.rs
- Fix centroid calculation for degenerate polygons
- Prefix Euclidean distance/length traits with 'Euclidean'.
- Bump num-traits: 0.1 → 0.2
- Implement
SpatialObject
forLine
type - Implement a
TryMapCoords
trait - Impl Polygon convexity function on the type
- Implement rust-proj as an optional feature within geo
- Easy methods to convert a Geometry to the underlying type
- Map coords inplace
- [Added bearing trait]georust#186)
- Winding/Orientation for LineStrings
- Add
Line
to theGeometry
enum
- Use new bulk-load method for initial R* Tree population
- Add PostGIS and GeoJSON integration/conversions
- Add a
lines
iterator method onLineString
- Implement
Contains<Polygon>
forPolygon
- Correctly check for LineString containment in Polygon
- Remove unnecessary trait bound on
Translate
- Topology preserving Visvalingam-Whyatt algorithm
- Implement
Copy
forLine
- Rewrite
RotatePoint
impls to be generic - Add associated return type for
BoundingBox
- Add associated return type for
Centroid
- Quickhull orientation fix
- Implement distance traits for more geometries
- Correctly calculate centroid for complex polygons
- Add
Orient
trait for polygon - Add geometry rotation
- Add extreme point-finding
- Add contains point impl for bbox
- Implement Haversine algorithm
- fix when multipolygon composed of two polygons of opposite clockwise
- Migrate from 'num' to 'num_traits' crate
- Data structures and traits are now generic (previously all were
f64
) geo::COORD_PRECISION
is nowf32
(previously wasf64
)