MySQL Forums
Forum List  »  GIS

Re: Can not input CSV file with WKT into mysql
Posted by: Bob Field
Date: February 02, 2007 05:20PM

I'd try something like this. Have your CSV file omit the GeomFromText() wrapper, then:
LOAD DATA INFILE 'filename'
  FIELDS TERMINATED BY ','
  (id, @geom)
  SET geom = GeomFromText(@geom);
Also I think since the comma occurs inside the geometry string, you might want to choose a different separator like |.

Options: ReplyQuote


Subject
Views
Written By
Posted
5654
February 02, 2007 04:27PM
Re: Can not input CSV file with WKT into mysql
3159
February 02, 2007 05:20PM


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.