TwinTechs

Dream, Create, Deliver…

MySQL GIS patch

May 4th, 2008 Written by: Jesse Dailey · GIS, MySQL

After reading the OpenGIS for SQL specifications, it’s apparent that there is a layer of Spatial Representation control that is still missing from MySQL.

This makes the Distance functions as implemented not very useful for what most people use GIS for: latitude and longitude on the earth’s surface.

In the meantime, I have a patch that adds 2 functions: earth_distance_miles() and earth_distance_km() to the wl1326 branch.

To find the nearest X rows, on a database with 600k rows with a POINT column:
earth_distance_*() takes 3.04 seconds.
distance() takes 2.78 seconds.

[to download the patch right click on the link below and select save as]

Earth Distance Patch

→ No CommentsTags: ·