[GRASS-SVN] r48174 - grass/trunk/vector/v.edit
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Sep 6 20:29:53 EDT 2011
Author: martinl
Date: 2011-09-06 17:29:53 -0700 (Tue, 06 Sep 2011)
New Revision: 48174
Modified:
grass/trunk/vector/v.edit/args.c
grass/trunk/vector/v.edit/main.c
Log:
v.edit: type=boundary defines SF Polygon type
Modified: grass/trunk/vector/v.edit/args.c
===================================================================
--- grass/trunk/vector/v.edit/args.c 2011-09-06 19:01:01 UTC (rev 48173)
+++ grass/trunk/vector/v.edit/args.c 2011-09-07 00:29:53 UTC (rev 48174)
@@ -22,6 +22,7 @@
params->fld->guisection = _("Selection");
params->type = G_define_standard_option(G_OPT_V_TYPE);
+ params->type->options = "point,line,boundary,centroid";
params->type->guisection = _("Selection");
params->tool = G_define_option();
Modified: grass/trunk/vector/v.edit/main.c
===================================================================
--- grass/trunk/vector/v.edit/main.c 2011-09-06 19:01:01 UTC (rev 48173)
+++ grass/trunk/vector/v.edit/main.c 2011-09-07 00:29:53 UTC (rev 48174)
@@ -96,9 +96,9 @@
int type;
type = Vect_option_to_types(params.type);
if (type != GV_POINT && type != GV_LINE &&
- type != GV_AREA)
+ type != GV_BOUNDARY)
G_fatal_error(_("Supported feature type for OGR layer: "
- "%s, %s or %s"), "point", "line", "area");
+ "%s, %s or %s"), "point", "line", "boundary");
V2_open_new_ogr(&Map, type);
}
if (ret == -1) {
@@ -260,8 +260,11 @@
G_verbose_message(_("Threshold value for snapping is %.2f"),
thresh[THRESH_SNAP]);
- if (snap != NO_SNAP) { /* apply snapping */
- Vedit_snap_lines(&Map, BgMap, nbgmaps, List_added, thresh[THRESH_SNAP], snap == SNAP ? 0 : 1); /* snap to vertex ? */
+ if (snap != NO_SNAP) { /* apply snapping */
+ /* snap to vertex ? */
+ Vedit_snap_lines(&Map, BgMap, nbgmaps, List_added,
+ thresh[THRESH_SNAP],
+ snap == SNAP ? FALSE : TRUE);
}
if (params.close->answer) { /* close boundaries */
int nclosed;
More information about the grass-commit
mailing list