public void reproject( Coordinate coordinate, final CoordinateSystem source, final CoordinateSystem destiny) { try { Coordinate coordinateSource = new Coordinate(); Coordinate coordinateTarget = new Coordinate(); if (source.getName().startsWith("Geographics")) { coordinateSource.x = coordinate.y; coordinateSource.y = coordinate.x; } else { coordinateSource.x = coordinate.x; coordinateSource.y = coordinate.y; } CoordinateReferenceSystem sourceCRS = CRS.decode("EPSG:" + source.getEPSGCode()); CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:" + destiny.getEPSGCode()); MathTransform transform = CRS.findMathTransform(sourceCRS, targetCRS); JTS.transform(coordinateSource, coordinateTarget, transform); if (destiny.getName().startsWith("Geographics")) { coordinate.x = coordinateTarget.y; coordinate.y = coordinateTarget.x; } else { coordinate.x = coordinateTarget.x; coordinate.y = coordinateTarget.y; } } catch (NoSuchAuthorityCodeException e) { e.printStackTrace(); } catch (FactoryException e) { e.printStackTrace(); } catch (VerifyError e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } }