Skip to content
Back to formatted view

Raw Message

Message-ID: <alpine.LRH.2.00.0901200901240.17261@reclus.nhh.no>
Date: 2009-01-20T08:05:58Z
From: Roger Bivand
Subject: conversion from tessellation in spatstat package to sp classes ???
In-Reply-To: <8b5938320901191343r5239c097mdd9c80741a0bac57@mail.gmail.com>

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