8

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?

12

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.

  • 1
    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
  • 1
    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
5

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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