I would like to know what kind of information an object of class Spatialpolygons
has versus an object of class Polygons
.
Asked
Active
Viewed 118 times
0
-
Any reason you cannot read the source code? – Dirk Eddelbuettel Jan 04 '10 at 20:04
-
2Have you tried investigating the two with the `str()` command? – Shane Jan 04 '10 at 20:38
1 Answers
2
If you open help pages for Polygon
or SpatialPolygons
(doesn't really matter, it will lead you to the same page), you can click on SpatialPolygons-class
and Polygons-class
links. There, you can see which slots each class contains.
Polygon-class
as an example:
Slots
ringDir:
Object of class "integer"; the ring direction of the ring (polygon) coordinates, holes are expected to be anti-clockwise
labpt:
Object of class "numeric"; an x, y coordinate pair forming the label point of the polygon
area:
Object of class "numeric"; the area of the polygon
hole:
Object of class "logical"; does the polygon seem to be a hole
coords:
Object of class "matrix"; coordinates of the polygon; first point should equal the last point

Roman Luštrik
- 69,533
- 24
- 154
- 197