[GRASS-user] Copying from a mapset in another data directory

Jonathan Greenberg greenberg at ucdavis.edu
Tue May 25 15:26:04 EDT 2010


This ALMOST works, except "from" needs to take the form
rastername at mapset and "to" needs the form rastername.  I can get the
"from" setup properly by appending "-m" to the gmlist call, but how do
I subsequently strip the @comet part for the "to" statement?  Thanks!

Incidentally, this would be a good feature to add to g.copy.

--j

On Mon, May 24, 2010 at 8:40 PM, Nikos Alexandris
<nikos.alexandris at felis.uni-freiburg.de> wrote:
> Jonathan Greenberg wrote:
>> Excellent -- symlinking is working properly -- now on to my next
>> question -- is there a way to do some level of "batch" g.copy using a
>> wildcard, e.g.:
>>
>> g.copy rast=ned_ca_masked_epsg3310_*@comet
>>
>> Or do I have to specific each raster individually, along with its
>> target file name?
>
> Jonathan, would a for loop + g.mlist + g.copy get the job done? For example:
>
>  for X in `g.mlist rast pat=ned_ca_masked_epsg3310_* mapset=comet` ; do
> g.copy rast="${X}","${X}" ; done
>
> Nikos
>
> [...]
>


More information about the grass-user mailing list