landam / grass-gis-git-migration-test

0 stars 0 forks source link

r.mapcalc allow neigbourhood modifier to accept expression or NAME #188

Open landam opened 5 years ago

landam commented 5 years ago

Reported by marisn on 26 Jan 2016 11:30 UTC It seems that r.mapcalc map[row,col] accepts only integers as row and col. It would be useful (in rare cases) to specify row or col as an expression or name that results in integer.

Here are some examples that should work:

map[-1, ncols() - 1]
map[sampler_x_map, sampler_y_map]

GRASS GIS version and provenance

svn-trunk

Migrated-From: https://trac.osgeo.org/grass/ticket/2877

landam commented 5 years ago

Comment by glynn on 26 Jan 2016 13:13 UTC Replying to [ticket:2877 marisn]:

It seems that r.mapcalc map[row,col] accepts only integers as row and col. It would be useful (in rare cases) to specify row or col as an expression or name that results in integer.

Arbitrary offsets for the column are probably feasible, but still likely to involve a fair amount of work.

Arbitrary offsets for the rows aren't feasible without a complete re-write due to the row-by-row nature of r.mapcalc. Even with such a re-write, they could require storing a significant portion of the map (possibly all of it) in memory (if the row offset is different for each column, then you need as many rows in memory as there are columns).

In that situation, you may as well use grass.script.array (or similar) to make the map available as a numpy array and get the benefits of using a real programming language.

landam commented 5 years ago

Comment by neteler on 5 May 2016 14:08 UTC Milestone renamed

landam commented 5 years ago

Comment by neteler on 28 Dec 2016 15:04 UTC Ticket retargeted after milestone closed

landam commented 5 years ago

Modified by @landam on 5 May 2017 20:41 UTC

landam commented 5 years ago

Comment by @landam on 1 Sep 2017 20:28 UTC All enhancement tickets should be assigned to 7.4 milestone.

landam commented 5 years ago

Comment by neteler on 26 Jan 2018 11:40 UTC Ticket retargeted after milestone closed

landam commented 5 years ago

Modified by neteler on 12 Jun 2018 20:48 UTC

landam commented 5 years ago

Comment by @landam on 25 Sep 2018 16:52 UTC All enhancement tickets should be assigned to 7.6 milestone.

landam commented 5 years ago

Comment by @landam on 25 Jan 2019 21:07 UTC Ticket retargeted after milestone closed