Pascal,

I assume you have a SpatialPolygons* object (it is not relevant to know if
it was created from a shapefile).

You can use spTransform (rgdal package) to project it to a coordinate
reference system (CRS) that has, e.g., meters as mapunits.  For example, UTM
might work if the area covered does not span more than a few degrees in EW
direction.

After that you can use rgeos to create the buffer, and then transform the
new object back to CRS("+proj=longlat +datum=WGS84).

A sloppy approach would be to estimate the size of the buffer in degrees
(e.g. with spDistsN1 (sp) or with various functions in the geosphere
package). This is problematic because the length of 1 degree is constant in
NS direction, but varies with latitude in EW direction.

Best, Robert


On Sat, Aug 20, 2011 at 5:28 PM, Pascal Title <pascaltitle@gmail.com> wrote:

> Hi
>
> I have a polygon shapefile that is NAD83 and described in longitude and
> latitude. I would like to create a buffer around this polygon, with the
> buffer distance defined in meters.
> I am using the gBuffer function from the rgeos package, but I do not know
> what units the function is expecting. How can I define the units of the
> distance I input?
> Any help or advice would be greatly appreciated!
> Thanks!
>
> -Pascal
>
> --
> Pascal Title
>
> Graduate Student
> Burns Lab
> Department of Evolutionary Biology
> San Diego State University
> 5500 Campanile Drive
> San Diego, CA 92182-4614
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]

