/** * Returns a name for a transformation between two CRS. */ private static Map<String,?> defaultName(CoordinateReferenceSystem source, CoordinateReferenceSystem target) { return properties(new CRSPair(source, target).toString()); }
/** * Returns a name for a transformation between two CRS. */ private static Map<String,?> defaultName(CoordinateReferenceSystem source, CoordinateReferenceSystem target) { return properties(new CRSPair(source, target).toString()); }
/** * Creates a coordinate operation from a matrix, which usually describes an affine transform. * A default {@link OperationMethod} object is given to this transform. In the special case * where the {@code name} identifier is {@link #DATUM_SHIFT} or {@link #ELLIPSOID_CHANGE}, * the operation will be a {@link Transformation} instance instead of {@link Conversion}. * * @param name the identifier for the operation to be created. * @param sourceCRS the source coordinate reference system. * @param targetCRS the target coordinate reference system. * @param matrix the matrix which describe an affine transform operation. * @return the conversion or transformation. * @throws FactoryException if the operation can not be created. */ private CoordinateOperation createFromAffineTransform(final Identifier name, final CoordinateReferenceSystem sourceCRS, final CoordinateReferenceSystem targetCRS, final Matrix matrix) throws FactoryException { final MathTransform transform = factorySIS.getMathTransformFactory().createAffineTransform(matrix); return createFromMathTransform(properties(name), sourceCRS, targetCRS, transform, null, null, null); }
/** * Creates a coordinate operation from a matrix, which usually describes an affine transform. * A default {@link OperationMethod} object is given to this transform. In the special case * where the {@code name} identifier is {@link #DATUM_SHIFT} or {@link #ELLIPSOID_CHANGE}, * the operation will be a {@link Transformation} instance instead of {@link Conversion}. * * @param name the identifier for the operation to be created. * @param sourceCRS the source coordinate reference system. * @param targetCRS the target coordinate reference system. * @param matrix the matrix which describe an affine transform operation. * @return the conversion or transformation. * @throws FactoryException if the operation can not be created. */ private CoordinateOperation createFromAffineTransform(final Identifier name, final CoordinateReferenceSystem sourceCRS, final CoordinateReferenceSystem targetCRS, final Matrix matrix) throws FactoryException { final MathTransform transform = factorySIS.getMathTransformFactory().createAffineTransform(matrix); return createFromMathTransform(properties(name), sourceCRS, targetCRS, transform, null, null, null); }
parameters = TensorParameters.WKT1.createValueGroup(properties(Constants.AFFINE), datumShift); } else { parameters = Affine.identity(3); // Dimension of geocentric CRS. return createFromMathTransform(properties(identifier), sourceCRS, targetCRS, transform, method, parameters, null);
parameters = TensorParameters.WKT1.createValueGroup(properties(Constants.AFFINE), datumShift); } else { parameters = Affine.identity(3); // Dimension of geocentric CRS. return asList(createFromMathTransform(properties(identifier), sourceCRS, targetCRS, transform, method, parameters, null));