Ticket #611 (closed feature: fixed)
geometry.toString() should produce WKT
| Reported by: | tschaub | Owned by: | tschaub |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.4 Release |
| Component: | Geometry | Version: | |
| Keywords: | Cc: | ||
| State: |
Description
As it stands, the string representation of a geometry is a comma separated string of numbers - with no other delimiter between components (e.g. a multipolygon is 0, 1,2, 10, 5, 4,0, 1,4, 3, 2,5, 10,15, 10,4, 3 or something). This can be made to be well-known text instead.
The following patch takes care of this. Since Point inherits from LonLat, it needs its own toString, all other geometries inherit theirs from Geometry directly. I hope to change this LonLat inheritance before 2.4.
Also, this patch includes a check in Format.WKT that returns null for unsupported geometry types. A few types need to be added to this format to complete simple feature support.

