v.net.alloc.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <h2>DESCRIPTION</h2>
  2. <em>v.net.alloc</em> allocates subnets for nearest centres (direction from
  3. centre). Centre node must be opened (costs &gt;= 0). Costs of centre node are
  4. used in calculation. Supported are cost assignments for both arcs and nodes,
  5. and also different in both directions of a vector line. For areas cost will
  6. be calculated along boundary lines.
  7. <h2>NOTES</h2>
  8. Center nodes have to be assigned to vector nodes
  9. using <em><a href="wxGUI.Vector_Digitizing_Tool.html">wxGUI vector
  10. digitizer</a></em>. Nodes and arcs can be closed using cost = -1.
  11. <h2>EXAMPLES</h2>
  12. Example 1: <em>Calculating subnets for 3 centre nodes using distances</em>
  13. <div class="code"><pre>
  14. #Spearfish
  15. # centre nodes:
  16. echo "591235.5|4926306.62|1
  17. 596591.8|4917042.5|2
  18. 602722.9|4923544.2|3" | v.in.ascii out=centrenodes
  19. g.copy vect=roads,myroads
  20. #connect points to network
  21. v.net myroads points=centrenodes out=myroads_net op=connect thresh=200
  22. # view map
  23. g.region vect=myroads_net
  24. d.mon x0
  25. d.vect myroads_net
  26. d.vect myroads_net col=red icon=basic/triangle fcol=green size=12 layer=2
  27. # allocate, specifying range of center cats (easier to catch all):
  28. v.net.alloc myroads_net out=myroads_net_alloc ccats=1-100000 nlayer=2
  29. # report categories
  30. v.category myroads_net_alloc option=report
  31. # the result has to be selected by category number of the relevant node:
  32. d.vect myroads_net_alloc cat=1 col=red
  33. d.vect myroads_net_alloc cat=2 col=green
  34. d.vect myroads_net_alloc cat=3 col=yellow
  35. d.vect myroads_net col=red icon=basic/triangle fcol=green size=12 layer=2
  36. </pre></div>
  37. <p>
  38. <img src="v_net_alloc.png" alt="v.net.alloc example" border="1">
  39. <p>
  40. Example 2: <em>Calculating subnets for 7 centre nodes using cost assigned to vector length
  41. </em><br>
  42. <div class="code"><pre>
  43. v.net.alloc in=vectmap out=vectmap.alloc ccats=1-7
  44. </pre></div>
  45. <p>
  46. Example 3: <em>Calculating subnets for 7 centre nodes using cost assignments in both
  47. directions</em><br>
  48. <div class="code"><pre>
  49. v.net.alloc in=vectmap afcol=INDEX abcol=INDEXBACK out=vectmap.alloc ccats=1-7
  50. </pre></div>
  51. <h2>SEE ALSO</h2>
  52. <em><a HREF="d.path.html">d.path</a></em>,
  53. <em><a HREF="v.net.html">v.net</a></em>,
  54. <em><a HREF="v.net.iso.html">v.net.iso</a></em>,
  55. <em><a HREF="v.net.path.html">v.net.path</a></em>,
  56. <em><a HREF="v.net.steiner.html">v.net.steiner</a></em>,
  57. <em><a HREF="v.net.salesman.html">v.net.salesman</a></em>
  58. <h2>AUTHOR</h2>
  59. Radim Blazek, ITC-Irst, Trento, Italy
  60. <p><i>Last changed: $Date$</i>