[R-sig-Geo] conversion from tessellation in spatstat package to sp classes ???

Roger Bivand Roger.Bivand at nhh.no
Tue Jan 20 09:05:58 CET 2009


On Mon, 19 Jan 2009, Volkan Kepoglu wrote:

> Is there any way to convert from tessellation to sp classes like
> SpatialLines or SpatialPolygons?
>
> library(spatstat)
> library(maptools)
> x <- runifpoint(42)
> t <- dirichlet(x)
> plot(t)
> plot(x, add=TRUE)
>
> sp <- as(t, "SpatialPolygons")
> Error in .classEnv(thisClass) :
>  unable to find an environment containing class "tess"
>
> any other suggestion?

Contributions welcome! The "tess" object has several different forms, each 
of which will need a different method. My guess would be that coercing to 
owin first, and coding the next coercion step(s) - there are also several 
types of owin - would work, but there are more methods available now from 
sp classes to spatstat classes than the reverse.

Roger

>
> _______________________________________________
> 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