Ticket #2217 (closed defect: fixed)

Opened 7 months ago

Last modified 7 months ago

Shape driver handling of empty geometries

Reported by: rouault Assigned to: warmerdam
Priority: normal Milestone: 1.5.1
Component: default Version: unspecified
Severity: normal Keywords: shape empty geometry
Cc:

Description

This ticket is to track the behaviour of the shape driver regarding to how it handles empty/degenerated geometries when reading a shapefile.

In branches/1.5, in r13749, I commited a fix to restore GDAL 1.4.X behaviour that returns an empty OGRMultiPolygon when psShape->nParts == 0 for a SHPT_POLYGON/SHPT_POLYGONM/SHPT_POLYGONZ. In GDAL 1.5.0, when GEOS was available, the OGRGeometryFactory::organizePolygons returned a NULL pointer that was not corretly handled and caused a crash.

I trunk, in r13762, we return a NULL pointer for empty multipoints, lines and polygons instead of empty OGRMultiPoint, OGRMultiLineString and OGRMultiPolygon.

Change History

02/11/08 15:25:36 changed by rouault

In trunk, in r13764, I've added a test to ogr_shape.py to check that empty multipoints, multilines and multipolygones are returned as features with NULL geometries.

02/16/08 04:13:39 changed by rouault

  • status changed from new to closed.
  • resolution set to fixed.