How are Geography / Geometry Shape Area & Shape Length useful?
I recently downloaded some pre-loaded shapes of Countries & Provinces into Sql Server 2008
http://sqlsamplegeo.codeplex.com/
Along with the Geography column, each country and province has a 'ShapeArea' & 'ShapeLength' column (of type float).
I was wondering how/why it might be useful to store these values in their own columns? I believe you can attain these values at any point by executing STArea() & STLeng开发者_C百科th()
It takes time to compute these values - especially area which would require a complex integration (possibly on a sphere, depending on the coordinate system). So to store them as precomputed values saves a lot of computation time.
精彩评论