Performing Geospatial Calculations


I’m trying to figure out what’s the best way to perform geo-calculations on a mysql db. In the past I have crafted my own sql calc but I wonder if there is a better yii way? Whether by a module of some sort?

I found the post but no final solution.

Thanks in advance