Opened 14 years ago

Closed 14 years ago

#3600 closed defect (fixed)

PGEO driver does not support Multipolygons

Reported by: aboudreault Owned by: aboudreault
Priority: normal Milestone: 1.7.3
Component: default Version: svn-trunk
Severity: normal Keywords: pgeo, multipolygon
Cc: warmerdam, Even Rouault

Description

The pgeo driver does not support Multipolygons during the reading. It always returns a simple polygon to OGR.

Solution: Use OGRGeometryFactory::organizePolygons during the reading to smartly return the appropriate shape.

Attachments (1)

pgeo.patch (3.7 KB ) - added by aboudreault 14 years ago.
The pgeo patch

Download all attachments as: .zip

Change History (7)

by aboudreault, 14 years ago

Attachment: pgeo.patch added

The pgeo patch

comment:1 by aboudreault, 14 years ago

Could anyone review this patch please? Then I'll commit and backport it in branch 1.7.

comment:2 by Even Rouault, 14 years ago

Just from review, the patch looks fine to me (judging from its proximity with similar code in shape2ogr.cpp). I see you also use the ONLY_CCW hint for organizePolygons(). So I guess there's the same convention in PGeo like in shapefile driver that holes are counterclockwise defined ?

I haven't tested, but I assume you have, so go ahead ;-)

comment:3 by aboudreault, 14 years ago

I'm not sure for the counterclockwise. I've found this in the esri doc: Exterior rings are oriented in a clockwise direction while interior rings are oriented counterclockwise. But I think it's only for ArcGIS. I'm going to check further for the pgeo format.

comment:4 by aboudreault, 14 years ago

Since I've been able to read a polygon that contains an inner ring using the counterclockwise method, I'd assume they followed the same convention.

comment:5 by aboudreault, 14 years ago

Well, I thougt I had the commit right since I had already done something in ogr, apparently no. I'll let you commit the patch.

comment:6 by Even Rouault, 14 years ago

Resolution: fixed
Status: newclosed

Patch applied in trunk (r19778) and in branches/1.7 (r19779)

Note: See TracTickets for help on using tickets.