Data source contains 6 layers:
gshhs_c_l1, gshhs_f_l1, gshhs_h_l1, gshhs_i_l1, gshhs_l_l1, regions
but these are only tables. The database has a number of views that I'd
like to access, but they are not listed. Is this a limitation in
v.in.ogr? Thanks.
I forgot to mention the GRASS version I am using: 6.4.2 (from Debian
sid). Thanks.
Seb
On Fri, 30 Nov 2012 21:53:00 -0600,
Seb <spluque@gmail.com> wrote:
Hi, It seems as if v.in.ogr cannot access views:
v.in.ogr dsn="PG:dbname=gshhs" -l
Data source contains 6 layers: gshhs_c_l1, gshhs_f_l1, gshhs_h_l1,
gshhs_i_l1, gshhs_l_l1, regions
but these are only tables. The database has a number of views that
I'd like to access, but they are not listed. Is this a limitation in
v.in.ogr? Thanks.
Data source contains 6 layers:
gshhs_c_l1, gshhs_f_l1, gshhs_h_l1, gshhs_i_l1, gshhs_l_l1, regions
but these are only tables. The database has a number of views that I'd
like to access, but they are not listed. Is this a limitation in
v.in.ogr? Thanks.
AFAIK, this comes directly from OGR, not from GRASS. IIUC you have to add the view manually to geometry_columns in your database for it to show up in the list. However, you should be able to access views directly through their name. Check [1] for more info, notably the section on "Named views".
On Tue, 11 Dec 2012 11:05:55 +0100,
Moritz Lennert <mlennert@club.worldonline.be> wrote:
On 01/12/12 04:53, Seb wrote:
Hi,
It seems as if v.in.ogr cannot access views:
v.in.ogr dsn="PG:dbname=gshhs" -l
Data source contains 6 layers: gshhs_c_l1, gshhs_f_l1, gshhs_h_l1,
gshhs_i_l1, gshhs_l_l1, regions
but these are only tables. The database has a number of views that
I'd like to access, but they are not listed. Is this a limitation in
v.in.ogr? Thanks.
AFAIK, this comes directly from OGR, not from GRASS. IIUC you have to
add the view manually to geometry_columns in your database for it to
show up in the list. However, you should be able to access views
directly through their name. Check [1] for more info, notably the
section on "Named views".
Thanks Moritz, setting PG_LIST_ALL_TABLES=YES did allow access to the
views (I wasn't able to do that without it). I guess that registering
the view in the geometry_columns table allows OGR to gather SRS and
geometry type info. In fact, I had to use the -o flag in v.in.ogr to
skip the projection check.