- Add an
infer_type
function to extract only the geometry type and dimension from a WKT string.
- Support parsing Z, M, and ZM WKT strings.
- Changed license field to SPDX 2.1 license expression
- Bump min version of geo-types, and update geo_types::Coordinate to non-deprecated geo_types::Coord
- BREAKING: WktNum must implement PartialEq
- Implement PartialEq for Wkt
- BREAKING: Simplify Wkt data structure by replacing it with its only field (formerly known as
item: Geometry
) - BREAKING: Replace geometry_variant.as_item() with Wkt::from(geometry_variant)
- Fixed a typo in the release notes to reference the correct version
- serialize integer geometries to WKT, so you can now:
geo_types::Point::<i32>::new(1, 2).wkt_string()
- deserialize integer geometries from WKT, so you can now:
geo_types::Point::<i32>::try_from_wkt_str("POINT(1 2)")
Note that trying to parse numbers with a decimal point as integer geometries will errorgeo_types::Point::<i32>::try_from_wkt_str("POINT(1.1 2.9)").unwrap_err()
- docs.rs documentation now shows all optional features.
- docs.rs documentation items are annotated with their feature requirements.
deserialize_wkt
serde integration for all the geo-types (and any other implementer of TryFromWkt)- add support for serializing integer geometries, so you can now:
geo_types::Point::new(1i32, 2i32).wkt_string()
Note that deserializing integer geometries is not yet supported.
- impl
std::fmt::Display
forWkt
. - Additions to ToWkt trait:
- New
FromWkt
trait allows a way to convert from a string or reader directly to geo-types, without exposing you to the intermediateWkt
structs. - Implemented
geo_types::GeometryCollection::from(Wkt::from_str(wkt_str))
- Now accepts
MULTIPOINT
s with fewer parentheses, as output byST_AsText
in postgis:MULTIPOINT(0 1, 2 3)
in addition toMULTIPOINT((0 1), (2 3))
- BREAKING: Replace
Wkt::items
withWkt::item
and removeWkt::add_item()
. - BREAKING: Reject empty strings instead of parsing them into an empty
Wkt
. - BREAKING: move
Wkt::from_str
toFromStr
trait. Adduse std::str::FromStr;
to your code to use it. - Switch to 2021 edition and add examples
- Update to geo-types v0.7.3
- Add MIT license file
- Minimal support for JTS extension:
LINEARRING
by parsing it as aLINESTRING
. - Support
POINT EMPTY
in conversion togeo_types
. Converts toMultiPoint([])
.
- Some "numeric" characters like
¾
and①
were being treated as digits.
- Approximately 40% faster according to
cargo bench
.
- Add
serde::Deserialize
forWkt
andGeometry
. - Add helper functions for deserializing from WKT format into
geo_types::Geometry
andgeo_types::Point
- WKT errors impl
std::error::Error
- Add TryFrom for converting directly to geo-types::Geometry enum members, such
as
geo_types::LineString::try_from(wkt)
- Add
geo-types::Geometry::from(wkt)
- BREAKING: update geo-types, apply new
geo_types::CoordFloat
- BREAKING: Add Debug to Wkt structs by using new WktFloat instead of num_traits::Float
- update geo-types