public static void reproject ( CoordinateReferenceSystem from , CoordinateReferenceSystem to , Coordinate [ ] coordinates ) throws Exception { MathTransform mathTransform = CRS . findMathTransform ( from , to ) ; for ( int i = 0 ; i < coordinates . length ; i ++ ) { coordinates [ i ] = JTS . transform ( coordinates [ i ] , coordinates [ i ] , mathTransform ) ; } }
Reproject a set of coordinates .