Dear GRASS users,
One of my colleagues wanted to edit the islands out. I suggested him to use GRASS to edit the islands (d.rast.edit). But he didnt want me to install the entire GRASS because it
would result in unneccesary consumption of memory as he wanted to use only one module of GRASS and didnt want other modules. So he asked me if i could install only the GRASS modules , libraries , which were needed by the d.rast.edit module which could work outside the GRASS enviroment at the bash prompt.
I modified the existing d.rast.edit module to delete insignificant islands(in the relative sense)
which were causing some errors in the model we were running. By this module , Onclick anywhere,
determines if its a island and if it is gives the option to delete the entire island i.e set as ocean instead of editing each individual cell out.
I wanted to know if i cud use GRASS modules at bash command prompt. I went through the GRASS SWIG/PERL implementation grass_warp.c .
But didnt quiet understand how i could implement it.
I have read and understood all the makefiles in ~/grass-6.0.1/include/Make/ and the init.sh file.
kindly drop in suggestions if using GRASS modules at bash prompt is possible and what i need to
do to accomplish that.
Nagesh
<http://mpa.itc.it/markus/grass61progman/swig/grass__wrap_8c.html>
Nagesh,
GRASS 6.1.cvs consumes a tiny total of ca. 72 MB on your hard disk drive. With 320 GB disks costing around 150$,
are you sure it will be worth the trouble figuring all this out
to save a few megabytes? Won't it be easier to convince your
boss to just install GRASS?
Once that is done, it is easy to write scripts that start a
GRASS shell session, then carry out whatever action you want
them to.
Best,
Benjamin
Nagesh Bhatkar wrote:
Dear GRASS users,
One of my colleagues wanted to edit the islands out. I suggested him to use GRASS to edit the islands (d.rast.edit). But he didnt want me to install the entire GRASS because it
would result in unneccesary consumption of memory as he wanted to use only one module of GRASS and didnt want other modules. So he asked me if i could install only the GRASS modules , libraries , which were needed by the d.rast.edit module which could work outside the GRASS enviroment at the bash prompt.
I modified the existing d.rast.edit module to delete insignificant islands(in the relative sense)
which were causing some errors in the model we were running. By this module , Onclick anywhere,
determines if its a island and if it is gives the option to delete the entire island i.e set as ocean instead of editing each individual cell out.
I wanted to know if i cud use GRASS modules at bash command prompt. I went through the GRASS SWIG/PERL implementation grass_warp.c .
But didnt quiet understand how i could implement it.
I have read and understood all the makefiles in ~/grass-6.0.1/include/Make/ and the init.sh file.
kindly drop in suggestions if using GRASS modules at bash prompt is possible and what i need to
do to accomplish that.
Nagesh
<http://mpa.itc.it/markus/grass61progman/swig/grass__wrap_8c.html>
--
Benjamin Ducke, M.A.
Archäoinformatik
(Archaeo-Information Science)
Institut für Ur- und Frühgeschichte
(Institute of Archaeology)
Christian-Albrechts-Universität zu Kiel
Johanna-Mestorf-Straße 2-6
D 24098 Kiel
Germany
Tel.: ++49 (0)431 880-3378 / -3379
Fax : ++49 (0)431 880-7300
www.uni-kiel.de/ufg
Hello Benjamin,
Thanks for writing back and dropping in your Suggestion.
I have installed the Entire GRASS 6.0.1 package on my system since i have being using GRASS extensively since
a long time to interpolate data and carry out digitization . I agree with you that GRASS 6.1 is a tiny total of 72 MB in modern day era.
I wanted to use the GRASS commands at the bash prompt. Was looking if anyone could give me suggestions as to how i could make that possible.
Am aware thats its an ardous task but might as well give it a try. Earlier i read in the GRASSLIST archives, one of the GRASS users asking for the same.
Regards
Nagesh
Benjamin Ducke wrote:
Nagesh,
GRASS 6.1.cvs consumes a tiny total of ca. 72 MB on your hard disk drive. With 320 GB disks costing around 150$,
are you sure it will be worth the trouble figuring all this out
to save a few megabytes? Won't it be easier to convince your
boss to just install GRASS?
Once that is done, it is easy to write scripts that start a
GRASS shell session, then carry out whatever action you want
them to.
Best,
Benjamin
Nagesh Bhatkar wrote:
Dear GRASS users,
One of my colleagues wanted to edit the islands out. I suggested him to use GRASS to edit the islands (d.rast.edit). But he didnt want me to install the entire GRASS because it
would result in unneccesary consumption of memory as he wanted to use only one module of GRASS and didnt want other modules. So he asked me if i could install only the GRASS modules , libraries , which were needed by the d.rast.edit module which could work outside the GRASS enviroment at the bash prompt.
I modified the existing d.rast.edit module to delete insignificant islands(in the relative sense)
which were causing some errors in the model we were running. By this module , Onclick anywhere,
determines if its a island and if it is gives the option to delete the entire island i.e set as ocean instead of editing each individual cell out.
I wanted to know if i cud use GRASS modules at bash command prompt. I went through the GRASS SWIG/PERL implementation grass_warp.c .
But didnt quiet understand how i could implement it.
I have read and understood all the makefiles in ~/grass-6.0.1/include/Make/ and the init.sh file.
kindly drop in suggestions if using GRASS modules at bash prompt is possible and what i need to
do to accomplish that.
Nagesh
<http://mpa.itc.it/markus/grass61progman/swig/grass__wrap_8c.html>
OK, I hacked up a little wrapper script that allows you to remotely
run GRASS commands in shell scripts.
I have attached it to this email.
What you do is:
chmod u+x grass-remote
./grass-remote GRASSDB/LOCATION/MAPSET myscript.bash
where GRASSDB/LOCATION/MAPSET is the full path to your GRASS 6 mapset.
You specify the shell script to run as second parameter.
In this case, myscript.bash could contain arbitrary GRASS commands like:
#!/bin/bash
g.list rast
g.list vect
...
needless to say that interactive modules will block the script until
the user finishes them.
You need to have GRASS 6 fully installed on your system to make this work.
Hope this helps,
Benjamin
Nagesh Bhatkar wrote:
Hello Benjamin,
Thanks for writing back and dropping in your Suggestion.
I have installed the Entire GRASS 6.0.1 package on my system since i have being using GRASS extensively since
a long time to interpolate data and carry out digitization . I agree with you that GRASS 6.1 is a tiny total of 72 MB in modern day era.
I wanted to use the GRASS commands at the bash prompt. Was looking if anyone could give me suggestions as to how i could make that possible.
Am aware thats its an ardous task but might as well give it a try. Earlier i read in the GRASSLIST archives, one of the GRASS users asking for the same.
Regards
Nagesh
Benjamin Ducke wrote:
Nagesh,
GRASS 6.1.cvs consumes a tiny total of ca. 72 MB on your hard disk drive. With 320 GB disks costing around 150$,
are you sure it will be worth the trouble figuring all this out
to save a few megabytes? Won't it be easier to convince your
boss to just install GRASS?
Once that is done, it is easy to write scripts that start a
GRASS shell session, then carry out whatever action you want
them to.
Best,
Benjamin
Nagesh Bhatkar wrote:
Dear GRASS users,
One of my colleagues wanted to edit the islands out. I suggested him to use GRASS to edit the islands (d.rast.edit). But he didnt want me to install the entire GRASS because it
would result in unneccesary consumption of memory as he wanted to use only one module of GRASS and didnt want other modules. So he asked me if i could install only the GRASS modules , libraries , which were needed by the d.rast.edit module which could work outside the GRASS enviroment at the bash prompt.
I modified the existing d.rast.edit module to delete insignificant islands(in the relative sense)
which were causing some errors in the model we were running. By this module , Onclick anywhere,
determines if its a island and if it is gives the option to delete the entire island i.e set as ocean instead of editing each individual cell out.
I wanted to know if i cud use GRASS modules at bash command prompt. I went through the GRASS SWIG/PERL implementation grass_warp.c .
But didnt quiet understand how i could implement it.
I have read and understood all the makefiles in ~/grass-6.0.1/include/Make/ and the init.sh file.
kindly drop in suggestions if using GRASS modules at bash prompt is possible and what i need to
do to accomplish that.
Nagesh
<http://mpa.itc.it/markus/grass61progman/swig/grass__wrap_8c.html>
--
Benjamin Ducke, M.A.
Archäoinformatik
(Archaeo-Information Science)
Institut für Ur- und Frühgeschichte
(Institute of Archaeology)
Christian-Albrechts-Universität zu Kiel
Johanna-Mestorf-Straße 2-6
D 24098 Kiel
Germany
Tel.: ++49 (0)431 880-3378 / -3379
Fax : ++49 (0)431 880-7300
www.uni-kiel.de/ufg
(attachments)
grass-remote (15.7 KB)
myscript.bash (24 Bytes)