Opened 14 years ago

Closed 14 years ago

#347 closed defect (fixed)

WKTReader does not support SF1.2 "Z", "M" and "ZM" geometries

Reported by: warmerdam Owned by: warmerdam
Priority: major Milestone: 3.3.0
Component: Core Version: main
Severity: Feature Request Keywords: wktreader
Cc:

Description

        geos::geom::Geometry *geom = wktreader.read("POINT Z (-117 33 120)");

fails with the exception "ParseException: Expected 'EMPTY' or '(' but encountered : 'Z'"

It appears that the WKTWriter does not support the Z, M and ZM style SF 1.2 geometries, but since the WKTWriter is implementing this as the default output it should.

Change History (1)

comment:1 by warmerdam, 14 years ago

Resolution: fixed
Status: newclosed

Added Z, M and ZM reading in trunk (r2994).

Note that there isn't really any validation done that the number of coordinates matches the Z, M or ZM. For "M" geometries the third ordinal of the coordinates is assigned M. For ZM geometries the M is discarded silently.

Minimal testing added in unit tests.

Note: See TracTickets for help on using tickets.