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

r.blend: Quote map names in r.mapcalc expressions. #277

Merged
merged 3 commits into from
Mar 20, 2020

Conversation

marisn
Copy link
Contributor

@marisn marisn commented Jan 10, 2020

Avoids failure if map / mapset name is also a valid mathematical expression.

Avoids failure if map / mapset name is also a valid mathematical expression.
@marisn
Copy link
Contributor Author

marisn commented Jan 13, 2020

Same issue also affects r.grow. Fixed with 81761a8

@neteler
Copy link
Member

neteler commented Feb 15, 2020

To better try it out, do you have a (simple) example?

@marisn
Copy link
Contributor Author

marisn commented Feb 17, 2020

To better try it out, do you have a (simple) example?

Hmmm. This could be a good addition to the test suite, as there could be errors in other modules as well. Still I'm not that familiar with the test suite to understand how to force running all tests in a specific mapset.

  1. In NC basic location create a new mapset '1234-56-78' (a typical mapset naming pattern when I have a single mapset per map sheet) and start GRASS session in it;
  2. g.copy raster=elevation@PERMANENT,elevation
  3. r.blend first=elevation@1234-56-78 second=elevation@1234-56-78 output=blended
  4. Observe output: syntax error, unexpected INTEGER, expecting VARNAME or NAME
  5. r.grow input=elevation@1234-56-78 output=grown
  6. Observe output: syntax error, unexpected INTEGER, expecting VARNAME or NAME

@neteler neteler added this to the 7.8.3 milestone Feb 17, 2020
@neteler
Copy link
Member

neteler commented Feb 17, 2020

I have written a testsuite script in PR #347, pls check

neteler added a commit that referenced this pull request Feb 18, 2020
* testsuite: r.blend quoting test

Added test script which implements the test suggested in PR #277

Co-authored-by: Māris Nartišs <mn@sungis.lv>
neteler added a commit that referenced this pull request Feb 18, 2020
* testsuite: r.blend quoting test

Added test script which implements the test suggested in PR #277

Co-authored-by: Māris Nartišs <mn@sungis.lv>
@neteler
Copy link
Member

neteler commented Feb 26, 2020

An objections to merge and backport?

@marisn
Copy link
Contributor Author

marisn commented Mar 13, 2020

An objections to merge and backport?

No one seems to object. I can rebase, if needed.

@landam
Copy link
Member

landam commented Mar 20, 2020

@neteler Are you planning to merge it?

@neteler neteler merged commit 1143002 into OSGeo:master Mar 20, 2020
neteler pushed a commit that referenced this pull request Mar 20, 2020
* r.blend: Quote map names in r.mapcalc expressions.
Avoids failure if map / mapset name is also a valid mathematical expression.

* r.grow: Quote map names in mapcalc expression

* testsuite: r.grow test case for mapcalc map quoting.
Based on PR #347 and PR #277

Co-authored-by: Māris Nartišs <maris.nartiss@lu.lv>
@neteler
Copy link
Member

neteler commented Mar 20, 2020

@neteler Are you planning to merge it?

Done and backported

HuidaeCho pushed a commit to HuidaeCho/grass that referenced this pull request Mar 20, 2020
* r.blend: Quote map names in r.mapcalc expressions.
Avoids failure if map / mapset name is also a valid mathematical expression.

* r.grow: Quote map names in mapcalc expression

* testsuite: r.grow test case for mapcalc map quoting.
Based on PR OSGeo#347 and PR OSGeo#277

Co-authored-by: Māris Nartišs <maris.nartiss@lu.lv>
@marisn marisn deleted the blend_quote_map branch April 18, 2020 07:00
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

Successfully merging this pull request may close these issues.

None yet

3 participants