[GRASS-user] Count points in a network between two locations

Markus Metz markus.metz.giswork at gmail.com
Fri Feb 1 10:55:57 PST 2013


On Fri, Feb 1, 2013 at 6:39 PM, Moritz Lennert
<mlennert at club.worldonline.be> wrote:
> On 01/02/13 11:44, Johannes Radinger wrote:
>>
>> Thank you, that might work. I just realized that my permeabilities are
>> given as probability and they are added up by a multiplication rule. Thus
>> I don't need the sum but rather the product or at least a list of all
>> barries
>> between to sampling stations....
>
>
> At this stage costs can only be summed AFAIK.
>
>
>> thats what I tried now, v.distance to get from barriers to nearest
>> vector lines from v.net.allpairs,
>>   but the problem is that the v.net.allpairs lines are partly
>> overlapping (sharing parts). So there
>> are several barriers on partly overlapping lines, but I want to select
>> all barriers per line category.
>
>
>
> IIUC v.net.allpairs actually creates several duplicate segments which seems
> contrary to GRASS topology rules.

GRASS topology supports overlapping lines.

> Shouldn't these rather be represented by
> single segments with multiple category values (like v.buffer in grass7) ?

Yes, but only if the segment directions are also identical. For
example, if backward direction costs are identical to forward
direction costs, the path from node A to node B is a duplicate of the
path from node B to node A, but in reverse direction.
>
>
>> So, a solution could be to loop over the all lines (categories) and
>> use v.select as
>> v.select does not have any option for stratified selection (e.g. per
>> category)...
>> I'll try that now, but any other recommendations are mostly welcome...
>
>
> How about v.distance -a to get a complete distance matrix between nodes and
> paths and then select those elements where distance = 0 (supposing that you
> snapped the nodes onto the network) ?

Another idea would be to look at linear referencing, the v.lrs.* modules.

Markus M


More information about the grass-user mailing list