improved CheckOriantation and CalculateCentroid
improved performance of spatial linking, added new CalculateCentroid method