[GRASSLIST:5328] Re: database queries

Hamish hamish_nospam at yahoo.com
Thu Jan 13 00:51:58 EST 2005


> > 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




More information about the grass-user mailing list