Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

t.rast.ndvi: Allow user to specify nir and red band names #6

Open
jonas-eberle opened this issue Sep 29, 2021 · 2 comments
Open

t.rast.ndvi: Allow user to specify nir and red band names #6

jonas-eberle opened this issue Sep 29, 2021 · 2 comments
Assignees

Comments

@jonas-eberle
Copy link

Currently, t.rast.ndvi tries to find out the band names for nir and red automatically:

red_band = None
nir_band = None
if sensor_abbr is not None:
if sensor_abbr == "L5":
red_band = "L5_3"
nir_band = "L5_4"
elif sensor_abbr == "L7":
red_band = "L7_3"
nir_band = "L7_4"
elif sensor_abbr == "L8":
red_band = "L8_4"
nir_band = "L8_5"
elif sensor_abbr == "S2":
red_band = "S2_4"
nir_band = "S2_8"
if red_band is None:
grass.warning("Assuming 'red' and 'nir as band names in %s" % _input)
red_band = "red"
nir_band = "nir"

As we have now flexible band names in GRASS GIS available and to support the ndvi process of openEO, it would be good to have the band names as input parameters. This could then be passed directly from the openEO process graph:
https://github.com/Open-EO/openeo-grassgis-driver/blob/81595797ab5d1df1953a99eb61c2531375ab7146/src/openeo_grass_gis_driver/actinia_processing/ndvi_process.py#L96-L107

@jonas-eberle jonas-eberle changed the title t.rast.ndvi: Allow user to specifiy nir and red band names t.rast.ndvi: Allow user to specify nir and red band names Sep 29, 2021
@metzm
Copy link
Collaborator

metzm commented Mar 15, 2022

Fixed in d9f5e1a on 28 Nov 2021

@mmacata
Copy link
Member

mmacata commented Sep 3, 2023

@metzm so this issue can be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants