private void testProjection(final CoordinateReferenceSystem proj) throws FactoryException { final CoordinateOperation op = CRS.findOperation(CommonCRS.defaultGeographic(), proj, null); final MathTransform geoToProj = op.getMathTransform(); test(proj, c -> Utilities.transform(c, geoToProj, false)); }
positionConversion = base -> transform(base, proj2Geo, isLatLon); } else {
private static UnaryOperator<Coordinate> getTransformer(final CoordinateReferenceSystem target) throws FactoryException { if (org.apache.sis.util.Utilities.equalsApproximatively(target, CommonCRS.defaultGeographic())) { return UnaryOperator.identity(); } else { final CoordinateOperation op = CRS.findOperation(CommonCRS.defaultGeographic(), target, null); final MathTransform geoToTarget = op.getMathTransform(); return c -> Utilities.transform(c, geoToTarget, false); } }