[GRASS-user] Fw: another v.in.ogr question

Brent Wood b.wood at niwa.co.nz
Mon Jun 12 19:30:54 EDT 2006



On Mon, 12 Jun 2006, Stephan Holl wrote:

> Hello Kirk,
>
> On Fri, 9 Jun 2006 13:32:15 -0500 "Kirk R. Wythers" <kwythers at umn.edu>
> wrote:
>
> > Is it possible to read multiple tables from postgis (postgresql)
> > into grass with v.in.ogr? I seem to be able to only read in the table
> > that contains the geometry data. I tried creating a postgresql view
> > that contains all the columns (from multiple tables) that I need,
> > however, v.in.ogr does not seem to see the view.
>
> Did you make sure that the view is also included in the
> table geometry_columns?! Try using the addgeometrycolumn() from within
> postgis.
>
> AFAIK this is needed for OGR to work with views as well.

The AddGeometryColumns() function will create both the column itself as
well as adding the record in the geometry_columns table. I don't think it
can be used to just add the record.

So in cases such as views, where the geometry column already exists, and
you need to add the metadata record in the geometry_colunms entry, you
need to do this manually.


Brent Wood.




More information about the grass-user mailing list