- POSSIBLY BREAKING: Minimum supported version of Rust (MSRV) is now 1.70
- Add feature for rstar v0.12.0
- Add num_rings and num_interior_rings methods to polygons.
- Add
Polygon::try_exterior_mut
andPolygon::try_interiors_mut
. georust#1071 - Add
wkt!
macro to define geometries at compile time. georust#1063
- Bump rstar dependency georust#1030
- Implement
From<&Line>
forLineString
- Return
DoubleEndedIterator
fromLineString::points
andLineString::points_mut
- POSSIBLY BREAKING: Minimum supported version of Rust (MSRV) is now 1.63
- Add
no_std
compatibility when the new defaultstd
feature is disabled - Support
rstar
version0.10
in featureuse-rstar_0_10
.
- Rename
Coordinate
toCoord
; add deprecatedCoordinate
that is an alias forCoord
- Pin
arbitrary
version to 1.1.3 until our MSRV catches up with its latest release - Add
point.x_mut()
andpoint.y_mut()
methods onPoints
- Changed license field to SPDX 2.1 license expression
- Fix typo in deprecated attribute, which will become a compiler error in a future version of rustc.
- Fixed: using empty
polygon![]
macro no longer requires includingline_string!
macro
- 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. - the
geometry
module now re-exports all the inner geometry variants, so you canuse geo_types::geometry::*
to concisely includePoint
,LineString
, etc.
- Add
split_x
andsplit_y
methods onRect
- Add support for
Polygon
inRTree
- Deprecate
GeometryCollection::from(single_geom)
in favor ofGeometryCollection::from(vec![single_geom])
- BREAKING: Make
Rect::to_lines
return lines in winding order forRect::to_polygon
. - Note: All crates have been migrated to Rust 2021 edition. The MSRV when installing the latest dependencies has increased to 1.56.
- Macros
coord!
,point!
,line_string!
, andpolygon!
now support trailing commas such ascoord! { x: 181.2, y: 51.79, }
- Internal cleanup: Explicitly declare
use-rstar_0_8
anduse-rstar_0_9
features to be explicit which rstar version is being used. For backward compatibility, theuse-rstar
feature will still enableuse-rstar_0_8
. - Add missing size_hint() method for point and coordinate iterators on LineString
- Add ExactsizeIterator impl for Points iterator on LineString
- Extend
point!
macro to support single coordinate expression argumentspoint!(coordinate)
(coordinate can be created with thecoord!
macro) LineString
,MultiPoint
,MultiPolygon
,Triangle
,MultiLineString
now have a new constructornew(...)
.GeometryCollection
has anew_from(...)
constructor.GeometryCollection::new()
has been deprecated - useGeometryCollection::default()
instead. Do not use tuple constructors likefor any of the geo-types. UseMultiPoint(...)
MultiPoint::new(...)
and similar ones instead.
- DEPRECATION: Deprecate
Point::lng
,Point::lat
,Point::set_lng
andPoint::set_lat
- Support
rstar
version0.9
in featureuse-rstar_0_9
Geometry
andGeometryCollection
now support serde.- Add
Coordinate
iterators to LineString, regularise its iterator methods, and refactor its docs - Add +=, -=, *=, and /= for Point
- Note: The MSRV when installing the latest dependencies has increased to 1.55
- Implement
RelativeEq
andAbsDiffEq
for fuzzy comparison of remaining Geometry Types - Implement
From<Line>
forLineString
- Add optional
arbitrary
feature for integration with the arbitrary crate
- Implement
Default
onCoordinate
andPoint
structs (defaults to(x: 0, y: 0)
) - Add specific details about conversion failures in the newly public
geo_types::Error
- BREAKING:
geo_types::CoordinateType
now extends Debug and has been deprecated in favor ofgeo_types::CoordNum
andgeo_types::CoordFloat
- BREAKING: Introduce
use-rstar
feature rather thanrstar
so thatapprox
dependency can be optional - Implement
approx::{RelativeEq, AbsDiffEq}
for geo-types when using theapprox
feature geo_types::LineString::num_coords
has been deprecated in favor ofgeo::algorithm::coords_iter::CoordsIter::coords_count
- Add
into_iter
,iter
anditer_mut
methods forMultiPolygon
,MultiPoint
, andMultiLineString
Rect::new
automatically determines min/max points. DeprecatesRect::try_new
which can no longer fail.- Add
MultiLineString::is_closed
method
- Add documentation on semantics (based on OGC-SFA)
- Add vector-space operations to
Coordinate
andPoint
- Remove
COORD_PRECISION
which was an arbitrary constant of 0.1m - Bump rstar version to 0.8.0
- Add
Triangle
andRect
toGeometry
- Introduce
Rect::try_new
constructor which does not panic - Add
Rect::center
method - Derive
Eq
for types when applicable - Implement
From<Triangle> for Polygon
- Update Geometry enum with iterators and TryFrom impls for primitives
- Make geo-types Rect fields private to force users to use constructor (breaking change)
- Bump rstar dependency to 0.4
- Fix link to
LineString
in docs - Fix typo in Rect docs about min/max positions.
- Implement
Hash
for all types ingeo-types
- Introduce
point!
,line_string!
, andpolygon!
macros. - Add
Rect
constructor that enforcesmin.{x,y} < max.{x,y}
- Add
Polygon::num_coords
- Add
Polygon::interiors_push
- Adds an interior ring to aPolygon
- Rewrite
Polygon
structure to enforce closedLineString
rings - Implement
Into<Geometry>
forLine
- Implement
Index<usize>
forLineString
to get the coordinate at that position - Bump
rstar
dependency - Ability to construct
MultiPolygon
fromVec
of anything that implementsInto<Polygon>
- Add
new
,is_empty
,len
functions onGeometryCollection
- Tweak
Geometry
method names slightly - Remove unnecessary references in function signatures
- Fix misnamed
serde
feature flag. - Add
width
andheight
helpers onRect
.
- Add
to_lines
method on aTriangle
- Introduce
Line::{dx, dy, slope, determinant}
methods. - Remove unnecessary borrows in function params for
Copy
types. - Introduce
x_y
method onPoint
andCoordinate
- Migrate
Line
andLineString
to be a series ofCoordinates
(notPoints
). - Introduce Triangle geometry type.
- Rename bounding ‘box’ to ‘rect’; move structure to geo-types.
- Allow LineString creation from vec of two-element CoordinateType array
- New crate with core types from
geo