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

make Wkt<T> display #83

Closed queer-emma closed 2 years ago

queer-emma commented 2 years ago

I was trying to find out how to get a Wkt to actually convert to a string. Is there a reason why it doesn't implement Display? It seems, instead i have to do ẁkt.item.to_string() - which I find counter-intuitive.

lnicola commented 2 years ago

Until recently, a single Wkt values could represent multiple geometries, which would have posed some problems when implementing ToString. But adding it now seems quite reasonable.

queer-emma commented 2 years ago

This makes sense now. I just couldn't figure out why the README says that you can encode WKT strings, but there is no method for it. I didn't see that the individual types are Display, and i also just wanted to encode the Wkt<_>.

michaelkirk commented 2 years ago

Fixed by @categulario in https://github.com/georust/wkt/pull/86