[R-sig-Geo] Hole attribute in Polygon lost when made into Polygons object?

MacQueen, Don macqueen1 at llnl.gov
Wed May 27 00:25:06 CEST 2015


I must be missing something basic
(either in understanding, or possibly being blind to a typo!)

Here is the example data:

m1 <-structure(c(2.8, 8, 8.2, 3.9, 1.6,
    9.2, 6.8, 3, 1.1, 4.2),
   .Dim = c(5L, 2L))


Pnh <- Polygon(m1, hole=FALSE)
Ph  <-  Polygon(m1, hole=TRUE)

Pnhs <- Polygons(list(Pnh), ID=1)
Phs <- Polygons(list(Ph), ID=1)



Then:
> Pnh at hole
[1] FALSE
> Ph at hole
[1] TRUE

> Pnhs at Polygons[[1]]@hole
[1] FALSE
> Phs at Polygons[[1]]@hole
[1] FALSE

It appears that the hole attribute has been lost??


sp_1.1-0
R 3.1.2

Thanks
-Don

-- 
Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062



More information about the R-sig-Geo mailing list