Static Analysis of Rail Grinding Templates