[GRASS-dev] [GRASS GIS] #3226: v.select: how to handle situation where no features are found

GRASS GIS trac at osgeo.org
Tue Dec 20 13:24:15 PST 2016


#3226: v.select: how to handle situation where no features are found
--------------------------+-------------------------
  Reporter:  mlennert     |      Owner:  grass-dev@…
      Type:  defect       |     Status:  new
  Priority:  normal       |  Milestone:  7.2.1
 Component:  Vector       |    Version:  svn-trunk
Resolution:               |   Keywords:  v.select
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+-------------------------

Comment (by mmetz):

 Replying to [ticket:3226 mlennert]:
 > [...] In r70103 a patch was applied to trunk to count the number of
 features found and if that number = 0 then the user is informed and  no
 output map is created.
 >
 > However, Vaclav remarks:
 >
 > > Isn't an empty vector map an expected result in this case? What
 happens
 > > when you do this in GUI (where output is added automatically to Map
 > > Display)?
 >
 > I don't think that a module should output an empty map. But if you think
 that it should than we can change the patch.
 >
 > And yes, the output is automatically added even if it doesn't exist, but
 I would actually consider this a bug in the GUI, not of the module.

 I agree. If no features are selected, there should be no output map. This
 is particularly useful for automated processing, otherwise you would need
 to check if the output map contains any features at al. It is much simpler
 to check if the expected output map exists, granted that v.select finished
 successfully.

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



More information about the grass-dev mailing list