Implement geo-traits for reading from WKT#123
Conversation
| type GeometryType<'a> = &'a Wkt<T> where Self: 'a; | ||
|
|
||
| fn dim(&self) -> geo_traits::Dimensions { | ||
| if self.0.is_empty() { |
There was a problem hiding this comment.
Can this be parsed from the input?
GEOMETRYCOLLECTION ZM EMPTY
That might be a larger change though - requiring explicit tracking of the dimensionality of the geometry.
There was a problem hiding this comment.
I didn't recall that empty geometries could also have a dimension. Does simple features allow that?
There was a problem hiding this comment.
I guess I'm not sure. I just assumed that this was valid:
GEOMETRYCOLLECTION Z(POLYGON Z EMPTY, POINT Z(1 2 3))
Maybe it's not?
There was a problem hiding this comment.
I'd say that yes, long-term we should figure out a way to maintain the dimension for empty WKT geometries.
Co-authored-by: Michael Kirk <michael.code@endoftheworl.de>
michaelkirk
left a comment
There was a problem hiding this comment.
I'm going to make a PR into geo-traits with the unchecked/or_panic variants so we can stop having the same conversation in every geo-traits repo 🤣
| type RingType<'a> = &'a LineString<T> where Self: 'a; | ||
|
|
||
| fn dim(&self) -> geo_traits::Dimensions { | ||
| // TODO: infer dimension from empty WKT |
There was a problem hiding this comment.
Can you please make an issue describing the work to be done here and any context that we might not remember in a hundred years when someone actually does the work?
|
(other than the |
|
Let's release geo-traits-0.2.0 first so we can avoid one sem-ver break. |
|
I updated this to geo-traits 0.2. Can I get a ✅ ? |
|
Thanks! 🚀 |

CHANGES.mdif knowledge of this change could be valuable to users.Ref georust/geo#1157