I have a table in a MySQL database with a spatial geometry column of type POINT. I'd like to be able to take a point at the center of a map and find all records within X miles (or whatever distance) of it. I can't seem to find a good example or explanation of how to do this that doesn't get heavily into geometric math. I'm happy to go that route, but would first like to try and solve it with a true spatial database.
A:
It won't work because MySQL hasn't actually implemented the code to make this work. They only use bounding box queries.
Notice there are no functions listed here: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html
I would reccomend using PostGIS or Spatialite instead.
TheSteve0
2010-08-03 07:21:43
A:
monk.e.boy
2010-08-16 11:27:17
Thanks. I'll take a look at this.
Preston Crawford
2010-09-13 19:58:04