Follow up to “Floats, numerics, java, mysql, precision and rounding…”
Have updated to use double rather than float and that appears to give me the precision I now need and it’s done the trick – found I had one or two other little bugs too that needed fixed so has taken me longer to get this sorted than I would’ve liked.
Also, now that it’s done there appears to be some slight anomalies when the clustering is viewed on Google maps, though this is actually just to do with where the grid boundaries are and the concentration of points around intersections of the grid lines. Take the image below as an example:

The lines are the grid squares, the black dots represent the actual locations and the red dots where the points have been clustered for a given square. If the above was represented on Google maps, then there would be 4 markers relatively close together (possibly overlapping), whereas you would probably expect the points to be clustered to a single point, some where in the middle of the image.
Anyway, this only seems to be cropping up on certain zoom levels (to do with where the divisions of the squares occur) and in certain areas and I don’t think there’s much I can do about it unless I implemented a ‘proper’ clustering algorithm – as opposed to an approximation to one.










