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

Moritz Lennert mlennert at club.worldonline.be
Tue Oct 16 01:12:25 PDT 2012


On 08/10/12 18:18, Moritz Lennert wrote:
> On 08/10/12 18:09, Markus Metz wrote:

>> I agree. Even though I regard the output of v.net.allpairs in GRASS 6
>> as nearly unusable, the memory allocation error should be fixed, which
>> would be a separate ticket.
>
> I'll try to find the time to write a nice reproducible bug...

Well, actually, the error only appears in 6.4.2, but not in 6.4 release 
branch. Here's what I did:

v.category schools_wake out=schools op=sum cat=50000
v.net streets_wake points=schools op=connect thresh=200 out=network nlayer=1
v.net.allpairs network cats=50000-50167 out=allpairs

Works fine relase branch, but in 6.4.2 I get:

Flattening the graph...
Graph was built
ERROR: G_calloc: unable to allocate 42122 * 4 bytes at main.c:173

But, not worth filing a ticket as it already seems solved.

However, we should probably put a hint into the v.net man page and/or 
the relevant modules man pages that all modules that were coded by 
Daniel do not differentiate alayer and nlayer in the grass6 line and so 
you have to differentiate them by cat numbers in the map.

Or we decide to break the rule to not change options and backport the 
alayer/nlayer patches from grass 7 to grass 6, as it is such an obvious 
design flaw compared to the general logic of the v.net.* modules.

What do you think ?

Moritz


More information about the grass-dev mailing list