Message: 6
Date: Sun, 7 Mar 2010 06:02:51 -0800 (PST)
From: Gary Nobles <garynob...@yahoo.com>
Subject: [GRASS-user] SQL and GRASS
To: grass-user@lists.osgeo.org
Message-ID: <1267970571671-4690410.p...@n2.nabble.com>
Content-Type: text/plain; charset=us-ascii


GRASS is connected to a MySQL data base

I want to select polygons which are not 0
so do I do:

d.vect  SiteGrid3 where "SquareNumber<>0 "
or
v.db.select map=SiteGrid3 column=square_no where=<>0


I have a second non spatial table described below(right)

grass SiteGrid3  (one)            Pottery table (many)
|cat|SquareNumber|            |SquareNumber|Type|
|1   |1                 |            |1                  |mug |
|2   |2                 |            |1                  |mug |
|3   |3                 |            |1                  |mug |
it continues...


so now I want to select the square number but be able to use v.what to
return the amount of pottery.

Any ideas? This is easy in sql but I want to show it in GRASS

Thanks

Gary

Gary,

Easy.

d.vect SiteGrid3 where="SquareNumber<>0"
or
v.db.select map=SiteGrid3 column=square_no where="square_no<>0"

In Grass-GIS, "where" statements are generally followed by the equals sign, then the statement.

Richard C


_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to