Thank you for your advice. I have re-run the import having corrected the
format as you suggest, using the command below:
v.in.ascii -z -n input=/home/rebecca/lidar/08.txt output=test_08_attribute
format=point {fs= } skip=0 {columns=columns= 'x double precision, y double
precision, z double precision, i double precision'} x=1 y=2 z=3 cat=0
--overwrite
However I now get the error message
"DBMI-SQLite driver error:
Unable to open database
</home/rebecca/Documents/Mapping/Grassdata/Salisbury/PERMANENT/sqlite> by
driver <sqlite>
Unable to open database: unable to open database file
Unable to open database
</home/rebecca/Documents/Mapping/Grassdata/Salisbury/PERMANENT/sqlite> by
driver <sqlite>"
so it maybe a problem with my database driver rather than the input file? I
have a folder called sqlite but no files within it...
Once again thanks for your help, any more suggestions about how to fix this
are welcome!
On Tue, Jan 26, 2010 at 9:02 AM, Rebecca Bennett <rabennett@ymail.com> wrote:
Dear Sela,
Thank you for your advice. I have re-run the import having corrected the
format as you suggest, using the command below:
v.in.ascii -z -n input=/home/rebecca/lidar/08.txt output=test_08_attribute
format=point {fs= } skip=0 {columns=columns= 'x double precision, y double
precision, z double precision, i double precision'} x=1 y=2 z=3 cat=0
--overwrite
However I now get the error message
"DBMI-SQLite driver error:
Unable to open database
</home/rebecca/Documents/Mapping/Grassdata/Salisbury/PERMANENT/sqlite> by
driver <sqlite>
Unable to open database: unable to open database file
Unable to open database
</home/rebecca/Documents/Mapping/Grassdata/Salisbury/PERMANENT/sqlite> by
driver <sqlite>"
so it maybe a problem with my database driver rather than the input file? I
have a folder called sqlite but no files within it...
Once again thanks for your help, any more suggestions about how to fix this
are welcome!
Looking at mine, the only difference I see is that the name of the
database is missing a ".db" extension. Please let me know if that
makes a difference.
Mark
On Tue, Jan 26, 2010 at 9:09 AM, Rebecca Bennett <rabennett@ymail.com> wrote:
Looking at mine, the only difference I see is that the name of the
database is missing a ".db" extension. Please let me know if that
makes a difference.
For the sqlite driver, the database must be a file, not a directory. The GRASS standard is sqlite.db I think. I would delete the folder sqlite and reset the database connection either with
Having changed the database to have a .db at the end I re-ran the import,
getting the following output and error
"Scanning input for column types...
Maximum input row length: 35
Minimum number of columns: 4
Maximum number of columns: 4
DBMI-SQLite driver error:
Error in sqlite3_prepare():
near "=": syntax error
Table <test_08_attribute> linked to vector map <test_08_attribute> does not
exist
Unable to create table: create table test_08_attribute ( cat integer,
columns= 'x double precision, y double precision, z double precision, i
double precision' )"
Does this mean it is not able to create the table now it can see the
database? Any ideas for a fix?
OK, sorry I spotted an obvious error looking at that again. Removing the
extra "columns=" I ran the command again
v.in.ascii -z -n input=/home/rebecca/lidar/08.txt output=test_08_attribute
format=point {fs= } skip=0 {columns= 'x double precision, y double
precision, z double precision, i double precision'} x=1 y=2 z=3 cat=0
--overwrite
I now have the error
Table <test_08_attribute> linked to vector map <test_08_attribute> does not
exist
Number of columns defined (1) does not match number of columns (4) in input
OK I think I have cracked this by removing the quotation marks from the
column descriptors in the command . I now have a point file with
attributes and a database that works (hopefully).
Allow me to suggest that you name your SQLite databases by project,
location, or other unique identifier. Naming the database with the
application's name can cause confusion for other applications.