[GRASS-SVN] r32384 - in grass/trunk: include lib/vector
lib/vector/Vlib vector/v.edit
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jul 30 10:56:40 EDT 2008
Author: martinl
Date: 2008-07-30 10:56:40 -0400 (Wed, 30 Jul 2008)
New Revision: 32384
Modified:
grass/trunk/include/Vect.h
grass/trunk/lib/vector/Vlib/break_lines.c
grass/trunk/lib/vector/vectorlib.dox
grass/trunk/vector/v.edit/main.c
Log:
vlib: fix accidently committed changes r32381 -- change Vect_break_lines_list()
Modified: grass/trunk/include/Vect.h
===================================================================
--- grass/trunk/include/Vect.h 2008-07-30 14:31:09 UTC (rev 32383)
+++ grass/trunk/include/Vect.h 2008-07-30 14:56:40 UTC (rev 32384)
@@ -270,7 +270,7 @@
/* Cleaning */
void Vect_break_lines ( struct Map_info *, int, struct Map_info *, FILE * );
-int Vect_break_lines_list (struct Map_info *, struct ilist *, int, struct Map_info *, FILE *);
+int Vect_break_lines_list (struct Map_info *, struct ilist *, struct ilist *, int, struct Map_info *, FILE *);
void Vect_break_polygons ( struct Map_info *, int, struct Map_info *, FILE * );
void Vect_remove_duplicates ( struct Map_info *, int, struct Map_info *, FILE * );
int Vect_line_check_duplicate ( const struct line_pnts *,
@@ -283,8 +283,8 @@
void Vect_remove_bridges ( struct Map_info *, struct Map_info *, FILE * );
void Vect_chtype_bridges ( struct Map_info *, struct Map_info *, FILE * );
int Vect_remove_small_areas ( struct Map_info *, double, struct Map_info *, FILE *, double * );
-int Vect_clean_small_angles_at_nodes ( struct Map_info *Map, int type, struct Map_info *Err,
- FILE *msgout);
+int Vect_clean_small_angles_at_nodes ( struct Map_info *, int, struct Map_info *,
+ FILE *);
/* Overlay */
int Vect_overlay_str_to_operator ( const char * );
Modified: grass/trunk/lib/vector/Vlib/break_lines.c
===================================================================
--- grass/trunk/lib/vector/Vlib/break_lines.c 2008-07-30 14:31:09 UTC (rev 32383)
+++ grass/trunk/lib/vector/Vlib/break_lines.c 2008-07-30 14:56:40 UTC (rev 32384)
@@ -51,6 +51,9 @@
The function also breaks lines forming collapsed loop, for example
0,0;1,0;0,0 is broken at 1,0.
+ If reference lines are given (<i>List_ref</i>) break only lines
+ which intersect reference lines.
+
\param Map input vector map
\param List_break list of lines (NULL for all lines in vector map)
\param List_ref list of reference lines or NULL
@@ -247,7 +250,9 @@
Vect_line_prune ( AXLines[k] );
if ( (atype & GV_POINTS) || AXLines[k]->n_points > 1 ) {
ret = Vect_write_line ( Map, atype, AXLines[k], ACats );
- Vect_list_append(List_ref, ret);
+ if (List_ref) {
+ Vect_list_append(List_ref, ret);
+ }
G_debug (3, "Line %d written, npoints = %d", ret, AXLines[k]->n_points);
if (List_break) {
Vect_list_append(List_break, ret);
Modified: grass/trunk/lib/vector/vectorlib.dox
===================================================================
--- grass/trunk/lib/vector/vectorlib.dox 2008-07-30 14:31:09 UTC (rev 32383)
+++ grass/trunk/lib/vector/vectorlib.dox 2008-07-30 14:56:40 UTC (rev 32384)
@@ -947,6 +947,7 @@
Vect_break_lines();
+Vect_break_lines_list();
\section break_polygons Vector break_polygons functions
Modified: grass/trunk/vector/v.edit/main.c
===================================================================
--- grass/trunk/vector/v.edit/main.c 2008-07-30 14:31:09 UTC (rev 32383)
+++ grass/trunk/vector/v.edit/main.c 2008-07-30 14:56:40 UTC (rev 32384)
@@ -303,7 +303,7 @@
coord, thresh[THRESH_COORDS], NULL);
}
else {
- ret = Vect_break_lines_list(&Map, List,
+ ret = Vect_break_lines_list(&Map, List, NULL,
GV_LINES, NULL, NULL);
}
G_message(_("%d lines broken"), ret);
More information about the grass-commit
mailing list