[GRASS-user] v.split: Strange behaviour

Hi

I have a vector map where many lines have vertices. I wish to replace all vertices with nodes, so I tried:
v.split in=sewer_SS out=sewer_split ver=2

The output is not what I expect in two respects:
1. The attribute table has been dropped.
2. I find that many lines are sharing the same cat, when cat should be unique. Some of the lines with a common cat are not even connected to the others.

I am puzzled! Can anyone shed some light on what's going on here? I am using 6.3.0RC3 and sqlite.

Regards

Craig.

hi,

what about v.edit ?

# new file with vertexes
v.to.points in=roads out=tmp -v

# copy original file
g.copy vect=roads,myroads

# run v.edit
for line in `v.out.ascii tmp`; do
     eval `echo $line|sed -e "s/^/x=/" -e "s/|/; y=/" -e "s/|.*//"`;
     echo $line;
     v.edit -t map=myroads tool=break coords=$x,$y >/dev/null 2>&1;
done

well, it is not the best solution, but seems to work, but it failed for
me after 39 vertexes :-/

jachym

Craig Leat píše v Po 18. 02. 2008 v 12:08 +0200:

Hi

I have a vector map where many lines have vertices. I wish to replace
all vertices with nodes, so I tried:
v.split in=sewer_SS out=sewer_split ver=2

The output is not what I expect in two respects:
1. The attribute table has been dropped.
2. I find that many lines are sharing the same cat, when cat should be
unique. Some of the lines with a common cat are not even connected to
the others.

I am puzzled! Can anyone shed some light on what's going on here? I am
using 6.3.0RC3 and sqlite.

Regards

Craig.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

--
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub

Jachym Cepicky wrote:

hi,

what about v.edit ?

# new file with vertexes
v.to.points in=roads out=tmp -v

# copy original file
g.copy vect=roads,myroads

# run v.edit
for line in `v.out.ascii tmp`; do eval `echo $line|sed -e "s/^/x=/" -e "s/|/; y=/" -e "s/|.*//"`; echo $line; v.edit -t map=myroads tool=break coords=$x,$y >/dev/null 2>&1; done

well, it is not the best solution, but seems to work, but it failed for
me after 39 vertexes :-/
  
Hi Jachym

An interesting idea - thanks for the suggestion. I have found many problems with my table (e.g one record pointing to many lines and some records not pointing to any lines) so I decided to dump the table and start from scratch. v.split worked well and so I have been able to clean up the lines quite easily. I think the ability for v.split to update the table by creating new records for each new line segment would be a GREAT feature.

Regards

Craig