[GRASS-dev] lib/gis/band_reference.c ?

Stefan Blumentrath Stefan.Blumentrath at nina.no
Mon Sep 6 02:46:54 PDT 2021


Hei Markus,

I see.
With Maris hint on r.support, I managed to assign custom band names at import / t.register.
I still have to figure out how (or if) the different temporal modules handle band references.
I do get invalid temporal topology errors in g.gui.animation for example, but that may be due to start = end time stamp.

Documentation of features and none-features with band-references deserves some love for GRASS 8 release I guess…

Cheers
Stefan

From: Markus Metz <markus.metz.giswork at gmail.com>
Sent: mandag 6. september 2021 09:27
To: Maris Nartiss <maris.gis at gmail.com>
Cc: Stefan Blumentrath <Stefan.Blumentrath at nina.no>; Martin Landa <landa.martin at gmail.com>; GRASS developers list <grass-dev at lists.osgeo.org>
Subject: Re: [GRASS-dev] lib/gis/band_reference.c ?

The easiest way to assign custom band names to raster maps in a strds is to create a corresponding file for t.register.

Note that band names in a strds do not need to match band names assigned with i.bands. The whole concept of band references in GRASS is IMHO still experimental and unfortunately far away from the STAC eo bands extension.

Markus M


On Tue, Aug 24, 2021 at 11:09 AM Maris Nartiss <maris.gis at gmail.com<mailto:maris.gis at gmail.com>> wrote:
Band reference rules were totally relaxed 7 days a go:
https://github.com/OSGeo/grass/commit/abe194dce78adf5f63885a6a09c452fc7ae4f735<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FOSGeo%2Fgrass%2Fcommit%2Fabe194dce78adf5f63885a6a09c452fc7ae4f735&data=04%7C01%7C%7C84da7a235fa0418cfe3f08d97107ae4d%7C6cef373021314901831055b3abf02c73%7C0%7C0%7C637665100081158341%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=OXOunlOeOPMIGv8lyo6bpVMnOVkJ7SpTYgHfu5iXsXc%3D&reserved=0>

New relaxed rule changes haven't propagated to the documentation yet
(PR's welcome).

Band reference editing via r.support was added on 4th of July:
https://github.com/OSGeo/grass/commit/ca1551206eaa0fc462f4849a06ebb035808470da<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FOSGeo%2Fgrass%2Fcommit%2Fca1551206eaa0fc462f4849a06ebb035808470da&data=04%7C01%7C%7C84da7a235fa0418cfe3f08d97107ae4d%7C6cef373021314901831055b3abf02c73%7C0%7C0%7C637665100081168336%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=MqIan9AmoGhM3PIJ1AF3kEyE%2FXmRtiw9PG9%2FqUVDfYw%3D&reserved=0>

Still – keep in mind – there are no changes in band metadata as
managed by g.bands. Changes only deal with ability to have a band
reference without extended metadata in json files. Thus limitation of
not being able to define your own band reference is still in place,
now only you can assign a band reference without having a definition
(and thus any extended metadata apart from its name).

Māris.

2021-08-24 11:18 GMT+03:00, Stefan Blumentrath <Stefan.Blumentrath at nina.no<mailto:Stefan.Blumentrath at nina.no>>:
> Thanks Maris for the reply.
>
> I could not find that option in r.support.
>
> i.band allows to add e.g. S2_12 as band reference, but nothing custom. And
> the g.bands manual says that user-defined band references are not yet
> supported.
>
> Has that been added recently? Or would I have to edit the bands json file of
> the system first?
>
> My system is:
> g.version -ger
> version=8.0.dev<https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F8.0.dev%2F&data=04%7C01%7C%7C84da7a235fa0418cfe3f08d97107ae4d%7C6cef373021314901831055b3abf02c73%7C0%7C0%7C637665100081178328%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=fxKLaiDra3SU%2FFu3d%2F4CUCH9x1wQ0nshhcFgrR0RazQ%3D&reserved=0>
> date=2021
> revision=dd9d36830
> build_date=2021-07-08
> build_platform=x86_64-pc-linux-gnu
> build_off_t_size=8
> libgis_revision=d2a5e8e8f
> libgis_date=2021-06-16T04:05:21+00:00
> proj=7.0.0
> gdal=3.0.4
> geos=3.8.0
> sqlite=3.22.0
>
> Cheers
> Stefan
>
> -----Original Message-----
> From: Maris Nartiss <maris.gis at gmail.com<mailto:maris.gis at gmail.com>>
> Sent: tirsdag 24. august 2021 09:03
> To: Stefan Blumentrath <Stefan.Blumentrath at nina.no<mailto:Stefan.Blumentrath at nina.no>>
> Cc: Martin Landa <landa.martin at gmail.com<mailto:landa.martin at gmail.com>>; Markus Metz
> <markus.metz.giswork at gmail.com<mailto:markus.metz.giswork at gmail.com>>; GRASS developers list
> <grass-dev at lists.osgeo.org<mailto:grass-dev at lists.osgeo.org>>
> Subject: Re: [GRASS-dev] lib/gis/band_reference.c ?
>
> GRASS supports arbitrary band reference names. Just make them unique enough
> to not mix together apples with oranges by accident (e.g. "min"
> is a bad idea, "min_t_c" is better; "NDVI" would work; "elevation" – bad,
> "elevation_m" – better).
> You can set band references after import with r.support module.
>
> Have fun,
> Māris.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20210906/41ee0d72/attachment-0001.html>


More information about the grass-dev mailing list