[GRASS-git] [OSGeo/grass] 1d42e5: r.mask.status: Check mask status through a tool an...

Vaclav Petras noreply at github.com
Fri Oct 11 13:26:18 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 1d42e580e25d62dee5f3e2653f7bcb5241855f71
      https://github.com/OSGeo/grass/commit/1d42e580e25d62dee5f3e2653f7bcb5241855f71
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2024-10-11 (Fri, 11 Oct 2024)

  Changed paths:
    M include/grass/defs/raster.h
    M lib/init/grass.py
    M lib/raster/mask_info.c
    M raster/Makefile
    A raster/r.mask.status/Makefile
    A raster/r.mask.status/main.c
    A raster/r.mask.status/r.mask.status.html
    A raster/r.mask.status/tests/conftest.py
    A raster/r.mask.status/tests/r_mask_status_test.py

  Log Message:
  -----------
  r.mask.status: Check mask status through a tool and function (#2390)

Instead of using low-level test of file existence with hardcoded raster path and name, this offers a new tool to retrieve status of the raster mask.

The new r.mask.status tool reports presence or absence of the 2D raster mask and provides additional details about the mask.

There is one usage of this now and that's the one for a shell prompt. The prompt no longer relies on testing the file presence with the test program, but uses a GRASS tool to find out.

The code goes out of its way to report both mask name (currently always MASK) and the underlying raster name if it is a reclassified (without rewriting the current C API). This is to mimic the existing C functions which are returning the underlying raster if MASK is a reclass. The tool and the new C API function return both preparing a way for using an arbitrary name for the mask while having the option to look at the underlying reclassified raster map.



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications


More information about the grass-commit mailing list