/** * Creates a coordinate reference system object from a string. * * @param wkt Coordinate system encoded in Well-Known Text format. * @throws FactoryException if the object creation failed. */ public synchronized CoordinateReferenceSystem createFromWKT(final String wkt) throws FactoryException { /* * Note: while this factory is thread safe, the WKT parser is not. * Since we share a single instance of this parser, we must synchronize. */ if (parser == null) { createParser(ReferencingFactoryFinder.getDatumFactory(null), getMathTransformFactory()); } try { return parser.parseCoordinateReferenceSystem(wkt); } catch (ParseException exception) { final Throwable cause = exception.getCause(); if (cause instanceof FactoryException) { throw (FactoryException) cause; } throw new FactoryException(exception); } }
MathTransform mt; final MathTransform existing = conversionFromBase.getMathTransform(); final MathTransformFactory mtFactory = getMathTransformFactory(); if (existing != null && mtFactory instanceof DefaultMathTransformFactory) {
if (mt == null) { final ParameterValueGroup parameters = conversionFromBase.getParameterValues(); final MathTransformFactory mtFactory = getMathTransformFactory(); mt = mtFactory.createParameterizedTransform(parameters);