-
-
Notifications
You must be signed in to change notification settings - Fork 307
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
TGIS: fix semantic label #2215
TGIS: fix semantic label #2215
Conversation
* do not modify the provided semantic label
@metzm Can you provide example of usage? |
Test case, adapted from a test for
|
(I initially had an issue with the creation of Tested successfully. |
I would prefer to remove all modifications to the provided semantic label in _update_where_statement_by_semantic_label(), but this would be another PR. |
Just from a quick look here, I agree. Perhaps the whole nested label syntax (and aliases?) can be dropped and replaced by simple look up. |
* fix detection of a shortcut or band identifier * do not modify the provided semantic label if it contains `_`
FYI, none of the t.rast.mapcalc tests actually runs automatically. Maybe all is needed is moving the files to a testsuite directory (there is none in the t.rast.mapcalc directory now). Bash scripts should just run at least in the Ubuntu CI and obviously locally on a right machine and the test above seems self-contained, so hopefully no trouble there either. |
I prefer to just delete all modifications to the provided semantic label, requiring that the provided semantic label exists. The reason for these modifications to the provided semantic label is unknown: no code comments. Alternatively, if the provided semantic label does not exist in the strds, try to modify it, but check if the modified label exists. That would be some overhead, querying the TGIS db is rather slow. |
* fix detection of a shortcut or band identifier * do not modify the provided semantic label if it contains `_`
* fix detection of a shortcut or band identifier * do not modify the provided semantic label if it contains `_`
* fix detection of a shortcut or band identifier * do not modify the provided semantic label if it contains `_`
Do not treat a semantic label as shortcut or band identifier if it contains text. This PR is needed to support semantic labels such as red, green, blue, mask.