[GRASS-dev] [GRASS GIS] #372: v.net.iso, v.net.path: error when using it with cost point (ncolumn)

GRASS GIS trac at osgeo.org
Wed Nov 7 07:57:46 PST 2012


#372: v.net.iso, v.net.path: error when using it with cost point (ncolumn)
----------------------------------+-----------------------------------------
 Reporter:  paoloC                |       Owner:  grass-dev@…              
     Type:  defect                |      Status:  new                      
 Priority:  major                 |   Milestone:  6.4.3                    
Component:  Default               |     Version:  svn-develbranch6         
 Keywords:  v.net.iso nodes cost  |    Platform:  Linux                    
      Cpu:  Unspecified           |  
----------------------------------+-----------------------------------------
Changes (by mlennert):

  * keywords:  => v.net.iso nodes cost


Comment:

 The bug is still in issue in all versions. See [1] for the original
 postings on the mailing list (the nabble link provided by the OP is dead).

 Here's how to reproduce in trunk with the NC data:

 {{{
 v.net roadsmajor poi=schools_wake thresh=500 op=connect out=network
 v.db.addtable network layer=2 col="cat integer, cost integer"
 echo "update network_2 set cost=1" | db.execute in=-
 v.net.iso in=network out=isocost alayer=1 nlayer=2 ncolumn=cost ccats=1-10
 cost=5000,10000,20000
 }}}

 The error is

 {{{
 Setting node costs...
 ERREUR :Requested feature id 0 is not reasonable(max features in vector
 map
         <network at user1>: 457)
 }}}

 The error does not appear when v.net.iso is run without the ncolumn
 option.

 The issue is in lib/vector/Vlib/net.c the for-loop starting line 377,
 based on the number of nodes (nnodes) retrieved from the map in line 133
 with Vect_get_num_nodes(Map). This gives a number of nodes which at one
 point leads to the error. Using DEBUG=2, I can see that the problem arises
 with node 265. Replacing the nnodes variable in the loop definition with
 264, the module runs.

 I still have to figure out what exactly this number of nodes represents
 (well, I know it is the number of nodes you also get as output of v.build
 network) and what it is used for here, but it certainly is not related to
 the nodes (i.e. the schools) I added with the v.net command.

 MarkusN, do you have a quick idea on this ? Otherwise, I'll continue
 looking.

 Moritz



 [1] http://lists.osgeo.org/pipermail/grass-user/2008-November/047624.html

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/372#comment:3>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list