Opened 10 years ago

Closed 10 years ago

#3625 closed defect (fixed)

OGRGeometryFactory::createFromGEOS() doesn't preserve coordinate dimensions

Reported by: Even Rouault Owned by: Even Rouault
Priority: normal Milestone: 1.8.0
Component: OGR_SF Version: unspecified
Severity: normal Keywords: geos coordinate dimension
Cc: warmerdam

Description

Reported as http://georezo.net/forum/viewtopic.php?id=67932

OGRGeometryFactory::createFromGEOS() always return a 2D geometry. The solution is to call the WKB writer with the right coordinate dimensions, however the GEOSGeom_getCoordinateDimension() has only been introduced in GEOS 3.3.0 (unreleased for now). I had imagined a workaround where the callers of createFromGEOS() would give it the coordinate dimension as a hint, being the max of the coordinate dimensions of the input geometries passed to the GEOS operations. A bit complicated and it seems that GEOS < 3.3 didn't preserve well coordinate dimensions from what I've understood from the recent posts of Frank on geos mailaing list.

Change History (1)

comment:1 Changed 10 years ago by Even Rouault

Resolution: fixed
Status: newclosed

Fixed in trunk in r19827

Note: See TracTickets for help on using tickets.