title: Can I store WGS84 latitude / longitude directly as spatial data in MySQL?
body: <p>I have a set of <a href="http://en.wikipedia.org/wiki/World_Geodetic_System" rel="nofollow noreferrer">WGS84 coordinates</a>. The conservative approach is to store them as number ( <a href="https://stackoverflow.com/questions/1196415/what-datatype-to-use-when-storing-latitude-and-longitude-data-in-sql-databases">What datatype to use when storing latitude and longitude data in SQL databases?</a> ) and calculate distances as here ( <a href="https://stackoverflow.com/questions/2234204/latitude-longitude-find-nearest-latitude-longitude-complex-sql-or-complex-calc">latitude/longitude find nearest latitude/longitude - complex sql or complex calculation</a>).</p>
  
  <p>A little more advanced approach is to create a user defined function for "in range" ( <a href="https://stackoverflow.com/questions/3640448/mysql-user-defined-function-for-latitude-longitude-syntax">MySQL User Defined Function for Latitude Longitude Syntax</a> )</p>
  
  <p><a href="https://stackoverflow.com/questions/4726031/mysql-latitude-and-longitude-table-setup">MySQL latitude and Longitude table setup</a> uses a <a href="http://ftp.nchu.edu.tw/MySQL/doc/refman/5.0/en/using-a-spatial-index.html" rel="nofollow noreferrer">spatial index</a> . But I do not quite get if it is possible to directly store WGS coordinates, and then query a distance based on the <code>Point</code> data type?</p>
  
  <p>Example: Data look like this: <code>"lat" 40.7142298</code>, <code>"lng" -73.9614669</code>, and this is what I'd like to import. Then query like "select all tupel within 10km of lat / lng".</p>