[gdal-dev] Shapefile - Multipolygon with interior rings

Frank Warmerdam warmerdam at pobox.com
Mon Aug 9 22:10:05 EDT 2010


On Mon, Aug 9, 2010 at 4:51 PM, Jay L. <jzl5325 at psu.edu> wrote:
> When printing the point_count (in blue) variable I am able to see that my
> multipolygon consists of two polygons, each with 2 rings (one interior and
> one exterior).  I iterate through these rings and attempt to get a point
> count, which I use to iterate over each linearring.  The point count for the
> exterior ring runs without a problem and returns the proper number of
> points.  The point count on the interior ring returns an error.

Jay,

It isn't immediately obvious to me why you are seeing the problem
you report, but you are using the variable geom_count for
both the outer and inner loop and this will cause you
severe problems in any case where a multipolygon
contains a different number of polygons than it's
polygon's have rings.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent


More information about the gdal-dev mailing list