Ari Jolma > Geo-Raster-0.65 > rash

Download:
Geo-Raster-0.65.tar.gz

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

rash - raster shell - a Perl shell for raster algebra

SYNOPSIS ^

    rash.pl <options>

DESCRIPTION ^

rash is an extension of the basic Perl shell:

    while (<>) {
        eval;
        print $@;
    }

BASIC FUNCTIONALITY ^

rash uses Geo::Raster, thus rasters and PGPLOT graphics can be used readily. rash adds command line editing and history with Term::ReadLine. Database connectivity is added using the functionality provided by Raster module. rash can open a pipe to gnuplot for plotting data.

OPTIONS AND ARGUMENTS ^

-a

Same as specifying both --db-connection and --gnuplot. Tries to open a database connection into Raster module and a pipe to gnuplot.

--db-connection

Tries to open a database connection into Raster module. The default hostname ('' by Raster.pm) can be overridden with option -h hostname or argument --hostname=hostname. The default database (the name of the current directory by Raster.pm) can be overridden with argument --database=database. The default username with which to connect (the effective userid by Raster.pm) can be overridden with argument --username=username.

--gnuplot

Tries to open (an unbuffered) pipe GNUPLOT to gnuplot.

Options can be set from the rash command line with command options(..list of options and arguments...)

COMMANDS ^

output

Command output(filename) directs all output to file filename. If filename is not given, directs all output to STDOUT.

p

Command p is the standard perl print except when the first parameter is a reference to a hash or to an array. If the first parameter is a hash reference, p sorts the hash numerically and prints it using two columns (separated by single space) or several columns if the values are references to arrays. If the first parameter is a hash reference, p prints the array elements, each on its own row. If the element is a reference to an array, it is expanded.

plot

Command plot(argument,options) plots the argument using gnuplot. The argument should be either a reference to a hash (the returned value of raster method contents, histogram, or some such) or a string. The options should be a hash, i.e, a list of key, value -pairs written using the format: key1=>value1, key1=>value1, ...

For example:

plot($raster->contents,title=>'cell count of raster',with=>'impulses');

A hash argument is printed to a temporary file (.raster-tmp) and the command line

plot xrange ".raster-tmp" title with with

range = '' or [keymin-1:keymax+1] if with equals 'impulses'

title = 'notitle' or 'title title' if title is given in the command line as an option title=>'title'

with = 'lines' or what is given as an option with=>'with'

is piped to gnuplot.

A string argument is piped to gnuplot as a part of the command line

plot xrange yrange argument title

xrange, yrange, and title are empty strings or those given as options. If argument is a readable file, it is surrounded by double quotation marks.

Gnuplot can be instructed to plot into a png-file using option file=>1.

slurp

Command slurp(filename,options) reads the contents of a file into a hash (or an array, if option array=>1 is given). It is assumed that the file contains data in two (for hash) or more columns (for a array). In the case of an array the array values are references to arrays which each hold the values of one row of data.

vars ^

Command vars lists all variables, and if they are references, the type of data which they refer to.

SIGINT ^

rash installs a SIGINT handler which may used to cancel lengthy raster operations.

HELP ^

Commands ? and help run perldoc rash thus showing this manual page.

Command ? Raster and help Raster run man Raster thus showing the manual page of the Raster module.

EXECUTING SYSTEM COMMANDS ^

A command line which begins with '!' is interpreted as a system command.

syntax highlighting: