On 04/08/16 09:46, Markus Metz wrote:
On Wed, Aug 3, 2016 at 11:04 PM, Johannes Radinger
<[email protected]> wrote:
Hi all,

the database is the original sqlite database the ships with the the NC
grass7 location (nc_spm_08_grass7). I want to import a single table (e.g
'streams') from that NC grass7 database (source, sqlite) into my new
location (target) using db.in.ogr. As far as I understand, for the module
db.in.ogr the database scheme of the target location should not be of
relevance?! Interestingly, the database scheme (either sqlite, dbf etc) of
the source db/table is not explicitly specified in db.in.ogr?!

OGR recognizes the driver automatically.


Have you tried to import e.g. the 'streams' table of the PERMANENT mapset of
any NC grass7 sample location from within any other location?

Here the example from the manual:

db.in.ogr input=/path/to/sqlite.db db_table=census_raleigh
output=census_raleigh

this example can not work because input is replaced by db_table if
db_table is given. It seems that db.in.ogr works only with dbf and
only if input is the full path to the dbf file, db_table must not be
set. The fix would be easy: delete lines 74, 75 from db.in.ogr.py.

Right (sorry, saw this message after sending the other).

Maybe the best would be to rename these parameters to:

database=
and
table=

where database could be a directory for file-based tables (e.g. dbf) ?

Just like the input/layer parameters in v.in.ogr.

Moritz
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to