From dd258b56e27a4f2d6c17bf5f649e9e805167f218 Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Wed, 17 Jul 2024 12:24:00 -0400 Subject: [PATCH 1/2] Correct docs that WKT does not have ZM support --- geozero/src/lib.rs | 2 +- geozero/src/wkt/wkt_reader.rs | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/geozero/src/lib.rs b/geozero/src/lib.rs index 42b6670f..3bd4547a 100644 --- a/geozero/src/lib.rs +++ b/geozero/src/lib.rs @@ -30,7 +30,7 @@ //! | MVT | [mvt::tile::Feature] | XY | [mvt::tile::Layer] | [ToMvt] | [MvtWriter](mvt::MvtWriter) | //! | SVG | - | XY | - | [ToSvg] | [SvgWriter](svg::SvgWriter) | //! | WKB | [Wkb](wkb::Wkb), [Ewkb](wkb::Ewkb), [GpkgWkb](wkb::GpkgWkb), [SpatiaLiteWkb](wkb::SpatiaLiteWkb), [MySQL](wkb::MySQLWkb) | XYZM | - | [ToWkb] | [WkbWriter](wkb::WkbWriter) | -//! | WKT | [wkt::WktStr], [wkt::WktString], [wkt::EwktStr], [wkt::EwktString] | XYZM | [wkt::WktReader], [wkt::WktStr], [wkt::WktString], [wkt::EwktStr], [wkt::EwktString] | [ToWkt] | [WktWriter](wkt::WktWriter) | +//! | WKT | [wkt::WktStr], [wkt::WktString], [wkt::EwktStr], [wkt::EwktString] | XY | [wkt::WktReader], [wkt::WktStr], [wkt::WktString], [wkt::EwktStr], [wkt::EwktString] | [ToWkt] | [WktWriter](wkt::WktWriter) | #![warn(clippy::uninlined_format_args)] #![allow( diff --git a/geozero/src/wkt/wkt_reader.rs b/geozero/src/wkt/wkt_reader.rs index fdefd256..221684d4 100644 --- a/geozero/src/wkt/wkt_reader.rs +++ b/geozero/src/wkt/wkt_reader.rs @@ -450,3 +450,26 @@ mod test { } } } + +#[cfg(all(test, feature = "with-geojson"))] +mod test_3d { + use crate::ToJson; + + use super::*; + + #[test] + #[ignore = "3d WKT not supported"] + fn point_3d() { + let wkt = Wkt("POINT Z(1.0 2.0 3.0)"); + let actual = wkt.to_json().unwrap(); + dbg!(actual); + } + + #[test] + #[ignore = "M-value WKT not supported"] + fn point_m() { + let wkt = Wkt("POINT M(1.0 2.0 3.0)"); + let actual = wkt.to_json().unwrap(); + dbg!(actual); + } +} From 0347150d538e57c27770390eb67d1b2b8412b4ac Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Wed, 17 Jul 2024 12:24:41 -0400 Subject: [PATCH 2/2] mention zm write only --- geozero/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geozero/src/lib.rs b/geozero/src/lib.rs index 3bd4547a..0374efcd 100644 --- a/geozero/src/lib.rs +++ b/geozero/src/lib.rs @@ -30,7 +30,7 @@ //! | MVT | [mvt::tile::Feature] | XY | [mvt::tile::Layer] | [ToMvt] | [MvtWriter](mvt::MvtWriter) | //! | SVG | - | XY | - | [ToSvg] | [SvgWriter](svg::SvgWriter) | //! | WKB | [Wkb](wkb::Wkb), [Ewkb](wkb::Ewkb), [GpkgWkb](wkb::GpkgWkb), [SpatiaLiteWkb](wkb::SpatiaLiteWkb), [MySQL](wkb::MySQLWkb) | XYZM | - | [ToWkb] | [WkbWriter](wkb::WkbWriter) | -//! | WKT | [wkt::WktStr], [wkt::WktString], [wkt::EwktStr], [wkt::EwktString] | XY | [wkt::WktReader], [wkt::WktStr], [wkt::WktString], [wkt::EwktStr], [wkt::EwktString] | [ToWkt] | [WktWriter](wkt::WktWriter) | +//! | WKT | [wkt::WktStr], [wkt::WktString], [wkt::EwktStr], [wkt::EwktString] | XYZM (ZM write-only) | [wkt::WktReader], [wkt::WktStr], [wkt::WktString], [wkt::EwktStr], [wkt::EwktString] | [ToWkt] | [WktWriter](wkt::WktWriter) | #![warn(clippy::uninlined_format_args)] #![allow(