[GRASSLIST:5227] creating vector points layer from database coordinates
Chris Fonnesbeck
fonnesbeck at gmail.com
Sat Dec 25 13:25:43 EST 2004
I am trying to create a coverage consisting of x,y points derived from
a mysql data table. Unfortunately, I am running into problems using
both the v.in.db and db.select solutions in the documentation. Using
v.in.db ( v.in.db driver=mysql database=test table=mortality
x=LONGITUDE y=LATITUDE key=recid out=mortality2), I get the following
error:
Error in db_execute_immediate()
WARNING: Cannot create new table: 'create table mortality2 ( recid integer,
DATE varchar(6), FILEDBY varchar(20), FIELDID varchar(10), FMPCASE
varchar(5), FMPDIST varchar(2), SEX varchar(1), LENGTH double
precision ... etc.
However, when I cut and paste the sql code into the database directly,
the table is created without any problem!
Next, trying the db.select approach(echo "select
LONGITUDE,LATITUDE,RECID from mortality" | db.select driver=mysql
database=test table=mortality | v.in.ascii output=mortality2), I get a
segmentation fault:
D4/5: row 2944 col 75: 0.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 76: 0.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 77: 0.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 78: 0.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 79: 0.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 80: 0.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 81: 0.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 82: 0.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 83: 0.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 84: 22.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 85: 15.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 86: 7.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 87: 38.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 88: 31.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 89: 0.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 90: 0.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 91: 0.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 92: 0.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 93: 4.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 94: 3.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 95: is_int = 1 is_double = 1
D4/5: row 2944 col 96: 0.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 97: 0.000000 is_int = 0 is_double = 1
D4/5: row 2944 col 98: is_int = 1 is_double = 1
D4/5: row 2944 col 99: is_int = 1 is_double = 1
D4/5: row 2944 col 100: is_int = 1 is_double = 1
D4/5: row 2944 col 101: is_int = 1 is_double = 1
D4/5: row 2944 col 102: -82.432850 is_int = 0 is_double = 1
D4/5: row 2944 col 103: 27.133310 is_int = 0 is_double = 1
Segmentation fault
I am using a recent cvs compile of 5.7 for this. Any hints as to why
either of these methods are failing would be most helpful.
Chris
More information about the grass-user
mailing list