Hi Basile,
If you work with large data, then you should definitively consider using
SAGA GIS. Here are some examples:
--
# download gridded data:
download.file(http://geomorphometry.org/sites/default/files/volcano_maungawhau.zip;,
destfile=paste(getwd(),
Hi Mathieu,
An easy workaround could be to convert each segment to a polygon doing a
very small buffer around each segment then use the overlay method to obtain
info in each of these polygon.
Arnaud
[[alternative HTML version deleted]]
___
Dear Arnaud,
This is actually on my todo list, a test with the polygon approach,
although I'm not sure how to start to polygonize the segments... But
in the end, that would allow a performance comparison with different
approaches (and that would also allow the calculation of the
I don't know. I can't reproduce your example, and a simple example on
the meuse data set:
library(sp)
library(fields)
data(meuse)
Tps(data.frame(meuse$x,meuse$y), meuse$zinc)
seemed to work. You could provide a reproducable example, or you could
contact the author(s) of the fields package, I
Or, if you want to use this approach for your problem (transforming a
line into a polygon and then rasterize), a solution would be to use the
function buffer from the package adehabitatMA (on RForge), which
calculates a buffer from a SpatialLines.
Best regards,
Clément.
On 10/03/2010 05:59
On Thu, Sep 30, 2010 at 9:57 PM, Mathieu Basille
basi...@ase-research.org wrote:
Dear Robert,
I just understood the interest of 'crosstab' with 'mask', this is pretty
neat! Thanks for the suggestion.
However, I can see some potential drawbacks with this approach: as my
objective is to
Dear Robert,
This is amazing! Exactly what I needed :)
I really want to thank you for this addition.
So far, I managed to make it work on a rather limited example (3
segments...):
r - raster(nrow=18, ncol=9)
r[] - rep(c(1, 2, 3, 4), c(40, 41, 40, 41))
cds1 - rbind(c(-50,0), c(0,60))
cds2 -
Dear list members,
I'm trying to compute characteristics along steps (i.e. segments between
two points), based on underlying raster maps. The steps originally come
from radiotracking data, converted to ltraj objects (adehabitat). The
idea is to compute (for example) the habitat composition
Dear Robert,
I just understood the interest of 'crosstab' with 'mask', this is pretty
neat! Thanks for the suggestion.
However, I can see some potential drawbacks with this approach: as my
objective is to describe each step (each segment), I should first cut
each 'SpatialLines' into a list of