[GRASS-user] v.in.ogr access PostGIS view

Moritz Lennert mlennert at club.worldonline.be
Tue Dec 11 02:05:55 PST 2012

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".


[1] http://www.gdal.org/ogr/drv_pg_advanced.html

More information about the grass-user mailing list