Changeset 66822


Ignore:
Timestamp:
Nov 12, 2015, 2:28:39 PM (9 years ago)
Author:
wenzeslaus
Message:

v.patch: flags to work without topology and with z [news]

Merge point clouds with -nzb flags to skip z check,
not require topology and use z even when it was not detected
(since the topology/index/meta was missing).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • grass/trunk/vector/v.patch/main.c

    r65744 r66822  
    5151    struct Option *old, *new, *bbox;
    5252    struct Flag *append, *table_flag, *no_topo;
     53    struct Flag *no_input_topo_flag, *force_z_flag;
    5354    struct Map_info InMap, OutMap, BBoxMap;
    5455    int n_files;
     
    8182        _("Name for output vector map where bounding boxes of input vector maps are written to");
    8283
    83     append = G_define_flag();
    84     append->key = 'a';
    85     append->description = _("Append files to existing file "
    86                             "(overwriting existing files must be activated)");
     84    no_input_topo_flag = G_define_flag();
     85    no_input_topo_flag->key = 'n';
     86    no_input_topo_flag->label = _("Do not expect input with topology");
     87    no_input_topo_flag->description =
     88        _("Applicable when input is points without topology");
     89
     90    force_z_flag = G_define_flag();
     91    force_z_flag->key = 'z';
     92    force_z_flag->label = _("Expect z coordinate even when not using topology");
     93    force_z_flag->description =
     94        _("Applicable when input is points with z coordinate but without topology");
    8795
    8896    table_flag = G_define_flag();
     
    92100        _("Only the table of layer 1 is currently supported");
    93101
     102    append = G_define_flag();
     103    append->key = 'a';
     104    append->description = _("Append files to existing file "
     105                            "(overwriting existing files must be activated)");
     106
    94107    no_topo = G_define_standard_flag(G_FLG_V_TOPO);
     108    no_topo->description = _("Advantageous when handling a large number of points");
    95109
    96110    if (G_parser(argc, argv))
     
    110124        Vect_check_input_output_name(in_name, new->answer, G_FATAL_EXIT);
    111125
    112         Vect_set_open_level(2);
     126        Vect_set_open_level(no_input_topo_flag->answer ? 1 : 2);
    113127        if (Vect_open_old_head(&InMap, in_name, "") < 0)
    114128            G_fatal_error(_("Unable to open vector map <%s>"), in_name);
     
    119133        Vect_close(&InMap);
    120134    }
     135    if (force_z_flag->answer)
     136        out_is_3d = WITH_Z;
    121137
    122138    table_out = NULL;
Note: See TracChangeset for help on using the changeset viewer.