Anyone have any suggestions for the best language to learn/use if we want to
r un GRASS commands via batch processing?
--j
--
Jonathan A. Greenberg, PhD
NRC Research Associate
NASA Ames Research Center
MS 242-4
Moffett Field, CA 94035-1000
Office: 650-604-5896
Cell: 415-794-5043
AIM: jgrn307
MSN: jgrn307@hotmail.com
On 12/15/05, Jonathan Greenberg <jgreenberg@arc.nasa.gov> wrote:
Anyone have any suggestions for the best language to learn/use if we want to
r un GRASS commands via batch processing?
You can go quite a long way with the Bash shell. O'Reilly has a book
titled "Learning the Bash Shell" which I found to be helpful.
I agree. If you can get into Bash, then you can do some great stuff.
On top of that I often use various text processing commands (sed, grep,
etc) to help filter out unwanted info. In the geoprocessing world I
usually end up also using Python with GDAL/OGR - great scripting plus
some spatial imagery/vector smarts.
Anyone have any suggestions for the best language to learn/use if we
want to run GRASS commands via batch processing?
UNIX (bash) scripting.
a google search for "bash scripting" should give you lots of guides.
or look in the GRASS source code scripts/ directory for some examples.
Perl etc will be useful for more advanced stuff, but for starters bash
scripting will probably be the most straight forward and there shouldn't
be much you can't do.
Markus recently added the framework for SWIG bindings, which may be of
interest to Python etc scripters who want access to the C API. (although
I think most custom tasks can be done in GRASS using a string of modules)
Anyone have any suggestions for the best language to learn/use if we want to
run GRASS commands via batch processing?
I use Perl for my scripting (not just for GRASS), though I do not dispute
the advantages of bash. Perl allows me to do more than I can with bash,
but then, I'm better at Perl!
I'm building a big script for my dissertation data (1608 months of data
with a variety of overlay maps)...without scripting I'd be in real
trouble.
Actually almost any language will fit. I had some PHP experience and I
wrote my scripts in PHP. If you wan to run some huge data analysis
using script and mapcalc, after some time you will find C useful
wbr,
Maris.
2005/12/16, Jesse H. Hamner <jhamner@emory.edu>:
On Thu, 15 Dec 2005, Jonathan Greenberg wrote:
> Anyone have any suggestions for the best language to learn/use if we want to
> run GRASS commands via batch processing?
I use Perl for my scripting (not just for GRASS), though I do not dispute
the advantages of bash. Perl allows me to do more than I can with bash,
but then, I'm better at Perl!
I'm building a big script for my dissertation data (1608 months of data
with a variety of overlay maps)...without scripting I'd be in real
trouble.