[GRASSLIST:5287] database queries

Will any body please suggest any online documentation
(html,pdf etc) to learn GRASS57 database management
and query efficiently.

Ex: I use a vector file with 100 areas involving 10
attributes. How to generate a map with only a couple
of attributes, with a query or something.

Ravi

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

On Tuesday 11 January 2005 04:21 am, RAVI KUMAR wrote:

Will any body please suggest any online documentation
(html,pdf etc) to learn GRASS57 database management
and query efficiently.

Ex: I use a vector file with 100 areas involving 10
attributes. How to generate a map with only a couple
of attributes, with a query or something.

Ravi

you can do this in a couple of ways.

1. display vectors based on their CAT
2. display vectors based on some attribute
3. create a table in the RDBMS of your choice, and use this for deciding which
vectors to display.

I haven't been able to get the db.execute command to work on DBF files, so I
can't help much there. Also the 'where' option in d.vect doesn't seem to do
what I want either (operator error?)...

I have been creating tables in MySQL and using them as a basis for what I want
displayed. For more information on DB stuff, see the GRASS WIKI.

or, I have documented some things on using MySQL here:
http://basho.dept-lawr.ucdavis.edu/grass_and_tp/

cheers!

--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341

> Will any body please suggest any online documentation
> (html,pdf etc) to learn GRASS57 database management
> and query efficiently.
>
> Ex: I use a vector file with 100 areas involving 10
> attributes. How to generate a map with only a couple
> of attributes, with a query or something.

You can extract vector features to new map in GRASS 5.7 with the
v.extract module. see also v.select, v.in.region+v.overlay, etc

you can do this in a couple of ways.

1. display vectors based on their CAT
2. display vectors based on some attribute
3. create a table in the RDBMS of your choice, and use this for
deciding which vectors to display.

I haven't been able to get the db.execute command to work on DBF
files, so I can't help much there.

works fine for me. see the v.in.garmin script.

Also the 'where' option in d.vect doesn't seem to do what I want
either (operator error?)...

from:
  http://grass.ibiblio.org/grass57/manuals/html57_user/sql.html

Text-string matching requires the text part to be 'single quoted' and
multiple queries should be contained in "double quotes". e.g.

      d.vect map where="individual='juvenile' and area='beach'"
  
Hamish