[R-sig-Geo] manipulate SpatialPolygons object

T.O. Richardson Tom.Richardson at bristol.ac.uk
Sat Jan 8 19:35:32 CET 2011


Hi list,

I have a SpatialPolygons object, 'HR_polygons' which may be composed of 
several disjoint polygons. Thus
length(HR_polygons[[1]]@polygons) is often > 1.
I sum the area across all the disjoint polygons to get the total area; 
'blob_area'.

How should I accomplish the following?:
- Enlarge or shrink the HR_polygons object (scaling all of the disjoint 
areas by an identical factor) such that it's blob_area reaches a new value- 
either larger (magnify) or smaller (shrink) than the original.

In this way the shape of HR_polygons is preserved, but the coordinates 
defining its edges will change completely. If the original HR_polygons 
contains > 1 disjoint areas , a magnification could conceivably cause the 
disjoint areas to overlap- that is fine.


Thanks
Tom






-----------------------------------------------
Dept. of Maths and Stats, UWE and Ant Lab, Bristol

Room B79.
SoBS, Woodland Rd. BS8 1UG.
+44 (0)117 928 8443



More information about the R-sig-Geo mailing list