Currently I'm developing location-based application. One of major application function is locating points based on search criteria and locating points in given range from one point.
Obvious choice was to store lat/lon as floats or integers but I found spatial data types in MySQL and started digging. Unfortunately if I'm correct spatial indexes are supported in MyISAM only which doesn't support foreign keys (which I need).
So, what's gonna be better (and faster) - storing lat/lon as normal numbers or using POINT type without index?
You can use a quadkey instead. Translate the x- and y value to a binary and then concatenate the binaries. The points get sorted along a z-curve, a.k.a monster curve. It has very good spatial properties. You can verify the upper bound with the mostsignificant bits.