Hello Kirk,
On Fri, 9 Jun 2006 13:32:15 -0500 "Kirk R. Wythers" <kwythers@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.
Best regards.
Stephan
--
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office - Mengendamm 16d - D-30177 Hannover
Internet: www.gdf-hannover.de - Email: holl@gdf-hannover.de
Phone : ++49-(0)511.39088507 - Fax: ++49-(0)511.39088508
On Mon, 12 Jun 2006, Stephan Holl wrote:
Hello Kirk,
On Fri, 9 Jun 2006 13:32:15 -0500 "Kirk R. Wythers" <kwythers@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.
On Jun 12, 2006, at 6:30 PM, Brent Wood wrote:
On Mon, 12 Jun 2006, Stephan Holl wrote:
Hello Kirk,
On Fri, 9 Jun 2006 13:32:15 -0500 "Kirk R. Wythers" <kwythers@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.
Manual addition to the geometry_columns table did the trick. Thanks both of you.
Kirk