MULTIPLE ATTRIBUTES FOR RASTER FILES

>
>
>
> Hi.
>
> I need to represent multiple attributes in GRASS raster files.
> For example, surface roughness, dielectric constant, veg. cover, etc.
> I can think of two ways to do this:
>
> 1. create multiple raster maps for the terrain, one for
> each attribute. The attribute in each file stores the value
> for the original attribute.
>
> 2. have the single attribute in the raster file store the
> values of all the attributes after encoding them, e.g.
> the first digit in the attributes represents roughness,
> the second, veg. cover, and so on.
>
> I can understand that the second method is extremely dirty in terms
> of simplicity, expandability, etc. But I would like to know if anyone
> has tried it. ANY other comments are welcome.
>
> -Raj
>

We are currently working on a GRASS-RDBMS interface which will enable
multiple attributes to be associated with either raster/vector or
polygonal features. The current version of the interface is designed
to be used with INFORMIX RDBMS products. However, the software
design has been developed with an ey towards easy implementation
with any ANSI SQL product. The beta release for this code will be
decided during the users group meeting in Denver. I expect that
a date in June or July is realistic for Beta code.

jaf

==================================================

James A. Farley email: jim@moray.uark.edu
Technical Director
CAST voice: (501)-575-6159
University of fax: (501)-575-3846
Arkansas
Fayetteville, AR 72701

==================================================

Currently we distribute teh SQL-like dbms RIM with GRASS. Using it (you will
need a Fortran compiler) you can access multiple attributes. It is fairly easy
to write shell scripts that use RIM and v(s).db.rim. One such is:

#!/bin/sh

# usage: dbqueryi data-base vect-map normal-color highlight-color

dbname=$1
file=$2
ncolor=$3
hcolor=$4

d.vect $file c=$ncolor

while true
do
echo
echo "Select a point on the graphics screen with the mouse..."

set `d.where -1 | tr "." " "`

echo "Getting the record from the data base and highlighting the vector..."

v.db.rim $dbname <<EOF
.output /dev/null
.find
$1 $3 1
.vector_map temp.vect
y
!d.vect temp.vect c=$hcolor >/dev/null
.output
.print
.output
.ex
EOF

echo
echo "Enter Q to Quit:"
echo "or ENTER to continue"
read line
d.vect temp.vect c=$ncolor >/dev/null

if [ "$line" = "Q" ]
then
        exit
fi

done

You use v.db.rim to build the data base. It will work with either polygonal,
line, or site vector files, or site_list files.

Jerry Thompson
Spatial Analysis Systems Team, USACERL