MySQL Forums
Forum List  »  GIS

geo cordinates to mysql wkt
Posted by: Euclid Me
Date: April 10, 2009 04:05AM

hi,

how do we convert google map latlng coordiantes to utm which mysql understands.

SCENARIO

i click on Innsbruck - the latlng returned by google map api is
lat: 47.2626455432058
lng: 11.394656195068347

For Munchen its
lat: 48.138900363549034
lng: 11.577990545654284

i preserve all the decimal and query the length from Innsbruck to
Munchen

SELECT GLENGTH(GEOMFROMTEXT('LINESTRING(47.2626455432058
11.394656195068347, 48.138900363549034 11.577990545654284)'))

results in - 0.89522845926586

is it as simple as this?

just read this point "Well-Known Text is a format for the textual
representation of geometric objects. The UTM coordinates
of "Innsbruck" in WKT format look like this: POINT(681547.32
5237595.88)"

should i be translating the lat lng to UTM coordinates?
thus saving Innsbruck to a point datatype as POINT(681547.32
5237595.88) rather than POINT(47.2626455432058 11.394656195068347)
and then apply the geom function on the data.

thanks,

px

Options: ReplyQuote


Subject
Views
Written By
Posted
geo cordinates to mysql wkt
6301
April 10, 2009 04:05AM


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.