[GRASS-dev] v.split: what is 'vertices' for?

I haven't found anything relevant in the manual, lists archives, the BT
or the source code, so I'm asking here.

There is a straight line made of only 2 nodes:

$ v.info -t line
nodes=2
points=0
lines=1
boundaries=0
centroids=0
areas=0
islands=0
faces=0
kernels=0
primitives=1
map3d=0

And it has a category assigned:

$ v.category -g line option=report
1 line 1 1 1

I want to add a vertex to it.

According to the manual:

  length=float
  Maximum segment length.

  vertices=integer
  Maximum number of vertices in segment.

There are 2 vertices (nodes) currently. Trying to add a vertex between
them:

$ v.split input=line output=line_split vertices=3

Checking line_split in v.digit proves there are still only 2 vertices -
the nodes themselves; the 3rd vertex in not added.

No matter what is the 'vertices' set to, the outcome is the same. Is
that OK? What am I missing to understand what is the 'vertices' option for?

Maciek

P.S.
Please don't suggest workarounds and stuff. I only want to know what's
up with v.split.

Maciej Sieczka wrote:

I haven't found anything relevant in the manual, lists archives, the
BT or the source code, so I'm asking here.

..

There are 2 vertices (nodes) currently. Trying to add a vertex between
them:

$ v.split input=line output=line_split vertices=3

Checking line_split in v.digit proves there are still only 2 vertices
- the nodes themselves; the 3rd vertex in not added.

No matter what is the 'vertices' set to, the outcome is the same. Is
that OK? What am I missing to understand what is the 'vertices' option
for?

v.split is acting correctly. As usual, more documentation needed.

The module breaks lines at verticies, it doesn't add verticies.

In Radim's vector TODO there is a bit about v.in.ogr needing v.split
built into it for huge polygons.

e.g., I have a long, high-resolution single boundary line of the
coastline. Some tools take a very long time to process (build) this. By
using v.split to break the same polygon into several connected boundary
lines (green "X" in v.digit) you can speed up processing 1000%.

Hamish

Hamish wrote:

Maciej Sieczka wrote:

I haven't found anything relevant in the manual, lists archives, the
BT or the source code, so I'm asking here.

.

There are 2 vertices (nodes) currently. Trying to add a vertex between
them:

$ v.split input=line output=line_split vertices=3

Checking line_split in v.digit proves there are still only 2 vertices
- the nodes themselves; the 3rd vertex in not added.

No matter what is the 'vertices' set to, the outcome is the same. Is
that OK? What am I missing to understand what is the 'vertices' option
for?

v.split is acting correctly.

As usual, more documentation needed.

The module breaks lines at verticies, it doesn't add verticies.

OK, now I get it. Works as you explained. Thanks!

Maybe if I have time on weekend I'll add and example with pictures.

Maciek