[GRASS-git] [OSGeo/grass] 87c908: v.to.rast: Use verbose for no area message, not wa...

Vaclav Petras noreply at github.com
Fri Aug 5 06:53:39 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 87c908509d5be2d2df472d7689dc961f2742dabd
      https://github.com/OSGeo/grass/commit/87c908509d5be2d2df472d7689dc961f2742dabd
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2022-08-05 (Fri, 05 Aug 2022)

  Changed paths:
    M vector/v.to.rast/vect2rast.c

  Log Message:
  -----------
  v.to.rast: Use verbose for no area message, not warning (#2459)

When there are no areas in the vector map, v.to.rast would give warning, 'No areas selected'. However, no areas is a perfectly fine state when converting a vector map with points or lines only, so the warning is misleading.

To cover the case where a user may need to know about the number of areas, a verbose message is now added reporting the number replacing both the warning and a debug message with the number.

This removes the false alarm, warning inconsistency in behavior between types, and warning inconsistency with other modules. Empty selection is generally a valid result, so here it also gives no warning.

The alternative of always giving warning when no features of a specific type are present, generates a lot of warnings. Another alternative would be to completely rework of how the type option works, e.g., the default would be empty and warnings would be present if the type was explicit, but that still would be somewhat inconsistent with other modules and does not follow that an empty selection is generally a valid result.




More information about the grass-commit mailing list