I need to write location, mapset and information in defined directory which has write permision. How can I do this? Presently the location and mapset are written at GISDBASE directory. I would like to change some other location in a directory with write permission . Currently I have given grassrc6 as following


char* grassdbpath=getenv("GISDBASE");

after define_module();

My code like this:


G_gisinit(argv[0]);//errorm message"Location :**** not found
  • Is there any dependency of GISDBASE on GISBASE physical location?It should be inside GISBASE?Because if i change GISDBASE path to some other location it is not working. – user28542 Feb 5 '19 at 6:48

There should not be any connection between GISBASE and GISDBASE. The directory defined by GISBASE is where the program is installed. You would normally need admin rights to install GRASS into that system location. And it should never be used for GISDBASE.

GISDBASE is the directory where GRASS stores all its data files. This needs to be owned by the user, with full write access. Typically it's in your home directory. What is not clear in your rc file is the GISDBASE:E:ATMC. Are you missing a slash? On a Windows machine it should look like:

MAPSET: rain
GUI: wxpython

BTW, grassrc6 ?? You should really consider upgrading to GRASS 7.

  • Sorry sir, true it should be E:\ATMC.I typed wrongly in my question.As you said GISDBASE is not depending on the GISBASE.It is used as data directory.But i want to install exe at user site where i do not have control on drives to copy the grass libraries and GISDBASE directory.Can i plan like this: copy GRASS libraries in GISBASE in a temperory directory and GISDBASE folders in tempfolder where i have write permission. At the same time i will set environ ment variables for GISDABSE and GISBASE to tempdirectory for respective user of the machine for every process initiation.will it be ok. – user28542 Feb 18 '19 at 8:04
  • 1
    If you are compiling from source on the target computer, it should work. You can set the PREFIX in the configuration to whereever you have write access. If you are using the pre-compiled binaries, then I would guess that it needs windows registry settings and so on... So installing from the binaries requires Admin rights. – Micha Feb 18 '19 at 10:27

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.