/** * Creates a {@linkplain #createParameterizedTransform parameterized transform} from a base CRS * to a derived CS. If the {@code "semi_major"} and {@code "semi_minor"} parameters are not * explicitly specified, they will be inferred from the {@linkplain Ellipsoid ellipsoid} and * added to {@code parameters}. In addition, this method performs axis switch as needed. * * <p>The {@linkplain OperationMethod operation method} used can be obtained by a call to {@link * #getLastUsedMethod}. * * @param baseCRS The source coordinate reference system. * @param parameters The parameter values for the transform. * @param derivedCS the target coordinate system. * @return The parameterized transform. * @throws NoSuchIdentifierException if there is no transform registered for the method. * @throws FactoryException if the object creation failed. This exception is thrown if some * required parameter has not been supplied, or has illegal value. * @see MathTransformFactory#createBaseToDerived * @deprecated Moved to the {@link MathTransformFactory} interface. */ @Deprecated public MathTransform createBaseToDerived( final CoordinateReferenceSystem baseCRS, final ParameterValueGroup parameters, final CoordinateSystem derivedCS) throws NoSuchIdentifierException, FactoryException { return getMathTransformFactory().createBaseToDerived(baseCRS, parameters, derivedCS); }
mt = mtFactory.createBaseToDerived(baseCRS, parameters, derivedCS); OperationMethod method = conversionFromBase.getMethod(); if (!(method instanceof MathTransformProvider)) {
factories .getMathTransformFactory() .createBaseToDerived( sourceCRS, parameters, targetCRS.getCoordinateSystem());
factories .getMathTransformFactory() .createBaseToDerived( sourceCRS, parameters, targetCRS.getCoordinateSystem());
/** * Invoked by JAXB after unmarshalling. This method needs information provided by: * * <ul> * <li>{@link #setSource(CoordinateReferenceSystem)}</li> * <li>{@link #setTarget(CoordinateReferenceSystem)}</li> * <li>{@link #setParameters(GeneralParameterValue[])}</li> * </ul> * * @see <a href="http://issues.apache.org/jira/browse/SIS-291">SIS-291</a> */ @Override final void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { super.afterUnmarshal(unmarshaller, parent); final CoordinateReferenceSystem sourceCRS = super.getSourceCRS(); final CoordinateReferenceSystem targetCRS = super.getTargetCRS(); if (transform == null && sourceCRS != null && targetCRS != null && parameters != null) try { transform = DefaultFactories.forBuildin(MathTransformFactory.class) .createBaseToDerived(sourceCRS, parameters, targetCRS.getCoordinateSystem()); } catch (FactoryException e) { Context.warningOccured(Context.current(), AbstractSingleOperation.class, "afterUnmarshal", e, true); } } }
/** * Invoked by JAXB after unmarshalling. This method needs information provided by: * * <ul> * <li>{@link #setSource(CoordinateReferenceSystem)}</li> * <li>{@link #setTarget(CoordinateReferenceSystem)}</li> * <li>{@link #setParameters(GeneralParameterValue[])}</li> * </ul> * * @see <a href="http://issues.apache.org/jira/browse/SIS-291">SIS-291</a> */ @Override final void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { super.afterUnmarshal(unmarshaller, parent); final CoordinateReferenceSystem sourceCRS = super.getSourceCRS(); final CoordinateReferenceSystem targetCRS = super.getTargetCRS(); if (transform == null && sourceCRS != null && targetCRS != null && parameters != null) try { transform = DefaultFactories.forBuildin(MathTransformFactory.class) .createBaseToDerived(sourceCRS, parameters, targetCRS.getCoordinateSystem()); } catch (FactoryException e) { Context.warningOccured(Context.current(), AbstractSingleOperation.class, "afterUnmarshal", e, true); } } }
throw new NullArgumentException(Errors.format(Errors.Keys.NullArgument_1, "transform")); transform = getMathTransformFactory().createBaseToDerived(sourceCRS, parameters, targetCRS.getCoordinateSystem());
throw new NullArgumentException(Errors.format(Errors.Keys.NullArgument_1, "transform")); transform = getMathTransformFactory().createBaseToDerived(sourceCRS, parameters, targetCRS.getCoordinateSystem());
} else { mt = mtFactory.createBaseToDerived(sourceCRS, parameters, targetCRS.getCoordinateSystem());
} else { mt = mtFactory.createBaseToDerived(sourceCRS, parameters, targetCRS.getCoordinateSystem());
transform = factory.createBaseToDerived(source, parameters, target.getCoordinateSystem());
transform = factory.createBaseToDerived(source, parameters, target.getCoordinateSystem());