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

Roger Bivand Roger.Bivand at nhh.no
Mon Feb 4 21:03:25 CET 2008


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

> Dear all,
>
> 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?

Look at the coercion function in maptools from SpatialPolygons to owin; 
see what needs to be changed to match psp; debug; contribute?

Note that touching polygons fail the topology test in spatstat, as they 
should. Seeing how a psp works should't be hard, it is effectively as 
described in:

https://stat.ethz.ch/pipermail/r-sig-geo/2008-January/003075

for making the lll matrix for distppll(), but as a data frame. You could 
use the marks to record which Polygons/Polygon object the segments belong 
to.

Roger

>
> Miltinho
>
>
>
> para armazenamento!
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list