[GRASS-dev] v.net.allpairs seems broken

Moritz Lennert mlennert at club.worldonline.be
Mon Oct 8 08:28:49 PDT 2012


On 07/10/12 09:12, Michael Barton wrote:
> v.net.allpairs only produces nodes. It calculates the cost of the
> shortest paths between all nodes but does not create the paths. Is this
> correct? Seems like it also ought to create the paths too.

In 6.4.2 I get an alloc error:

v.net.allpairs  street_schools out=allpaths cats=5000-50009
ERREUR :G_calloc: unable to allocate 42020 * 4 bytes at main.c:173

Don't have the time to look into this at the moment.

In trunk I get it to work. There was an issue with many of the v.net 
modules that came out of GSoC: they did not distinguish between an arc 
and a node layer. Maybe that's the reason for the G_calloc issue.

In trunk, the result is a vector map of nodes with an attribute table 
linked to these nodes which provides a distance matrix across the 
network for all pairs of nodes.

I agree that this is suboptimal output. I think the following outputs 
would be interesting:

- a table with the distance matrix, but this does not have to be linked 
to a map (cf v.distance table option)
- a map with all the paths

I would guess that the code is in the v.net modules (notably v.net.path) 
to easily create a map of paths. MarkusM ?

I guess it's time for an enhancement ticket.

Moritz


More information about the grass-dev mailing list