Hello,
I have created a vector layer from a database table in an XY location (accidents_xy). Both the topology and a database table (accidents_xy) seem to have been created correctly. When I try to re-project the layer into a UTM location using r.proj, I receive the following error:
GRASS 6.4.1 (GRGHM_UTM):~ > v.proj input=accidents_xy location=InterurbanTest output=accidents_utm
DBMI-SQLite driver error:
Cannot create table:
create table sqlite.accidents_utm ( Name text, cat integer, Longitude double precision, Latitude double precision, Type text, Description text )
unknown database sqlite
WARNING: Unable to create table <sqlite.accidents_utm>
WARNING: Unable to copy table <sqlite.accidents_utm>
WARNING: Failed to copy attribute table to output map
Building topology for vector map <accidents_utm>…
Registering primitives…
62 primitives registered
62 vertices registered
Building areas…
100%
0 areas built
0 isles built
Attaching islands…
Attaching centroids…
100%
Number of nodes: 62
Number of primitives: 62
Number of points: 62
Number of lines: 0
Number of boundaries: 0
Number of centroids: 0
Number of areas: 0
Number of isles: 0
GRASS 6.4.1 (GRGHM_UTM):~ >
The topology layer is created and displays (accidents_utm), but there is no database table. I am running GRASS 6.4.1 and the Python GUI on a Mac, OS X 10.6.8.
Thanks for any suggestions about how to resolve the issue.
Dave
Dave Kindem
dkindem@gmail.com
Hello,
I have created a vector layer from a database table in an XY location (accidents_xy). Both the topology and a database table (accidents_xy) seem to have been created correctly. When I try to re-project the layer into a UTM location using r.proj, I receive the following error:
GRASS 6.4.1 (GRGHM_UTM):~ > v.proj input=accidents_xy location=InterurbanTest output=accidents_utm
DBMI-SQLite driver error:
Cannot create table:
create table sqlite.accidents_utm ( Name text, cat integer, Longitude double precision, Latitude double precision, Type text, Description text )
unknown database sqlite
Probably you have to first create an empty sqlite database. Check what your db parameters are with: “db.connect -p”
Then run “sqlite3 <path/to/database>”
Where the path is from the above. Probably by default something like: ~/grassdata/GRGHM_UTM//sqlite.db
Thanks Micha. I can now create the table.
Dave
Dave Kindem
dkindem@gmail.com
2012/1/1 Micha Silver <micha@arava.co.il>:
...
Probably you have to first create an empty sqlite database.
This should happen automatically. If not, I would consider it a bug.
Does any other Mac, OS X 10.6.8 user have such a problem that
the sqlite.db is not created automatically?
Markus
Markus,
Checking the database connection helped me identify the actual problem, which a bad VAR file in the location. Once I got rid of it and reconnected, r.project was able to create a new table.
Dave
Dave Kindem
dkindem@gmail.com
616.402.0864
On Jan 1, 2012, at 2:47 PM, Markus Neteler wrote:
2012/1/1 Micha Silver <micha@arava.co.il>:
…
Probably you have to first create an empty sqlite database.
This should happen automatically. If not, I would consider it a bug.
Does any other Mac, OS X 10.6.8 user have such a problem that
the sqlite.db is not created automatically?
Markus