Hi,


I'm using gdistance to  determine optimal wildlife corridors. My transition
layer's name is rognes.t, rognes being a city  name.

I want to determine a corridor between two major ecologic niches with
centroids coordinates A and B.

But when launching shortestPath, i get the following error:
> rognes.t = transition(rognes.r, transitionFunction = mean, directions=8)
> A = c(887543,6286048)
> B = c(890911,6289681)
> path = shortestPath(rognes.t, A, B, output="SpatialLines")
Erreur dans .local(obj, ...) :
cannot derive coordinates from non-numeric matrix
De plus : Message d'avis :
In get.shortest.paths(adjacencyGraph, indexOrigin, indexGoal) :
At structural_properties.c:42

My transitionMatrix has these characteristics:
> min(transitionMatrix(rognes.t)); max(transitionMatrix(rognes.t));
mean(transitionMatrix(rognes.t))
[1] 0
[1] 100
[1] 0.0009044702

All values are numeric..


Any help would be greatly appreciated,

mathieu

	[[alternative HTML version deleted]]

