Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all issues solved #14

Merged
merged 2 commits into from
Jul 20, 2016
Merged

all issues solved #14

merged 2 commits into from
Jul 20, 2016

Conversation

mayank33
Copy link
Contributor

No description provided.

@epifanio
Copy link
Collaborator

@mayank33 @rashadkm can we set those envs in the cmake settings?

@rashadkm
Copy link
Owner

not in the cmake settings. that will say that once compiled and run there is no change.

like we discussed, we put them in a shell script inside webgrass/scripts and call it init_grass.sh.

Then later we can have an option in gui to change via browser. That will not be exactly updating the script but rather using wt and grass call to change the mapset, location, output image format etc..

@rashadkm
Copy link
Owner

i will test this on epinux tomorrow and merge it

@rashadkm
Copy link
Owner

Add the env vars in the script and put the script in a "scripts" dir. And remove the export calls in the pstream call.

@mayank33
Copy link
Contributor Author

done

// while (std::getline(proc.out(), line)){
// std::cout << "stdout: " << line << '\n';
// }
redi::ipstream proc("export GRASS_PNG_AUTO_WRITE=TRUE; export GRASS_PNG_COMPRESSION=9; export GRASS_TRANSPARENT=TRUE; export GRASS_TRUECOLOR=TRUE; export LD_LIBRARY_PATH=/usr/lib/grass70/lib; export GISBASE=/usr/lib/grass70/; export GISDBASE=/home/mayank/grassdata1; export GISRC=/home/mayank/.grass7/rc; export PATH=/usr/lib/grass70/bin:/usr/lib/grass70/scripts:$PATH; g.gisenv");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if you do those export in shell script and then running grass commands such as g.list rast ?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doing export there and then do g.list as a list in ipstream might not work. can you test it please?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you still could get mapset permission denied. but i want clean this up before merge. still getting mapset permission denied. i would recommend to build grass from source. the worst case, is we patch the source for webgrass!. but before that i want the script to run first and then run this command.

remember to run script as . ./scripts/grass_init.sh. (note the first dot )

@rashadkm rashadkm merged commit d1d1b23 into rashadkm:master Jul 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants