Opened 16 years ago

Closed 16 years ago

#2217 closed defect (fixed)

Shape driver handling of empty geometries

Reported by: Even Rouault Owned by: 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 (2)

comment:1 by Even Rouault, 16 years ago

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.

comment:2 by Even Rouault, 16 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.