[GRASS-user] Display postgis query
Moritz Lennert
mlennert at club.worldonline.be
Wed May 11 03:40:05 EDT 2011
On 10/05/11 20:46, Daniel Victoria wrote:
> Hi Moritz,
>
> Thanks for the help. You just showed that it's possible to do
> sub-queries in sql that is, include a select statement inside the
> where clause :) I was not aware of that (I'm a new database user...)
>
> About the dataset, I first tried using v.external and now I created a
> Grass vector file. But somehow, for too complex queries, d.vect
> freezes. But I'm able to use v.extract with no problem and create the
> necessary files.
>
> Now a related question. Is there a way to join a new column to the
> dataset extracted by v.extract? Or will I need to do that on a second
> process. Because v.extract will give me the municipal polygons but the
> census information is on another table...
Two options:
- v.db.join: This will permanently fill your polygon table with the
census info
- Create a view connecting your polygon ids with the census info and the
use v.db.connect -o to connect your map to this view. This has the
advantage that your polygon attribute table is unchanged and you can
reconnect to it afterwards with v.db.connect -o, thus avoiding filling
the table more and more with new data. (Maybe this could be added as an
option to v.db.join ?)
Moritz
More information about the grass-user
mailing list