Skip to content

Commit

Permalink
Fix postgis bug with empty geometrycollections
Browse files Browse the repository at this point in the history
  • Loading branch information
szekerest committed Dec 9, 2014
1 parent a08ec40 commit 8b8a5de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mappostgis.c
Expand Up @@ -587,7 +587,7 @@ wkbConvCollectionToShape(wkbObj *w, shapeObj *shape)
failures++;
}
}
if ( failures == ncomponents )
if ( failures == ncomponents || ncomponents == 0 )
return MS_FAILURE;
else
return MS_SUCCESS;
Expand Down Expand Up @@ -2207,6 +2207,9 @@ int msPostGISReadShape(layerObj *layer, shapeObj *shape)

msComputeBounds(shape);
}
else {
shape->type = MS_SHAPE_NULL;
}

if( layer->debug > 2 ) {
char *tmp = msShapeToWKT(shape);
Expand Down

0 comments on commit 8b8a5de

Please sign in to comment.