[GRASS-dev] Re: [GRASS-user] db.in.ogr [was dbf File not being Created with v.in.ascii]

Markus Neteler wrote:

PS: Unrelated - for table only input I have added 'db.in.ogr' to GRASS
6.3-CVS which imports DBF, CSV etc.

v.in.garmin:
# "COPY table FROM 'filename.txt'" does not work for DBF and there is no
# db.in.ascii yet, so we use a hack...

Is db.in.ogr the solution?

Hamish

Hamish wrote on 07/23/2007 11:54 AM:

Markus Neteler wrote:
  

PS: Unrelated - for table only input I have added 'db.in.ogr' to GRASS
6.3-CVS which imports DBF, CSV etc.
    
v.in.garmin:
# "COPY table FROM 'filename.txt'" does not work for DBF and there is no
# db.in.ascii yet, so we use a hack...

Is db.in.ogr the solution?
  

Yes, I think so. It reads CSV, but it must be comma separated.
Best read with .csvt file, see
http://www.gdal.org/ogr/drv_csv.html

"Limited type recognition can be done for Integer, Real and String
  columns through a descriptive file with same name as the CSV file, but
  .csvt extension. In a single line the types for each column have to be
  listed: double quoted and comma separated (e.g.,
  "Integer","String"). The driver will then use these types as specified
  for the csv columns.
"

Markus

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------

I have extended db.in.ogr to also import tables from SQLite,
PostgreSQL etc. See GRASS 6.3-CVS.

Markus

--
View this message in context: http://www.nabble.com/Re%3A--GRASS-user--db.in.ogr--was-dbf-File-not-being-Created-with-v.in.ascii--tf4128718.html#a12664084
Sent from the Grass - Dev mailing list archive at Nabble.com.