# Changes ## 0.7.13 * 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. ## 0.7.12 * Add `Polygon::try_exterior_mut` and `Polygon::try_interiors_mut`. * Add `wkt!` macro to define geometries at compile time. ## 0.7.11 * Bump rstar dependency ## 0.7.10 * Implement `From<&Line>` for `LineString` ## 0.7.9 * Return `DoubleEndedIterator` from `LineString::points` and `LineString::points_mut` * * POSSIBLY BREAKING: Minimum supported version of Rust (MSRV) is now 1.63 * Add `no_std` compatibility when the new default `std` feature is disabled * * Support `rstar` version `0.10` in feature `use-rstar_0_10`. ## 0.7.8 * Rename `Coordinate` to `Coord`; add deprecated `Coordinate` that is an alias for `Coord` * Pin `arbitrary` version to 1.1.3 until our MSRV catches up with its latest release * Add `point.x_mut()` and `point.y_mut()` methods on `Points` * Changed license field to [SPDX 2.1 license expression](https://spdx.dev/spdx-specification-21-web-version/#h.jxpfx0ykyb60) * * Fix typo in deprecated attribute, which will become a compiler error in a future version of rustc. * ## 0.7.7 * Fixed: using empty `polygon![]` macro no longer requires including `line_string!` macro ## 0.7.6 * You may now specify `Geometry` rather than `Geometry` 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. * * the `geometry` module now re-exports all the inner geometry variants, so you can `use geo_types::geometry::*` to concisely include `Point`, `LineString`, etc. * ## 0.7.5 * Add `split_x` and `split_y` methods on `Rect` * * Add support for `Polygon` in `RTree` * * Deprecate `GeometryCollection::from(single_geom)` in favor of `GeometryCollection::from(vec![single_geom])` * ## 0.7.4 * BREAKING: Make `Rect::to_lines` return lines in winding order for `Rect::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!`, and `polygon!` now support trailing commas such as `coord! { x: 181.2, y: 51.79, }` * * Internal cleanup: Explicitly declare `use-rstar_0_8` and `use-rstar_0_9` features to be explicit which rstar version is being used. For backward compatibility, the `use-rstar` feature will still enable `use-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 arguments `point!(coordinate)` (coordinate can be created with the `coord!` macro) * * `LineString`, `MultiPoint`, `MultiPolygon`, `Triangle`, `MultiLineString` now have a new constructor `new(...)`. `GeometryCollection` has a `new_from(...)` constructor. `GeometryCollection::new()` has been deprecated - use `GeometryCollection::default()` instead. Do not use tuple constructors like ~~`MultiPoint(...)`~~ for any of the geo-types. Use `MultiPoint::new(...)` and similar ones instead. * PRs: [MultiPolygon::new](https://github.com/georust/geo/pull/786), [MultiLineString::new](https://github.com/georust/geo/pull/784), [Triangle::new](https://github.com/georust/geo/pull/783), [GeometryCollection::new_from](https://github.com/georust/geo/pull/782), [LineString::new](https://github.com/georust/geo/pull/781), [MultiPoint::new](https://github.com/georust/geo/pull/778), [Point::from](https://github.com/georust/geo/pull/777) ## 0.7.3 * DEPRECATION: Deprecate `Point::lng`, `Point::lat`, `Point::set_lng` and `Point::set_lat` * * Support `rstar` version `0.9` in feature `use-rstar_0_9` * * `Geometry` and `GeometryCollection` 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 * ## 0.7.2 * Implement `RelativeEq` and `AbsDiffEq` for fuzzy comparison of remaining Geometry Types * * Implement `From` for `LineString` * * Add optional `arbitrary` feature for integration with the [arbitrary](https://github.com/rust-fuzz/arbitrary) crate * ## 0.7.1 * Implement `Default` on `Coordinate` and `Point` structs (defaults to `(x: 0, y: 0)`) * * Add specific details about conversion failures in the newly public `geo_types::Error` * ## 0.7.0 * BREAKING: `geo_types::CoordinateType` now extends Debug and has been deprecated in favor of `geo_types::CoordNum` and `geo_types::CoordFloat` * * BREAKING: Introduce `use-rstar` feature rather than `rstar` so that `approx` dependency can be optional * * Implement `approx::{RelativeEq, AbsDiffEq}` for geo-types when using the `approx` feature * * `geo_types::LineString::num_coords` has been deprecated in favor of `geo::algorithm::coords_iter::CoordsIter::coords_count` * ## 0.6.2 * Add `into_iter`, `iter` and `iter_mut` methods for `MultiPolygon`, `MultiPoint`, and `MultiLineString` * * `Rect::new` automatically determines min/max points. Deprecates `Rect::try_new` which can no longer fail. * * Add `MultiLineString::is_closed` method * ## 0.6.1 * Add documentation on semantics (based on OGC-SFA) * * Add vector-space operations to `Coordinate` and `Point` * ## 0.6.0 * Remove `COORD_PRECISION` which was an arbitrary constant of 0.1m * * Bump rstar version to 0.8.0 * * Add `Triangle` and `Rect` to `Geometry` * * Introduce `Rect::try_new` constructor which does not panic * * Add `Rect::center` method * * Derive `Eq` for types when applicable * * * Implement `From for Polygon` * ## 0.5.0 * Update Geometry enum with iterators and TryFrom impls for primitives * https://github.com/georust/geo/pull/410 * 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 in `geo-types` * ## 0.4.3 * Introduce `point!`, `line_string!`, and `polygon!` macros. * * * Add `Rect` constructor that enforces `min.{x,y} < max.{x,y}` * ## 0.4.2 * Add `Polygon::num_coords` * ## 0.4.1 * Add `Polygon::interiors_push` - Adds an interior ring to a `Polygon` * ## 0.4.0 * Rewrite `Polygon` structure to enforce closed `LineString` rings * * Implement `Into` for `Line` * * Implement `Index` for `LineString` to get the coordinate at that position * * Bump `rstar` dependency * * Ability to construct `MultiPolygon` from `Vec` of anything that implements `Into` * * Add `new`, `is_empty`, `len` functions on `GeometryCollection` * * Tweak `Geometry` method names slightly * * Remove unnecessary references in function signatures * ## 0.3.0 * Replace the [spade](https://crates.io/crates/spade) crate with the [rstar](https://crates.io/crates/rstar) crate * * Remove unnecessary algorithm trait bounds * ## 0.2.2 * Fix misnamed `serde` feature flag. * * Add `width` and `height` helpers on `Rect`. * ## 0.2.1 * Add `to_lines` method on a `Triangle` * ## 0.2.0 * Introduce `Line::{dx, dy, slope, determinant}` methods. * * Remove unnecessary borrows in function params for `Copy` types. * * Introduce `x_y` method on `Point` and `Coordinate` * * Migrate `Line` and `LineString` to be a series of `Coordinates` (not `Points`). * * Introduce Triangle geometry type. * * Rename bounding ‘box’ to ‘rect’; move structure to geo-types. * ## 0.1.1 * Allow LineString creation from vec of two-element CoordinateType array * ## 0.1.0 * New crate with core types from `geo` *