<div dir="ltr">I wish I could add a log message to that commit. Since I have no admin rights to SVN... hopefully, this log message will help you prepare release news (used new tools/svnlog.sh from r70714):<br><br>r.timestamp: typo in the manual (backport r70666)<br>v.what: Fix the default distance threshold (backport r70637)<br>v.patch: build topology after appending (backport r70636)<br>v.edit: Fix the default threshold distance (backport r70635)<br>v.db.addtable: Check for duplicate column names (backport r70634)<br>v.to.db: Don't throw a fatal error when there are no features (backport r70633)<br>v.to.db: Fix r70633; Don't throw a fatal error when there are no features (backport r70706)<br>v.to.db: better check for Vect_cidx_get_num_cats_by_index (backport r70707)<br>v.to.db: findex > -1 (backport r70708)<br>v.distance: Fix separator in the manual (backport r70611)<br>v.distance: Update the manual; column= & -p are mutually exclusive (backport r70612)<br>v.distance: Define default column names for -p; Suppress compiler warnings (backport r70613)<br>v.distance: Don't create (0,0) points where no nearest points are found (backport r70614)<br>v.build.polylines: Activate the cats=same option; Remove compile warnings (backport r70599)<br>v.to.points: Don't interpolate for use=node according to the manual (backport r70589)<br>vedit: Remove a compile warning (backport r70586)<br>v.select: Avoid database warnings when no features are selected and copy an empty table (backport r70582)<br>vedit: Fix snapping to BgMap (backport r70537)<br>r.to.vect: Fix a couple of compile errors/warnings (backport r70509)<br>r.to.vect: Call the DB error handler before the vector handler to avoid busy database warnings<br><br>Reproduce this issue in the North Carolina sample dataset:<br> r.to.vect input=aspect output=aspect type=line<br><br>Any unthinned input raster will produce the same issue.<br>(backport r70506)<br>------------------------------------------------------------------------<br>r.to.vect: copyright year (backport r70709)<br>r.to.vect: Remove unnecessary parentheses (backport r70507)<br>r.topmodel, r.topidx: Fix links (backport r69139)<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 1, 2017 at 8:16 AM, Huidae Cho <span dir="ltr"><<a href="mailto:grass4u@gmail.com" target="_blank">grass4u@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ah! Sorry for the huge comment and I forgot to copy log messages. Backporting is always difficult for me ;)<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 1, 2017 at 7:51 AM, Martin Landa <span dir="ltr"><<a href="mailto:landa.martin@gmail.com" target="_blank">landa.martin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>2017-03-01 13:31 GMT+01:00 Martin Landa <<a href="mailto:landa.martin@gmail.com" target="_blank">landa.martin@gmail.com</a>>:<br>
> please *explain* your changes in log message next time. It's<br>
> flustrating for those who are preparing news page about release to dig<br>
> into such commits. Log message should help to understand what is<br>
> purpose of the commit.<br>
<br>
</span>Also spliting such huge commit into small commits would be good idea. Ma<br>
<div class="m_349760712396237090HOEnZb"><div class="m_349760712396237090h5"><br>
>> grass/branches/releasebranch_7<wbr>_2/raster/r.to.vect/areas_io.c<br>
>> grass/branches/releasebranch_7<wbr>_2/raster/r.to.vect/global.h<br>
>> grass/branches/releasebranch_7<wbr>_2/raster/r.to.vect/main.c<br>
>> grass/branches/releasebranch_7<wbr>_2/raster/r.topidx/<a href="http://r.topidx.ht">r.topidx.ht</a><wbr>ml<br>
>> grass/branches/releasebranch_7<wbr>_2/raster/r.topmodel/r.topmode<wbr>l.html<br>
>> grass/branches/releasebranch_7<wbr>_2/scripts/v.db.addtable/<a href="http://v.db.addtable.py" rel="noreferrer" target="_blank">v.db.<wbr>addtable.py</a><br>
>> grass/branches/releasebranch_7<wbr>_2/vector/v.build.polylines/ma<wbr>in.c<br>
>> grass/branches/releasebranch_7<wbr>_2/vector/v.build.polylines/wa<wbr>lk.c<br>
>> grass/branches/releasebranch_7<wbr>_2/vector/v.distance/main.c<br>
>> grass/branches/releasebranch_7<wbr>_2/vector/v.distance/v.distanc<wbr>e.html<br>
>> grass/branches/releasebranch_7<wbr>_2/vector/v.edit/main.c<br>
>> grass/branches/releasebranch_7<wbr>_2/vector/v.edit/max_distance.<wbr>c<br>
>> grass/branches/releasebranch_7<wbr>_2/vector/v.patch/main.c<br>
>> grass/branches/releasebranch_7<wbr>_2/vector/v.select/copy_tabs.c<br>
>> grass/branches/releasebranch_7<wbr>_2/vector/v.select/main.c<br>
>> grass/branches/releasebranch_7<wbr>_2/vector/v.to.db/main.c<br>
>> grass/branches/releasebranch_7<wbr>_2/vector/v.to.points/write.c<br>
>> grass/branches/releasebranch_7<wbr>_2/vector/v.what/main.c<br>
>> Log:<br>
>> Backport r70666, r70637, r70636, r70635, r70634, r70633, r70706, r70707, r70708, r70611, r70612, r70613, r70614, r70599, r70589, r70586, r70582, r70537, r70509, r70506, r70709, r70507, r69139<br>
>><br>
>><br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/lib/vector/vedit/break.c<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/lib/vector/vedit/break.c 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/lib/vector/vedit/break.c 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -247,12 +247,13 @@<br>
>> line_new = -1;<br>
>><br>
>> if (line_new > -1) {<br>
>> + n_points = Points_from->n_points - 1;<br>
>> +<br>
>> if (first) {<br>
>> x = Points_from->x[0];<br>
>> y = Points_from->y[0];<br>
>> }<br>
>> else {<br>
>> - n_points = Points_from->n_points - 1;<br>
>> x = Points_from->x[n_points];<br>
>> y = Points_from->y[n_points];<br>
>> }<br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/lib/vector/vedit/move.c<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/lib/vector/vedit/move.c 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/lib/vector/vedit/move.c 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -71,7 +71,7 @@<br>
>><br>
>> for (bgi = 0; bgi < nbgmaps; bgi++) {<br>
>> if (Vedit_snap_point<br>
>> - (BgMap[bgi], line, &x[j], &y[j], &z[j], thresh,<br>
>> + (BgMap[bgi], -1, &x[j], &y[j], &z[j], thresh,<br>
>> (snap == SNAPVERTEX) ? 1 : 0))<br>
>> break; /* snapped, don't continue */<br>
>> }<br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/lib/vector/vedit/vertex.c<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/lib/vector/vedit/vertex.c 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/lib/vector/vedit/vertex.c 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -115,7 +115,7 @@<br>
>><br>
>> for (bgi = 0; bgi < nbgmaps; bgi++) {<br>
>> if (Vedit_snap_point<br>
>> - (BgMap[bgi], line, &x[k], &y[k],<br>
>> + (BgMap[bgi], -1, &x[k], &y[k],<br>
>> &z[k], thresh_snap,<br>
>> (snap == SNAPVERTEX) ? 1 : 0))<br>
>> moved[k] = 2;<br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/raster/r.timestamp/r.timest<wbr>amp.html<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/raster/r.timestamp/r.timest<wbr>amp.html 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/raster/r.timestamp/r.timest<wbr>amp.html 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -15,7 +15,7 @@<br>
>><br>
>> The timestamp values must use the format as described in the <em>GRASS<br>
>> Datetime Library</em>. The source tree for this library should have a<br>
>> -description of the format. For convience, the formats are reproduced<br>
>> +description of the format. For convenience, the formats are reproduced<br>
>> here:<br>
>><br>
>> <p>There are two types of datetime values:<br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/raster/r.to.vect/areas_io.c<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/raster/r.to.vect/areas_io.c<wbr> 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/raster/r.to.vect/areas_io.c<wbr> 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -34,7 +34,7 @@<br>
>> int write_boundary(struct COOR *seed)<br>
>> {<br>
>> struct COOR *point, *line_begin, *line_end, *last;<br>
>> - int dir, line_type, n, n1, i;<br>
>> + int dir, line_type, n, n1;<br>
>><br>
>> point = seed;<br>
>> if ((dir = at_end(point))) { /* already have one end of line */<br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/raster/r.to.vect/global.h<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/raster/r.to.vect/global.h 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/raster/r.to.vect/global.h 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -104,7 +104,7 @@<br>
>> int extract_lines(void);<br>
>><br>
>> /* lines_io.c */<br>
>> -int write_line(struct COOR *seed);<br>
>> +int write_line(struct COOR *);<br>
>><br>
>> /* areas.c */<br>
>> int alloc_areas_bufs(int);<br>
>> @@ -112,7 +112,7 @@<br>
>> int more_equivs(void);<br>
>><br>
>> /* areas_io.c */<br>
>> -int write_boundary(struct COOR *seed);<br>
>> +int write_boundary(struct COOR *);<br>
>> int write_area(struct area_table *, struct equiv_table *, int, int);<br>
>><br>
>> /* points.c */<br>
>> @@ -124,4 +124,7 @@<br>
>> int at_end(struct COOR *);<br>
>> int read_row(void *);<br>
>> void insert_value(int, int, double);<br>
>> -int free_ptr(struct COOR *ptr);<br>
>> +int free_ptr(struct COOR *);<br>
>> +<br>
>> +/* set_error_handler.c */<br>
>> +void set_error_handler(struct Map_info *, dbDriver **);<br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/raster/r.to.vect/main.c<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/raster/r.to.vect/main.c 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/raster/r.to.vect/main.c 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -8,7 +8,7 @@<br>
>> *<br>
>> * PURPOSE: Converts a raster map into a vector map layer<br>
>> *<br>
>> - * COPYRIGHT: (C) 2007, 2011 by the GRASS Development Team<br>
>> + * COPYRIGHT: (C) 2007, 2011, 2017 by the GRASS Development Team<br>
>> *<br>
>> * This program is free software under the GNU General Public<br>
>> * License (>=v2). Read the file COPYING that comes with GRASS<br>
>> @@ -151,10 +151,11 @@<br>
>> G_warning(_("Categories will be unique sequence, raster values will be lost."));<br>
>> }<br>
>><br>
>> + set_error_handler(&Map, &driver);<br>
>> +<br>
>> if (Vect_open_new(&Map, out_opt->answer, z_flg->answer) < 0)<br>
>> G_fatal_error(_("Unable to create vector map <%s>"), out_opt->answer);<br>
>> - Vect_set_error_handler_io(NULL<wbr>, &Map);<br>
>> -<br>
>> +<br>
>> Vect_hist_command(&Map);<br>
>><br>
>> Cats = Vect_new_cats_struct();<br>
>> @@ -186,7 +187,6 @@<br>
>> if (driver == NULL)<br>
>> G_fatal_error(_("Unable to open database <%s> by driver <%s>"),<br>
>> Fi->database, Fi->driver);<br>
>> - db_set_error_handler_driver(dr<wbr>iver);<br>
>><br>
>> /* Create new table */<br>
>> db_zero_string(&sql);<br>
>><br>
>> Added: grass/branches/releasebranch_7<wbr>_2/raster/r.to.vect/set_error_<wbr>handler.c<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/raster/r.to.vect/set_error_<wbr>handler.c (rev 0)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/raster/r.to.vect/set_error_<wbr>handler.c 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -0,0 +1,33 @@<br>
>> +#include <grass/gis.h><br>
>> +#include <grass/vector.h><br>
>> +<br>
>> +struct handler_input<br>
>> +{<br>
>> + struct Map_info *Map;<br>
>> + dbDriver **driver;<br>
>> +};<br>
>> +<br>
>> +static void error_handler(void *p)<br>
>> +{<br>
>> + const struct handler_input *input = (const struct handler_input *)p;<br>
>> +<br>
>> + if (input->driver && *input->driver)<br>
>> + db_close_database_shutdown_dr<wbr>iver(*input->driver);<br>
>> + if (input->Map) {<br>
>> + char *name = G_store(input->Map->name);<br>
>> + if (input->Map->open == VECT_OPEN_CODE)<br>
>> + Vect_close(input->Map);<br>
>> + Vect_delete(name);<br>
>> + G_free(name);<br>
>> + }<br>
>> +}<br>
>> +<br>
>> +void set_error_handler(struct Map_info *Map, dbDriver **driver)<br>
>> +{<br>
>> + struct handler_input *input = G_malloc(sizeof(struct handler_input));<br>
>> +<br>
>> + input->Map = Map;<br>
>> + input->driver = driver;<br>
>> +<br>
>> + G_add_error_handler(error_hand<wbr>ler, input);<br>
>> +}<br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/raster/r.topidx/<a href="http://r.topidx.ht">r.topidx.ht</a><wbr>ml<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/raster/r.topidx/<a href="http://r.topidx.ht">r.topidx.ht</a><wbr>ml 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/raster/r.topidx/<a href="http://r.topidx.ht">r.topidx.ht</a><wbr>ml 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -23,7 +23,7 @@<br>
>> <a href="r.mapcalc.html">r.mapcal<wbr>c</a><br>
>> </em><br>
>> <br><br>
>> -<a href="<a href="http://idea.isnew.info/r.topidx" rel="noreferrer" target="_blank">http://idea.isnew.info/r<wbr>.topidx</a>">Known issues</a><br>
>> +<a href="<a href="http://idea.isnew.info/r.topidx.html" rel="noreferrer" target="_blank">http://idea.isnew.info/r<wbr>.topidx.html</a>">Known issues</a><br>
>><br>
>> <h2>REFERENCES</h2><br>
>><br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/raster/r.topmodel/r.topmode<wbr>l.html<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/raster/r.topmodel/r.topmode<wbr>l.html 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/raster/r.topmodel/r.topmode<wbr>l.html 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -152,7 +152,7 @@<br>
>> <a href="r.topidx.html">r.topidx<<wbr>/a><br>
>> </em><br>
>> <br><br>
>> -<a href="<a href="http://idea.isnew.info/r.topmodel" rel="noreferrer" target="_blank">http://idea.isnew.info/r<wbr>.topmodel</a>">How to run r.topmodel</a><br>
>> +<a href="<a href="http://idea.isnew.info/r.topmodel.html" rel="noreferrer" target="_blank">http://idea.isnew.info/r<wbr>.topmodel.html</a>">How to run r.topmodel</a><br>
>><br>
>><br>
>> <h2>AUTHORS</h2><br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/scripts/v.db.addtable/<a href="http://v.db.addtable.py" rel="noreferrer" target="_blank">v.db.<wbr>addtable.py</a><br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/scripts/v.db.addtable/<a href="http://v.db.addtable.py" rel="noreferrer" target="_blank">v.db.<wbr>addtable.py</a> 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/scripts/v.db.addtable/<a href="http://v.db.addtable.py" rel="noreferrer" target="_blank">v.db.<wbr>addtable.py</a> 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -86,7 +86,7 @@<br>
>> grass.verbose(_("Using user specified table name: %s") % table)<br>
>><br>
>> # check if DB parameters are set, and if not set them.<br>
>> - grass.run_command('db.connect'<wbr>, flags='c')<br>
>> + grass.run_command('db.connect'<wbr>, flags='c', quiet=True)<br>
>> grass.verbose(_("Creating new DB connection based on default mapset settings..."))<br>
>> kv = grass.db_connection()<br>
>> database = kv['database']<br>
>> @@ -106,15 +106,21 @@<br>
>> stderr=nuldev)<br>
>><br>
>> if not table in tables.splitlines():<br>
>> + colnames = []<br>
>> if columns:<br>
>> - column_def = [x.strip().lower() for x in columns.strip().split(',')]<br>
>> + column_def = []<br>
>> + for x in ' '.join(columns.lower().split()<wbr>).split(','):<br>
>> + colname = x.split()[0]<br>
>> + if colname in colnames:<br>
>> + grass.fatal(_("Duplicate column name '%s' not allowed") % colname)<br>
>> + colnames.append(colname)<br>
>> + column_def.append(x)<br>
>> else:<br>
>> column_def = []<br>
>><br>
>> # if not existing, create it:<br>
>> - column_def_key = "%s integer" % key<br>
>> - if column_def_key not in column_def:<br>
>> - column_def.insert(0, column_def_key)<br>
>> + if not key in colnames:<br>
>> + column_def.insert(0, "%s integer" % key)<br>
>> column_def = ','.join(column_def)<br>
>><br>
>> grass.verbose(_("Creating table with columns (%s)...") % column_def)<br>
>> @@ -133,10 +139,17 @@<br>
>> map=map_name, database=database, driver=driver,<br>
>> layer=layer, table=table, key=key)<br>
>><br>
>> - # finally we have to add cats into the attribute DB to make modules such as v.what.rast happy:<br>
>> - # (creates new row for each vector line):<br>
>> - grass.run_command('v.to.db', map=map_name, layer=layer,<br>
>> - option='cat', column=key, qlayer=layer)<br>
>> + # finally we have to add cats into the attribute DB to make<br>
>> + # modules such as v.what.rast happy: (creates new row for each<br>
>> + # vector line):<br>
>> + try:<br>
>> + grass.run_command('v.to.db', map=map_name, layer=layer,<br>
>> + option='cat', column=key, qlayer=layer)<br>
>> + except CalledModuleError:<br>
>> + # remove link<br>
>> + grass.run_command('v.db.connec<wbr>t', quiet=True, flags='d',<br>
>> + map=map_name, layer=layer)<br>
>> + return 1<br>
>><br>
>> grass.verbose(_("Current attribute table links:"))<br>
>> if grass.verbosity() > 2:<br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/vector/v.build.polylines/ma<wbr>in.c<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/vector/v.build.polylines/ma<wbr>in.c 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/vector/v.build.polylines/ma<wbr>in.c 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -97,7 +97,6 @@<br>
>><br>
>> int polyline;<br>
>> int *lines_visited;<br>
>> - int points_in_polyline;<br>
>> int start_line;<br>
>> int nlines;<br>
>> int write_cats, copy_tables;<br>
>> @@ -177,8 +176,10 @@<br>
>> write_cats = NO_CATS;<br>
>> else if (strcmp(cats->answer, "first") == 0)<br>
>> write_cats = ONE_CAT;<br>
>> - else<br>
>> + else if (strcmp(cats->answer, "multi") == 0)<br>
>> write_cats = MULTI_CATS;<br>
>> + else<br>
>> + write_cats = SAME_CATS;<br>
>><br>
>> if (type_opt->answer)<br>
>> type = Vect_option_to_types(type_opt)<wbr>;<br>
>> @@ -218,9 +219,8 @@<br>
>> G_debug(1, "Polyline %d: start line = %d", polyline, start_line);<br>
>><br>
>> /* Walk forward and pick up coordinates */<br>
>> - points_in_polyline =<br>
>> - walk_forward_and_pick_up_coor<wbr>ds(&map, start_line, ltype, points,<br>
>> - lines_visited, Cats, write_cats);<br>
>> + walk_forward_and_pick_up_coor<wbr>ds(&map, start_line, ltype, points,<br>
>> + lines_visited, Cats, write_cats);<br>
>><br>
>> /* Write the line (type of the first line is used) */<br>
>> Vect_write_line(&Out, ltype, points, Cats);<br>
>> @@ -230,12 +230,10 @@<br>
>><br>
>> G_verbose_message(n_("%d line or boundaries found in input vector map",<br>
>> "%d lines or boundaries found in input vector map",<br>
>> - nlines),<br>
>> - nlines, Vect_get_name(&map), Vect_get_mapset(&map));<br>
>> + nlines), nlines);<br>
>> G_verbose_message(n_("%d polyline stored in output vector map",<br>
>> "%d polylines stored in output vector map",<br>
>> - polyline),<br>
>> - polyline, Vect_get_name(&Out), Vect_get_mapset(&Out));<br>
>> + polyline), polyline);<br>
>><br>
>> /* Copy (all linked) tables if needed */<br>
>> if (copy_tables) {<br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/vector/v.build.polylines/wa<wbr>lk.c<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/vector/v.build.polylines/wa<wbr>lk.c 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/vector/v.build.polylines/wa<wbr>lk.c 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -129,7 +129,7 @@<br>
>> {<br>
>> int cat_idx;<br>
>> int line, next_line, n1, n2;<br>
>> - int type, node, next_node;<br>
>> + int node, next_node;<br>
>> struct line_pnts *pnts;<br>
>> struct line_cats *cats_tmp;<br>
>><br>
>> @@ -149,9 +149,9 @@<br>
>> /* Pick up first set of coordinates */<br>
>> lines_visited[line] = 1;<br>
>> if (cats_tmp)<br>
>> - type = Vect_read_line(map, pnts, Cats, line);<br>
>> + Vect_read_line(map, pnts, Cats, line);<br>
>> else<br>
>> - type = Vect_read_line(map, pnts, NULL, line);<br>
>> + Vect_read_line(map, pnts, NULL, line);<br>
>><br>
>> Vect_get_line_nodes(map, line, &n1, &n2);<br>
>> next_line = find_next_line(map, line, n1, ltype);<br>
>> @@ -175,7 +175,7 @@<br>
>> node = next_node;<br>
>> while (line != 0 && line != start_line) {<br>
>> G_debug(2, " line = %d", line);<br>
>> - type = Vect_read_line(map, pnts, cats_tmp, line);<br>
>> + Vect_read_line(map, pnts, cats_tmp, line);<br>
>> if (cats_tmp && write_cats == MULTI_CATS) {<br>
>> for (cat_idx = 0; cat_idx < cats_tmp->n_cats; cat_idx++) {<br>
>> Vect_cat_set(Cats, cats_tmp->field[cat_idx],<br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/vector/v.distance/main.c<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/vector/v.distance/main.c 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/vector/v.distance/main.c 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -286,6 +286,10 @@<br>
>> Upload[i].upload = TO_ATTR;<br>
>> }<br>
>><br>
>> + /* store default column names if column= is not given */<br>
>> + if (!opt.column->answer)<br>
>> + Upload[i].column = G_store(opt.upload->answers[i]<wbr>);<br>
>> +<br>
>> i++;<br>
>> }<br>
>> Upload[i].upload = END;<br>
>> @@ -625,8 +629,12 @@<br>
>> }<br>
>><br>
>> /* Go through all lines in 'from' and find nearest in 'to' for each */<br>
>> - /* Note: as from_type is restricted to GV_POINTS (for now) everything is simple */<br>
>> + /* Note: as from_type is restricted to GV_POINTS (for now) everything is<br>
>> + * simple */<br>
>><br>
>> + /* suppress compiler warnings */<br>
>> + tx = ty = tz = fx = fy = fz = 0;<br>
>> +<br>
>> count = 0; /* count of distances in 'do_all' mode */<br>
>> /* Find nearest features for 'from' lines */<br>
>> if (nfromlines) {<br>
>> @@ -1388,7 +1396,7 @@<br>
>> G_percent(i, count, 1);<br>
>><br>
>> /* Write line connecting nearest points */<br>
>> - if (Outp != NULL) {<br>
>> + if (Near[i].count > 0 && Outp != NULL) {<br>
>> Vect_reset_line(FPoints);<br>
>> Vect_reset_cats(FCats);<br>
>><br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/vector/v.distance/v.distanc<wbr>e.html<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/vector/v.distance/v.distanc<wbr>e.html 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/vector/v.distance/v.distanc<wbr>e.html 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -97,7 +97,7 @@<br>
>> needed for network analysis:<br>
>><br>
>> <div class="code"><pre><br>
>> -v.distance -p from=pnt to=ln out=connections upload=dist column=dist<br>
>> +v.distance from=pnt to=ln out=connections upload=dist column=dist<br>
>> </pre></div><br>
>><br>
>> <h3>Query information</h3><br>
>> @@ -116,7 +116,7 @@<br>
>> Find nearest features:<br>
>><br>
>> <div class="code"><pre><br>
>> -v.distance from=pnt to=map_to_query upload=cat col=somecol -p<br>
>> +v.distance -p from=pnt to=map_to_query upload=cat<br>
>> </pre></div><br>
>><br>
>> <h3>Point-in-polygon</h3><br>
>> @@ -174,7 +174,7 @@<br>
>> echo "0|-58|1" | v.in.ascii output=pnt2 input=-<br>
>><br>
>> # here, distances is in degree units<br>
>> -v.distance from=pnt1 to=pnt2 upload=dist col=distance -p --q<br>
>> +v.distance -p --q from=pnt1 to=pnt2 upload=dist<br>
>> from_cat|distance<br>
>> 1|3<br>
>> </pre></div><br>
>> @@ -186,15 +186,14 @@<br>
>> <p><br>
>> Spearfish sample data location:<br>
>> <div class="code"><pre><br>
>> -v.distance -pa from=archsites to=archsites upload=dist col=dist<br>
>> +v.distance -pa from=archsites to=archsites upload=dist<br>
>> </pre></div><br>
>><br>
>> <p><br>
>> North Carolina sample data location:<br>
>><br>
>> <div class="code"><pre><br>
>> -v.distance -pa from=hospitals to=hospitals upload=dist \<br>
>> - col=dist separator=comma<br>
>> +v.distance -pa from=hospitals to=hospitals upload=dist separator=tab<br>
>> from_cat to_cat dist<br>
>> 1 2 3 4 5 ...<br>
>> 1 0 7489.10 339112.17 70900.39 70406.23 ...<br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/vector/v.edit/main.c<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/vector/v.edit/main.c 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/vector/v.edit/main.c 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -8,7 +8,7 @@<br>
>> * Jachym Cepicky<br>
>> * Major updates by Martin Landa <landa.martin <a href="http://gmail.com" rel="noreferrer" target="_blank">gmail.com</a>><br>
>> *<br>
>> - * COPYRIGHT: (C) 2006-2014 by the GRASS Development Team<br>
>> + * COPYRIGHT: (C) 2006-2017 by the GRASS Development Team<br>
>> *<br>
>> * This program is free software under the GNU General<br>
>> * Public License (>=v2). Read the file COPYING that comes<br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/vector/v.edit/max_distance.<wbr>c<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/vector/v.edit/max_distance.<wbr>c 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/vector/v.edit/max_distance.<wbr>c 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -39,6 +39,8 @@<br>
>> if (maxdistance < 0.0) {<br>
>> G_get_window(&window);<br>
>><br>
>> + G_begin_distance_<wbr>calculations();<br>
>> +<br>
>> ew_dist1 =<br>
>> G_distance(window.east, window.north, window.west, window.north);<br>
>> /* EW Dist at South Edge */<br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/vector/v.patch/main.c<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/vector/v.patch/main.c 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/vector/v.patch/main.c 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -413,8 +413,11 @@<br>
>> Vect_set_map_name(&OutMap, "Output from v.patch");<br>
>> Vect_set_person(&OutMap, G_whoami());<br>
>><br>
>> - if (!no_topo->answer)<br>
>> + if (!no_topo->answer) {<br>
>> + if (append->answer)<br>
>> + Vect_build_partial(&OutMap, GV_BUILD_NONE);<br>
>> Vect_build(&OutMap);<br>
>> + }<br>
>> Vect_close(&OutMap);<br>
>><br>
>> if (bbox_name) {<br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/vector/v.select/copy_tabs.c<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/vector/v.select/copy_tabs.c<wbr> 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/vector/v.select/copy_tabs.c<wbr> 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -55,12 +55,17 @@<br>
>> OFi =<br>
>> Vect_default_field_info(Out, IFi->number, IFi->name, ttype);<br>
>><br>
>> - ret =<br>
>> - db_copy_table_by_ints(IFi->dr<wbr>iver, IFi->database, IFi->table,<br>
>> - OFi->driver,<br>
>> - Vect_subst_var(OFi->database, Out),<br>
>> - OFi->table, IFi->key, cats[i],<br>
>> - ncats[i]);<br>
>> + if (ncats[i] > 0)<br>
>> + ret = db_copy_table_by_ints(IFi->dri<wbr>ver, IFi->database, IFi->table,<br>
>> + OFi->driver,<br>
>> + Vect_subst_var(OFi->database, Out),<br>
>> + OFi->table, IFi->key, cats[i],<br>
>> + ncats[i]);<br>
>> + else<br>
>> + ret = db_copy_table_where(IFi->drive<wbr>r, IFi->database, IFi->table,<br>
>> + OFi->driver,<br>
>> + Vect_subst_var(OFi->database, Out),<br>
>> + OFi->table, "0 = 1");<br>
>><br>
>> if (ret == DB_FAILED) {<br>
>> G_warning(_("Unable to copy table for layer %d"), fields[i]);<br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/vector/v.select/main.c<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/vector/v.select/main.c 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/vector/v.select/main.c 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -7,7 +7,7 @@<br>
>> * Markus Neteler <neteler <a href="http://itc.it" rel="noreferrer" target="_blank">itc.it</a>><br>
>> * Martin Landa <landa.martin <a href="http://gmail.com" rel="noreferrer" target="_blank">gmail.com</a>> (GEOS support)<br>
>> * PURPOSE: Select features from one map by features in another map.<br>
>> - * COPYRIGHT: (C) 2003-2014 by the GRASS Development Team<br>
>> + * COPYRIGHT: (C) 2003-2017 by the GRASS Development Team<br>
>> *<br>
>> * This program is free software under the GNU General<br>
>> * Public License (>=v2). Read the file COPYING that<br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/vector/v.to.db/main.c<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/vector/v.to.db/main.c 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/vector/v.to.db/main.c 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -68,7 +68,7 @@<br>
>> }<br>
>><br>
>> /* allocate array for values */<br>
>> - /* (+ 1 is for cat -1 (no category) reported at the end ) */<br>
>> + /* (+1 is for cat -1 (no category) reported at the end ) */<br>
>> findex = Vect_cidx_get_field_index(&Map<wbr>, options.field);<br>
>> if (findex > -1) {<br>
>> n = Vect_cidx_get_num_unique_cats_<wbr>by_index(&Map, findex);<br>
>> @@ -80,7 +80,8 @@<br>
>> Values = (struct value *) G_calloc(n + 1, sizeof(struct value));<br>
>><br>
>> /* prepopulate Values */<br>
>> - n = Vect_cidx_get_num_cats_by_inde<wbr>x(&Map, findex);<br>
>> + if (findex > -1)<br>
>> + n = Vect_cidx_get_num_cats_by_inde<wbr>x(&Map, findex);<br>
>> i = 0;<br>
>> Values[i].cat = -1; /* features without category */<br>
>> Values[i].used = 0;<br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/vector/v.to.points/write.c<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/vector/v.to.points/write.c 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/vector/v.to.points/write.c 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -84,7 +84,7 @@<br>
>> len = hypot(hypot(dx, dy), dz);<br>
>><br>
>> /* interpolate segment */<br>
>> - if (interpolate && vert < (LPoints->n_points - 1)) {<br>
>> + if (vertex == GV_VERTEX && interpolate) {<br>
>> int i, n;<br>
>> double x, y, z, dlen;<br>
>><br>
>><br>
>> Modified: grass/branches/releasebranch_7<wbr>_2/vector/v.what/main.c<br>
>> ==============================<wbr>==============================<wbr>=======<br>
>> --- grass/branches/releasebranch_7<wbr>_2/vector/v.what/main.c 2017-03-01 11:35:50 UTC (rev 70709)<br>
>> +++ grass/branches/releasebranch_7<wbr>_2/vector/v.what/main.c 2017-03-01 11:45:44 UTC (rev 70710)<br>
>> @@ -134,6 +134,7 @@<br>
>> x = window.proj;<br>
>> G_format_resolution(window.<wbr>ew_res, ewres, x);<br>
>> G_format_resolution(window.<wbr>ns_res, nsres, x);<br>
>> + G_begin_distance_<wbr>calculations();<br>
>> EW_DIST1 =<br>
>> G_distance(window.east, window.north, window.west, window.north);<br>
>> /* EW Dist at South Edge */<br>
>><br>
>> ______________________________<wbr>_________________<br>
>> grass-commit mailing list<br>
>> <a href="mailto:grass-commit@lists.osgeo.org" target="_blank">grass-commit@lists.osgeo.org</a><br>
>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-commit" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/grass-commit</a><br>
><br>
><br>
><br>
> --<br>
> Martin Landa<br>
> <a href="http://geo.fsv.cvut.cz/gwiki/Landa" rel="noreferrer" target="_blank">http://geo.fsv.cvut.cz/gwiki/L<wbr>anda</a><br>
> <a href="http://gismentors.cz/mentors/landa" rel="noreferrer" target="_blank">http://gismentors.cz/mentors/l<wbr>anda</a><br>
<br>
<br>
<br>
--<br>
Martin Landa<br>
<a href="http://geo.fsv.cvut.cz/gwiki/Landa" rel="noreferrer" target="_blank">http://geo.fsv.cvut.cz/gwiki/L<wbr>anda</a><br>
<a href="http://gismentors.cz/mentors/landa" rel="noreferrer" target="_blank">http://gismentors.cz/mentors/l<wbr>anda</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>