Skip to content
Prev 8054 / 29559 Next

sp, area and SpatialPolygons

On Sat, 17 Apr 2010, Patrick Giraudoux wrote:

            
Patrick,

There is a bug, not not a simple one. The ring direction of your first 
Polygon object signals that it is a hole, but in Polygons(), singleton 
holes are made into islands, and the largest hole in an all-hole list of 
Polygon objects is also made into an island. The bug was that the hole 
vector used for assigning the area had not been updated, so the area slot 
in the Polygons object was assigned 0 (because it was still treated as a 
hole). Had you said hole=FALSE for P1, it would have been OK. The updating 
is now in place.

Thanks,

Roger