Opened 6 years ago
Last modified 6 years ago
#3627 new enhancement
i.group: file= parameter for input desired
Reported by: | neteler | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.6.2 |
Component: | Imagery | Version: | 7.4.0 |
Keywords: | i.group | Cc: | |
CPU: | Unspecified | Platform: | All |
Description
To enter the input to i.group can reach a significant number of map names.
On Unix like systems backticks can be used to feed in g.list output with regex/wildcard search. However, this fails on Windows. Here the file parameter would be handy:
# r.series example, also works on Windows as no backticks involved g.list rast pattern="tmean.1981_2010.*.avg" output=list_tmean_1981_2010.csv r.series file=list_tmean_1981_2010.csv ...
Wish: add a "file" parameter to i.group is it exists for r.series and other commands.
Change History (7)
follow-up: 2 comment:1 by , 6 years ago
follow-up: 4 comment:2 by , 6 years ago
comment:3 by , 6 years ago
Replying to neteler:
To enter the input to i.group can reach a significant number of map names.
On Unix like systems backticks can be used to feed in g.list output with regex/wildcard search. However, this fails on Windows. Here the file parameter would be handy:
# r.series example, also works on Windows as no backticks involved g.list rast pattern="tmean.1981_2010.*.avg" output=list_tmean_1981_2010.csv r.series file=list_tmean_1981_2010.csv ...Wish: add a "file" parameter to i.group is it exists for r.series and other commands.
for the record, see https://lists.osgeo.org/pipermail/grass-user/2018-June/078526.html
not as elegant in linux, but you can do something similar in windows too e.g. in the winGRASS command line: :\>FOR /F %c in ('g.list "type=raster" "pattern=*2" "mapset=user1" "separator=comma"') DO SET RASTER2REMOVE=%c C:\>SET RASTER2REMOVE=b172,d172,it172,r172 C:\>echo %RASTER2REMOVE% b172,d172,it172,r172 C:\>g.remove type=raster name=%RASTER2REMOVE% The following data base element files would be deleted: raster/b172@user1 raster/d172@user1 raster/it172@user1 raster/r172@user1 WARNING: Nothing removed. You must use the force flag (-f) to actually remove them. Exiting.
follow-up: 5 comment:4 by , 6 years ago
Replying to neteler:
Replying to mmetz:
Please try trunk r73147
Works like a charm, thanks! I'd be happy to see that backported since 7.4 will be used by many (Windows) users for a while...
This enhancement is mainly targeting Windows users, and Windows users are welcome to get the latest daily build from https://grass.osgeo.org/download/software/ms-windows/
comment:5 by , 6 years ago
Replying to mmetz:
This enhancement is mainly targeting Windows users, and Windows users are welcome to get the latest daily build from https://grass.osgeo.org/download/software/ms-windows/
This does not work in production... ok time to release 7.6.0 then
Please try trunk r73147