Solved

what is the correct way to get the latitude or longitude from a mysql column which has a spatial index

Posted on 2012-03-29
1
296 Views
Last Modified: 2012-03-29
The column i have is latlong, which stores lat and longitude as point spatial data type.

I am currently getting the latitude and longitude value like this...

latitude - x(GeomFromText(astext( latlong )))
longitude - y(GeomFromText(astext( latlong )))

I was just wondering if this is the correct and fastest way to select the latitude or longitude value?
0
Comment
Question by:Rakz0r
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
Rakz0r earned 0 total points
ID: 37783659
simply x(latlong) is good enough and fastest way (as far as i know)
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Accessing variables in MySQL query 4 54
SQL Server syntax 11 41
MS SQL GROUP BY 6 76
T-SQL Query - Group By Year 3 29
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question