[R-sig-Geo] PBSmapping calcArea
Kenny Bell
kmb56 at berkeley.edu
Thu Sep 25 00:00:27 CEST 2014
Hi all,
I am trying to use calcArea to get the areas of the following polygons at
the following link:
https://www.dropbox.com/s/v1fjsdkcyxw61qt/rsiggeoQ.RData?dl=0
I use:
library(PBSmapping)
areaY <- calcArea(smallYPolySet, rollup = 2)
which gives the output:
> areaY
PID SID area
1 1 1 38.7704526
2 2 1 116.6810084
3 2 2 0.9844843
The second polygon has a hole which can be seen with:
plotLines(smallYPolySet)
However, the rollup = 2 option should see the hole and subtract the area
and return the difference, as I understand. The above shows they are
specified separately.
Can someone help me with any/all of:
1) working out whether the hole is identified in the smallYPolySet object
2) flagging an element of a polyset as a hole
2) automatically determining if a polygon is a hole
Any help would be very much appreciated!
Thanks,
Kenny
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list