[GRASS-dev] [GRASS GIS] #2231: v.split not working in expecting way

GRASS GIS trac at osgeo.org
Thu Jun 11 10:20:57 PDT 2015


#2231: v.split not working in expecting way
--------------------------+---------------------------------
  Reporter:  vasile       |      Owner:  grass-dev@…
      Type:  enhancement  |     Status:  new
  Priority:  major        |  Milestone:  7.0.0
 Component:  Vector       |    Version:  svn-releasebranch70
Resolution:               |   Keywords:  v.split
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+---------------------------------

Comment (by mlennert):

 Replying to [comment:1 neteler]:
 > A flag to enforce the user provided line length would be much
 appreciated.

 Try the attached patch.

 Without the -f flag:


 {{{
 v.split in=line_test out=line_test_split length=10 units=kilometers --o &&
 v.category in=line_test_split out=temp1 op=del cat=-1 --o && v.category
 in=temp1 out=line_test_cats op=add --o && v.to.db -p map=line_test_cats
 op=length

 cat|length
 1|9398.52863332647
 2|9398.52863332655
 3|9398.52863332647
 4|9398.52863332647
 5|9398.52863332655
 6|9398.52863332647
 7|9398.52863332656
 8|9398.52863332645
 }}}

 With the -f flag:

 {{{
 v.split -f in=line_test out=line_test_split length=10 units=kilometers --o
 && v.category in=line_test_split out=temp1 op=del cat=-1 --o && v.category
 in=temp1 out=line_test_cats op=add --o && v.to.db -p map=line_test_cats
 op=length

 1|9999.99999999995
 2|10000.0000000001
 3|9999.99999999995
 4|10000.0000000001
 5|9999.99999999995
 6|10000
 7|9999.99999999995
 8|5188.22906661201
 }}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2231#comment:2>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list