Thanks for the answer.

Otherwise, would you have any idea on how to convert a psp to a
SpatialLines object?

2011/11/15 Roger Bivand <Roger.Bivand@nhh.no>

> On Tue, 15 Nov 2011, Mathieu Rajerison wrote:
>
>  Hi,
>>
>>
>> I've generated random segment patterns with spatstat::rpoisline so as to
>> plot differences of profile lines between two different digital elevation
>> models.
>>
>> Now, I want to use raster::extract function to get the raster values on
>> both rasters for each segment but for this, I have to coerce a psp to a
>> SpatialLines object but I don't know how to do the coercion. (SpatialLines
>> to psp is OK).
>> as(psp, "SpatialLines") doesn't seem to work.
>>
>
> The coercion functions in maptools, contributed by Adrian Baddeley, go
> from SpatialLines to psp, not the reverse. You need to create the set of
> coercion methods to go the other way - contributions welcome!
>
> Roger
>
>
>>
>> Any help would be appreciated,
>>
>> Mathieu
>>
>>        [[alternative HTML version deleted]]
>>
>> ______________________________**_________________
>> R-sig-Geo mailing list
>> R-sig-Geo@r-project.org
>> https://stat.ethz.ch/mailman/**listinfo/r-sig-geo<https://stat.ethz.ch/mailman/listinfo/r-sig-geo>
>>
>>
> --
> Roger Bivand
> Department of Economics, NHH Norwegian School of Economics,
> Helleveien 30, N-5045 Bergen, Norway.
> voice: +47 55 95 93 55; fax +47 55 95 95 43
> e-mail: Roger.Bivand@nhh.no
>
>

	[[alternative HTML version deleted]]

