[GRASS-user] Importing ArcASCII raster and associated dbf table?

Devereux, Jarl M Jarl.Devereux at dpi.qld.gov.au
Mon Feb 9 17:27:08 EST 2009


 thanks Hamish,

The data is an Australian soils atlas including hydraulic properties in
the dbf. 

From the accompanying documentation "Spatial data are available as
ArcASCII format raster files. The associated database is a binary file
in dBase or dbf format. The projection information is in ArcGIS format."

"This data set consists of nine sets of data files each containing the
following:
aas_*.asc An ArcASCII file containing a raster of the soil landscape
index.
aas_*.dbf A dBase file of soil properties linked to the soil landscape
index.
aas_*.prj A file containing projection information in the ArcGIS
format."

I don't know what arcviews capabilities are, so I'm not sure how it
would handle the data. However it seems like I should be able to link
the database in grass to the vector map I created.

The .dbf has the following columns the first column is (int) second
(varchar(12) and the rest are all integers or floating pt :

VALUE , MAP_UNIT , DATASUPT, SOLDEPTH, SOLPAWHC, A_THICK, A_KSAT,
A_KS_ERR, A_SAT, A_FCP, A_WP, A_PAWHC, A_WR_UNR, B_PERCNT, B_THICK,
B_KSAT, B_KS_ERR, B_SAT, B_FCP, B_WP, B_PAWHC, B_WR_UNR ()

The dbf column "Value" corresponds to the CAT number of the vector map I
created. The DBF contains additional "value" codes since not all the
soils are present in the area I'm looking at. So "cat" 3 matches to
"value" 3 etc.

V.db.connect may be the right tool however I don't know how to drive it.
All the tutorials I found were for old grass versions and seemed to
assume I knew how to handle databases.

I'm now using the native windows grass 6.3

Kindest regards
Jarl

-----Original Message-----
From: Hamish [mailto:hamish_b at yahoo.com] 
Sent: Friday, 6 February 2009 9:37 AM
To: grass-user at lists.osgeo.org; Devereux, Jarl M
Subject: Re: [GRASS-user] Importing ArcASCII raster and associated dbf
table?

Jarl Devereux wrote:
> I'm new to grass and I'm trying to import an ArcASCII raster file with

> an associated dbf table into a cygwin grass 6.2.
> I have been using r.in.gdal to import the raster without issue

(r.in.arc might work too)

> however handling the attribute data is still a mystery to me.
> 
> Can I connect a raster to a dbf table or add the attributes as layers?

what is the form of the fields in the database?

If simply category:label you can use the rules= option of the r.category
module in GRASS 6.3+ to attach them. For GRASS 6.2 you would have to
create the cats/ file by hand. (it's just a text file)

see http://grass.osgeo.org/grass64/manuals/html64_user/r.category.html


There is the possibility that you could pipe the dbf into r.category
with the "dbview" utility.

 
> The db.* commands seemed to be only vector based

right,

> so I converted the raster to an area vector using the raster values as

> the cat. I am not sure of the steps to copy or attach the arc dbf 
> table.

v.db.connect?

> my cat values are not consecutive

that's ok

> and the .dbf table that accompanied the data doesn't have a "cat" 
> column it has a consecutive "value" column instead.

so is the Arc map categorical or floating point real numbers? what does
it represent?

is the DBF file like 0.0-500m: Lowlands   500.0-1000.0m Midlands    
1000.0-3000.0m Highlands or......?


> How do I go about adding this table to the vector so it correctly 
> matches up "value" and "cat"?

need more info.


Hamish



      


********************************DISCLAIMER****************************
The information contained in the above e-mail message or messages 
(which includes any attachments) is confidential and may be legally 
privileged.  It is intended only for the use of the person or entity 
to which it is addressed.  If you are not the addressee any form of 
disclosure, copying, modification, distribution or any action taken 
or omitted in reliance on the information is unauthorised.  Opinions 
contained in the message(s) do not necessarily reflect the opinions 
of the Queensland Government and its authorities.  If you received 
this communication in error, please notify the sender immediately 
and delete it from your computer system network.



More information about the grass-user mailing list