Skip to content

Commit

Permalink
r.accumulate: Use vector db connection rather than the default one (#97)
Browse files Browse the repository at this point in the history
* r.accumulate: Use vector db connection rather than the default one

* r.accumulate: copyright
  • Loading branch information
HuidaeCho committed Feb 24, 2020
1 parent 64166ba commit a7c4457
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions grass7/raster/r.accumulate/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* PURPOSE: Calculates weighted flow accumulation, stream networks, and
* the longest flow path using a flow direction map.
*
* COPYRIGHT: (C) 2018 by the GRASS Development Team
* COPYRIGHT: (C) 2018, 2020 by Huidae Cho and the GRASS Development Team
*
* This program is free software under the GNU General Public
* License (>=v2). Read the file COPYING that comes with GRASS
Expand Down Expand Up @@ -283,17 +283,16 @@ int main(int argc, char *argv[])
struct field_info *Fi;
struct line_pnts *Points;
struct line_cats *Cats;
int field, type;
int field;
int nlines, line, n;

if (Vect_open_old2(&Map, outlet_name, "", outlet_layer) < 0)
G_fatal_error(_("Unable to open vector map <%s>"), outlet_name);

field = Vect_get_field_number(&Map, outlet_layer);
type = Vect_get_num_dblinks(&Map) > 1 ? GV_MTABLE : GV_1TABLE;

if (outlet_idcol) {
Fi = Vect_default_field_info(&Map, field, NULL, type);
Fi = Vect_get_field(&Map, field);
driver =
db_start_driver_open_database(Fi->driver,
Vect_subst_var(Fi->database,
Expand Down

0 comments on commit a7c4457

Please sign in to comment.