[fdo-users] SHP polygons & holes issue

Traian Stanev traian.stanev at autodesk.com
Mon Mar 26 12:59:26 EDT 2007

Like Dan said, in SHP the rings are not always in order. This is not a problem except in certain spatial operations, where a ring that you are treating as interior ring is really exterior -- similar to a bunch of islands that represent the same feature for example. In cases like that, more often than not I have seen this represented as multiple polygon features in the SHP file rather than one ambiguous feature.


-----Original Message-----
From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Ytse
Sent: Monday, March 26, 2007 12:23 PM
To: fdo-users at lists.osgeo.org
Subject: [fdo-users] SHP polygons & holes issue

You'll find a zip file attached to this mail containing one feature, a polygon with a hole in it.

When I read in .NET using this code (after a ISelect statement)

            FgfGeometryFactory gf = new FgfGeometryFactory();
            IGeometry geo = gf.CreateGeometryFromFgf( reader.GetGeometry("Geometry")  );

I'm getting something that confuses me : the exterioring has 8 points, and there's one interiorring of 320 points. Which corresponds to an inversion of the inner and exterior ring.

I'd be glad if anyone of this board could doublecheck this and tell me if that's something from the tool that created the shape, something from my code or if it's somehow a mystake in the SHP Provider (I could check the rings area to notice those cases but that would be something heavy for the rare times it will occur) as I don't have the slightiest idea of how it should be stored in the physical .shp file.

Thank you


Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses http://fr.answers.yahoo.com

More information about the fdo-users mailing list