Thanks for your prompt reply Martin and for the explanation!
--john
Martin Davis wrote:
Right on all counts.
I don't know where that toText method came from - it's a bit
redundant. It's exactly the same as toString.
WKTWriter supports additional parameters, such as specifying output
should be formatted. This is why you might want to use an explicit
WKTWriter object, and call write() on it.
Also, WKTWriter reifies the function of writing, which is often useful
in a object-oriented development paradigm (cf the concept of Strategy
classes in GoF).
HTH - Martin
John Cartwright wrote:
Hello All,
I'm just looking for a little clarification on converting a Geometry
to it's WKT representation. It looks to me like Geometry#toString
and Geometry#toText produce the same result. Is there any reason to
use one over the other? Given both these return the WKT, why would
one choose to use the WKTWriter#write method?
Thanks!
--john
_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel
_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel