Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a raster DEM that I created in one mapset but I would like to copy it to another mapset for another purpose.

alt text

Is this possible within GRASS or can I just copy some files over in the filesystem to the FloodModels mapset folder on my hard drive?

share|improve this question
up vote 10 down vote accepted

You can do this with g.copy (doc) or g.rename (doc), something like:

g.copy rast="shire_dem@BushFire,shire_dem@FloodModels"

You can do this from the command line, but its a little more tricky generally, since the files are spread across a few directories.

share|improve this answer
I get the following error: Illegal filename. Character <@> not allowed. GRASS_INFO_WARNING(9384,1): <shire_dem@FloodModels> is an illegal file name GRASS_INFO_END(9384,1) – Nathan W Nov 2 '10 at 6:46
It's all good just needed to wrap it in quotes, so it became: rast="g.copy shire_dem@BushFire",shire_dem@FloodModels – Nathan W Nov 2 '10 at 6:53
Updated with the corrected information, thanks for the catch – scw Nov 2 '10 at 22:00

You need to indicate the dataformat, here raster. Additionally, don't define a target mapset since it always goes into the current mapset. So:

g.copy rast=shire_dem@BushFire,shire_dem

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.