TransWikia.com

GRASS: db.in.ogr fails where v.in.ogr succeeds

Geographic Information Systems Asked on August 4, 2021

This is a follow up on a previous question on the storage of vectors layers imported from PostGIS.

To importing a spatial table from PostGIS I use, sucessfully, the following formulation with v.in.ogr:

> v.in.ogr input="PG:host=pg-server dbname=dsm user=duque004 password=secret" layer="observations.profiles" output=profiles -o
Over-riding projection check
Check if OGR layer <observations.profiles> contains polygons...
ERROR 1: Could not fetch SRS: 
 100%
Creating attribute table for layer <observations.profiles>...
Importing 141584 features (OGR layer <observations.profiles>)...
 100%
-----------------------------------------------------
Building topology for vector map <profiles@test>...
Registering primitives...

But if I feed the same parameters to db.in.ogr, it fails to find the table:

> db.in.ogr input="PG:host=pg-server dbname=dsm user=duque004 password=secret" db_table="observations.profiles" output=profiles
ERROR: Unable to open data source <observations.profiles>
ERROR: Input table <observations.profiles> not found or not
       readable

What is going on here?

Edit: these outputs report to GRASS 7.6.0

Update 01-05-2019: This issue is now reported in ticket 3836.

One Answer

I think you are hit by a SQL restriction:

No dots are allowed as SQL does not support '.' (dots) in table names.

See also the related help text at:

https://grass.osgeo.org/grass76/manuals/sql.html#database-table-name-restrictions

Answered by markusN on August 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP