MySQL Forums
Forum List  »  GIS

How to un-convert GeomFromText()
Posted by: jimbo pruett
Date: May 20, 2010 09:31PM

I am using a standard GIS example from:
http://dev.mysql.com/tech-resources/articles/4.1/gis-with-mysql.html

Newbie Question: How do I get back to lat, lon text?



CREATE TABLE address (
address CHAR(80) NOT NULL,
address_loc POINT NOT NULL,
PRIMARY KEY(address),
SPATIAL KEY(address_loc)
);

CREATE TABLE cab (
cab_id INT AUTO_INCREMENT NOT NULL,
cab_driver CHAR(80) NOT NULL,
cab_loc POINT NOT NULL,
PRIMARY KEY(cab_id),
SPATIAL KEY(cab_loc)
);

INSERT INTO address VALUES('Foobar street 12', GeomFromText('POINT(2671 2500)'));


SELECT address_loc FROM `address` where address="Foobar street 59"

returns
address_loc
Edit Delete ����~
/�\��-�^*B@

where I really need is the 2671 2500 text numbers.

Any help appreciated.
jim pruett

Options: ReplyQuote


Subject
Views
Written By
Posted
How to un-convert GeomFromText()
6624
May 20, 2010 09:31PM


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.