#2721: t.rast.what: allow stdin and add to GRASS 7.0
-------------------------+-------------------------
Reporter: sbl | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.2
Component: Default | Version: unspecified
Keywords: t.rast.what | CPU: Unspecified
Platform: All |
-------------------------+-------------------------
Please find attached a diff which allows t.rast.what to read from stdin.
That way it becomes also possible to add a site name to the output, which
is pretty useful for later useage of it...
The site name is only propagated to the output, when a site name has been
provided in the (first line of the) input.
There are probably more elegant solutions for this, so improvements are
very welcome. I did not update the manual and the test suite yet, but I
will try to do so, if you consider this addition useful too...
For users with "commandlineophobia" it would be probably better to specify
coordinates using the file option G_OPT_F_INPUT?
Furthermore, the script works very well in GRASS 7.0 too. Any particular
reason for not shipping it with the stable release? t.rast.what is a
pretty handy tool!
#2721: t.rast.what: allow stdin and add to GRASS 7.0
--------------------------+-------------------------
Reporter: sbl | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.2
Component: Default | Version: unspecified
Resolution: | Keywords: t.rast.what
CPU: Unspecified | Platform: All
--------------------------+-------------------------
Comment (by huhabla):
I have applied your patch in r65964 with some modifications. Thanks a lot
for this improvement. I have introduced the flag "-i" to expect stdin
input, otherwise stdin.read() will block if coordinates or point input are
not set.
About a backport to 7.0.*, t.rast.what is still alpha or beta state, it
should be further improved [*] and more tested before backporting.
[*] Supporting site names from vector files, input files with coordinates,
output transformation with lower memory footprint, ...
#2721: t.rast.what: allow stdin and add to GRASS 7.0
--------------------------+-------------------------
Reporter: sbl | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.2
Component: Default | Version: unspecified
Resolution: | Keywords: t.rast.what
CPU: Unspecified | Platform: All
--------------------------+-------------------------
Comment (by sbl):
In order to support "input files with coordinates" I created a new tiny
diff. Please review. I can update the manual accordingly, if you like.
For site names from vector files I guess r.what should be improved first,
don`t you think?
Would you mind if I try to get the script into the new GRASS plugin in
QGIS, marking it as experimental? This module is definitely a good
candidate for functionality users with limited knowledge of GRASS / TGIS
can benefit from very much... And a nice teaser for the power of TGIS...