Ticket #611 (closed feature: fixed)

Opened 6 years ago

Last modified 6 years ago

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.

Attachments

toString.patch Download (4.9 KB) - added by tschaub 6 years ago.
geometry.toString() returns WKT
toString.updated.patch Download (4.4 KB) - added by tschaub 6 years ago.
updated patch based on r2943

Change History

Changed 6 years ago by tschaub

geometry.toString() returns WKT

Changed 6 years ago by tschaub

  • keywords review added

will commit with review

Changed 6 years ago by tschaub

updated patch based on r2943

Changed 6 years ago by crschmidt

  • keywords commit added; review removed

Reviewed. go ahead for commit

Changed 6 years ago by tschaub

  • keywords commit removed
  • status changed from new to closed
  • resolution set to fixed

resolved with r2945

Note: See TracTickets for help on using tickets.