Closed GoogleCodeExporter closed 9 years ago
Note, the square bracket notation is a jiffle extension over the GRASS
r.mapcalc language so there shouldn't be
any implications for running r.mapcalc scripts. However, using unannotated
square brackets to mean absolute
rather than relative position will break existing scripts with neighbourhood
calculations. Despite this, I think it's
more intuitive and less error-prone to have it that way.
Original comment by michael.bedward@gmail.com
on 5 Jan 2010 at 6:45
Original comment by michael.bedward@gmail.com
on 16 Apr 2010 at 12:08
Hey Michael,
what about using the common spreadsheet notation to discern between relative
and absolute?
In spreadsheets you have something like D3, which is absolute, but when you
copy that formula to the cell below it, it will reference D4 instead: during
the copy it's treated like a relative position.
That happens unless you prefix the row or column with $, for example, if you
have $D$3 then wherever you copy the formula that cell reference won't change.
In Jiffle terms, $x, $y would be absolute references, while x, y would be
relative.
This would also keep the syntax backwards compatible.
Original comment by andrea.a...@gmail.com
on 20 Jan 2011 at 3:32
Nice idea Andrea, although I have a severe allergy to Excel. I suppose I could
try to get over it.
Let's go with it.
I'm moving multi-band support into a new issue (editing subject of this one
accordingly).
Original comment by michael.bedward@gmail.com
on 21 Jan 2011 at 1:01
Dollar prefix is working now. Thanks for the idea Andrea.
Committed to trunk r1315
Original comment by michael.bedward@gmail.com
on 22 Jan 2011 at 12:46
Original issue reported on code.google.com by
michael.bedward@gmail.com
on 5 Jan 2010 at 6:41