[GRASS-dev] [GRASS GIS] #3638: v.distance linear matrix remove duplicate cat column & table associated without having map of distance lines

GRASS GIS trac at osgeo.org
Wed Sep 5 06:10:06 PDT 2018


#3638: v.distance linear matrix remove duplicate cat column & table associated
without having map of distance lines
--------------------------+-------------------------
  Reporter:  Maellevd     |      Owner:  grass-dev@…
      Type:  defect       |     Status:  reopened
  Priority:  normal       |  Milestone:
 Component:  Vector       |    Version:  7.4.0
Resolution:               |   Keywords:  v.distance
       CPU:  Unspecified  |   Platform:  Linux
--------------------------+-------------------------

Comment (by mlennert):

 Thanks for reopening the ticket as there are several elements that are
 real requests for enhancements or even bugs. However, I agree with sbl
 that the original bug post could be less in the form of questions and more
 in the form of a bug report / enhancement request. If you are not sure
 about how to use a module than ask a question on the list. If you are
 (pretty) sure that there is a problem with a module, post a ticket here
 with the description of the problem.

 The duplicate cat values come from the fact that when you use -a a to_cat
 is automatically uploaded (otherwise how would one be able to use the
 resulting matrix ?), so upload=cat is redundant. But if a linear output is
 wanted, a second variable is needed. Try to run with upload=dist,to_x,to_y
 and you will see that there is no duplication.

 === Bug ===

 * The fact that the creation of a table is only possible when the input
 maps are in the current mapset is a bug IMHO. It is due to the fact that
 in the code updating the table and creating a new table is treated as
 equal by calling Vect_set_db_updated(&From). Moving this to only the part
 where the existing table is updated solves this issue.

 See r73272 for the fix. I'll backport to the other branches ASAP.

 === Enhancements ===

 * Currently, when using the -ap flag combination with one single upload
 variable, the module automatically prints out a square matrix. However, in
 certain situations it might be very useful to be able to print out a
 linear matrix. This could handled by a flag, e.g. -s for square matrix,
 instead of automatically

 * I do not understand why an output map should be necessary to create an
 output table. It can be useful to have such a table without a map.

 * To add to this: when printing or creating a new table, one should be
 able to determine column names, not only for updating an existing table

 I'll attach a patch with these enhancement (plus some attempt at cleaning
 up parser dependency instructions. This will partly change the module API,
 though, so we'll have to decide how to apply.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3638#comment:3>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list