Re: [GRASS-dev] v.clean tool=break fails

2013-12-02 Thread Markus Metz
On Mon, Dec 2, 2013 at 4:21 AM, Martin Landa landa.mar...@gmail.com wrote:
 Hi Markus,

 2013/11/30 Markus Metz markus.metz.gisw...@gmail.com:

 How did you discover that bug in Vect_merge_lines()? To my knowledge
 all modules calling Vect_merge_lines() set the correct type (lines
 and/or boundaries).

 by `v.clean tool=snap -c`, see [1].

Oops. Thanks for spotting this!

Markus M

 Martin

 [1] http://trac.osgeo.org/grass/browser/grass/trunk/vector/v.clean/main.c#L407
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] v.clean tool=break fails

2013-12-01 Thread Martin Landa
Hi Markus,

2013/11/30 Markus Metz markus.metz.gisw...@gmail.com:

 How did you discover that bug in Vect_merge_lines()? To my knowledge
 all modules calling Vect_merge_lines() set the correct type (lines
 and/or boundaries).

by `v.clean tool=snap -c`, see [1].

Martin

[1] http://trac.osgeo.org/grass/browser/grass/trunk/vector/v.clean/main.c#L407

-- 
Martin Landa landa.martin gmail.com * http://geo.fsv.cvut.cz/~landa
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] v.clean tool=break fails

2013-11-30 Thread Markus Metz
On Sat, Nov 30, 2013 at 12:26 PM, Martin Landa landa.mar...@gmail.com wrote:
 Hi all,

 recently I found problem when breaking lines using `v.clean`.

 I have a patched map that contains boundaries and centroids.

 $ v.info x3 -t
 nodes=8219
 points=0
 lines=0
 boundaries=11807
 centroids=4876
 areas=4875
 islands=1222
 primitives=16683
 map3d=0

 When I try to break lines on intersections `v.clean` fails because it
 tries to read nodes from centroids (which obviously fails).

 $ v.clean in=x3 out=x4 tool=break --o
 ...
 Tool: Break lines at intersections
 0..ERROR: Nodes not available for line 11725

 Defining `type` explicitly helps

 $ v.clean in=x3 out=x4 tool=break --o type=boundary

Fixed in r58340, please test.

Markus M
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] v.clean tool=break fails

2013-11-30 Thread Martin Landa
Hi Markus,

2013/11/30 Markus Metz markus.metz.gisw...@gmail.com:

[...]

 Tool: Break lines at intersections
 0..ERROR: Nodes not available for line 11725

 Defining `type` explicitly helps

 $ v.clean in=x3 out=x4 tool=break --o type=boundary

 Fixed in r58340, please test.

thanks for super-quick fix! It seems to be OK, I found similar problem
in `merge_lines.c` (see the attached patch).

Martin

-- 
Martin Landa landa.martin gmail.com * http://geo.fsv.cvut.cz/~landa
Index: lib/vector/Vlib/merge_lines.c
===
--- lib/vector/Vlib/merge_lines.c   (revision 58340)
+++ lib/vector/Vlib/merge_lines.c   (working copy)
@@ -111,7 +111,7 @@
Line = Plus-Line[line];
ltype = Line-type;
 
-   if (!(ltype  type))
+   if (ltype  GV_POINTS || !(ltype  type))
continue;

Vect_read_line(Map, NULL, MCats, line);
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] v.clean tool=break fails

2013-11-30 Thread Markus Metz
On Sat, Nov 30, 2013 at 6:02 PM, Martin Landa landa.mar...@gmail.com wrote:
 Hi Markus,

 2013/11/30 Markus Metz markus.metz.gisw...@gmail.com:

 [...]

 Tool: Break lines at intersections
 0..ERROR: Nodes not available for line 11725

 Defining `type` explicitly helps

 $ v.clean in=x3 out=x4 tool=break --o type=boundary

 Fixed in r58340, please test.

 thanks for super-quick fix! It seems to be OK, I found similar problem
 in `merge_lines.c` (see the attached patch).

How did you discover that bug in Vect_merge_lines()? To my knowledge
all modules calling Vect_merge_lines() set the correct type (lines
and/or boundaries).

Markus M
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev