MySQL Forums
Forum List  »  GIS

Can not input CSV file with WKT into mysql
Posted by: lee light
Date: February 02, 2007 04:27PM

At first create a table containing spatial colomn:
CREATE TABLE `geometry` (
`id` int( 11 ),
`geom` GEOMETRY ,
PRIMARY KEY ( `id` )
) TYPE = MYISAM;

This is one CSV file with WKT,here is just one line for testing:
1;GeomFromText('LINESTRING(1283074 10562093,1283074 10562093,1283074 10562093)')

but I met this error:
Cannot get geometry object from data you send to the GEOMETRY field (1416)

But if I use such SQL code, it works fine.
INSERT INTO `geometry` ( `id` , `geom` )
VALUES (
'1', GeomFromText('LINESTRING(1283074 10562093,1283074 10562093,1283074 10562093)')
) ;


Who know the reason? Thank you!

Options: ReplyQuote


Subject
Views
Written By
Posted
Can not input CSV file with WKT into mysql
6363
February 02, 2007 04:27PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.