[GRASS-git] [OSGeo/grass] ca1551: Simplify raster band reference management (#1272)

Māris Nartišs noreply at github.com
Sun Jul 4 08:10:37 PDT 2021


  Branch: refs/heads/master
  Home:   https://github.com/OSGeo/grass
  Commit: ca1551206eaa0fc462f4849a06ebb035808470da
      https://github.com/OSGeo/grass/commit/ca1551206eaa0fc462f4849a06ebb035808470da
  Author: Māris Nartišs <maris.gis at gmail.com>
  Date:   2021-07-04 (Sun, 04 Jul 2021)

  Changed paths:
    M include/grass/defs/gis.h
    M include/grass/defs/raster.h
    R lib/gis/band_reference.c
    R lib/raster/band_reference.c
    M lib/raster/raster_metadata.c
    A lib/raster/testsuite/test_raster_metadata.py
    M python/grass/pygrass/raster/abstract.py
    M python/grass/temporal/c_libraries_interface.py
    M python/grass/temporal/space_time_datasets.py
    M raster/r.info/main.c
    M raster/r.info/r.info.html
    M raster/r.support/main.c
    M raster/r.support/r.support.html
    A raster/r.support/testsuite/test_r_support.py
    M scripts/i.band/i.band.html
    M scripts/i.band/i.band.py
    M scripts/i.band/testsuite/test_i_band.py

  Log Message:
  -----------
  Simplify raster band reference management (#1272)

Refactor bandref code:
* As band references are used only for raster, move functions to raster lib and model them after units and vdatum metadata
* Add function to test basic band id naming conformance
* Add ability to find out if provided band metadata file name is present
* Make filename in band reference not mandatory to accommodate any band id also without extended metadata
As file name can be determined at runtime and is used only to print out extended metadata, it makes little sense to store it. This greatly simplifies work with band references.
* Enable band reference management in raster support module
* Print band reference in r.info output
* Fix i.band to work with updated band reference code + remove test dependency on a particular location
* Adjust max length check & tests (thanks to @nilason)




More information about the grass-commit mailing list