[R-sig-Geo] converting shapefile/polygon to psp

adrian at maths.uwa.edu.au adrian at maths.uwa.edu.au
Wed Feb 6 02:10:02 CET 2008


On Mon, 4 Feb 2008, Milton Cezar Ribeiro wrote:

> I have some shapefiles which contents are polygons and I would like to
> convert it to psp (spatstat) format, and after run crossdist.psp. I
> tryed several times without success. Any idea?

First convert the shapefile to an object of class "owin" (in spatstat)
using the coercion functions in 'maptools' or 'sp'.

Once you have an owin object, use as.psp() in 'spatstat' to convert the
polygon to a list of edges.

Adrian Baddeley




More information about the R-sig-Geo mailing list