Thu, Jun 9 2005
15:15:21
|
|
Request created by guest
|
|
Subject: v.in.ascii and MySQL do not function together as expected
Platform: GNU/Linux/i386
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
GRASS Version: grass-6.1.cvs_src_snapshot_2005_06_04
When importing ascii files with v.in.ascii, the database is not created according
to the manpage documentation. With this example:
echo "41.9613888888|12.45027777|Villa di Lucio Vero" | v.in.ascii output=LucioVero
x=1 y=2 cat=0 z=0 columns='x double, y double, Name varchar(100)'
which is quite much the same as in the manpage, the result is:
Maximum input row length: 46
Maximum number of columns: 3
Minimum number of columns: 3
column: 1 type: double
column: 2 type: double
column: 3 type: string length: 19
ERROR: Number of columns defined (0) does not match number of columns (3)
in input
The table in the database is created correctly, with cat integer as first and
then these three fields just as they are written above.
A second example:
echo "41.9613888888|12.45027777|Villa di Lucio Vero" | v.in.ascii output=LucioVero
This functions ok, and the results shown are:
Maximum input row length: 46
Maximum number of columns: 3
Minimum number of columns: 3
column: 1 type: double
column: 2 type: double
column: 3 type: string length: 19
Building topology ...
1 primitives registered
Building areas: 100%
0 areas built
0 isles built
Attaching islands:
Attaching centroids: 100%
Topology was built.
Number of nodes : 1
Number of primitives: 1
Number of points : 1
Number of lines : 0
Number of boundaries: 0
Number of centroids : 0
Number of areas : 0
Number of isles : 0
Which is quite as it should be. However, with this, the whole existence of the
column-option is quite meaningless. The table produced is
CREATE TABLE `LucioVero` (
`cat` int(11) default NULL,
`dbl_1` double default NULL,
`dbl_2` double default NULL,
`str_1` varchar(19) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Now what is wrong? I really don't need the dbl_1 and dbl_2 columns to hold the
coordinates, and it would be nice if str_1 were Name and its length were 100
instead of 19. Also, the resulting vector does not have anything to show on the
displays: d.vect LucioVero shows and empty map. v.out.ascii, however, produces
the original coordinates, so I guess in this case, all the data goes only to
the database and none of it is taken as coordinates.
There's definitively something wrong here. More information provided if needed.
Greetings,
Harri K. |
|
Sat, Aug 13 2005
13:06:18
|
|
Area changed to grass6.1 by msieczka
|
|
Wed, Aug 31 2005
20:52:41
|
|
Area changed to grass6 by mneteler
|
|
Tue, Jul 4 2006
15:08:49
|
|
Mail sent by mneteler
|
|
Hi,
the mysql driver was rewritten this year:
2006-01-24 11:47 radim
* Makefile, create_table.c, cursor.c, db.c, dbdriver.h, describe.c,
driver.c, error.c, execute.c, fetch.c, globals.h, index.c,
listtab.c, main.c, mysql.html, parse.c, proto.h, select.c: driver
rewritten
Could you please try again with a fresh GRASS 6.1 version?
Regards
Markus |
|
Tue, Oct 3 2006
13:43:46
|
|
Mail sent by mneteler
|
|
Harry,
the mysql driver was rewritten this year:
2006-01-24 11:47 radim
Could you please try again with a fresh GRASS 6.3 version?
Regards
Markus |
|
Sun, Dec 3 2006
21:44:41
|
|
Status changed to resolved by mneteler
|
|
Sun, Dec 3 2006
21:44:41
|
|
Mail sent by mneteler
|
|
Closing, feel free to reopen if needed.
Markus |
|