[R-sig-Geo] Circles as polygons?

Karl Ove Hufthammer karl at huftis.org
Mon Apr 4 11:26:50 CEST 2011

Alexandre Villers wrote:

> Have a look at the disc() function in spatstat. I guess you can then
> either do what you aim at directly with spatstat, or after converting
> spatstat objects to sp class with maptools appropriate functions.

You can also use ’gBuffer’ in the new ’rgeos’ package. This turns 
SpatialPoints into SpatialPolygons (circles), and works directly on ’sp’ 
objects, without any need for conversion.

Make sure the data is in an appropriate projection (e.g., a UTM projection), 
as ‘circles’ generated on unprojected points (i.e., points with coordinates 
given in longitude and latitude) are *not* circles, unless all your data lie 
on the equator.

Karl Ove Hufthammer

More information about the R-sig-Geo mailing list