georust / wkt

Rust read/write support for well-known text (WKT)
https://crates.io/crates/wkt
Apache License 2.0
50 stars 25 forks source link

Relax ToWkt impls to work with CoordNum #100

Closed rmanoka closed 2 years ago

rmanoka commented 2 years ago

Currently the ToWkt impls. need T: CoordFloat + Display on the geometry. Can this be relaxed to T: CoordNum + Display? Or, is this a big structural change? Ideally, even FromWkt should rather use CoordNum + FromStr than CoordFloat if that's possible.

michaelkirk commented 2 years ago

I think it should be possible! It'll require some changes to the underlying Wkt type which is currently restricted to num_traits::Float - but I can't imagine why it'd actually be relying on Float behavior for anything.

I can take a look tomorrow.