+
+ public static Geometry reproject(CoordinateReferenceSystem crs,
+ Geometry geometry, CoordinateReferenceSystem targetCrs) {
+ try {
+ MathTransform transform = CRS.findMathTransform(crs, targetCrs);
+ return JTS.transform(geometry, transform);
+ } catch (Exception e) {
+ throw new ArgeoException("Cannot reproject " + geometry + " from "
+ + crs + " to " + targetCrs);
+ }
+ }