case 0: return null; case 1: return operations.get(0); default: return factory.createConcatenatedOperation(derivedFrom(operation), operations.toArray(new CoordinateOperation[operations.size()]));
case 0: return null; case 1: return operations.get(0); default: return factory.createConcatenatedOperation(derivedFrom(operation), operations.toArray(new CoordinateOperation[operations.size()]));
return factory.createConcatenatedOperation(properties(INVERSE_OPERATION), inverted);
return factory.createConcatenatedOperation(properties(INVERSE_OPERATION), inverted);
/** * A proxy that does not execute immediately the {@code create} method on a factory, * but instead stores information for later execution. */ private static final class Deferred extends AuthorityFactoryProxy<CoordinateOperationAuthorityFactory> { Deferred() {super(CoordinateOperationAuthorityFactory.class, AuthorityFactoryIdentifier.OPERATION);} /** The authority code saved by the {@code createFromAPI(…)} method. */ String code; /** * Saves the given code in the {@link #code} field and returns the given factory unchanged. * @throws FactoryException if the given factory is not an instance of {@link CoordinateOperationAuthorityFactory}. */ @Override CoordinateOperationAuthorityFactory createFromAPI(final AuthorityFactory factory, final String code) throws FactoryException { this.code = code; return opFactory(factory); } }
/** * A proxy that does not execute immediately the {@code create} method on a factory, * but instead stores information for later execution. */ private static final class Deferred extends AuthorityFactoryProxy<CoordinateOperationAuthorityFactory> { Deferred() {super(CoordinateOperationAuthorityFactory.class, AuthorityFactoryIdentifier.OPERATION);} /** The authority code saved by the {@code createFromAPI(…)} method. */ String code; /** * Saves the given code in the {@link #code} field and returns the given factory unchanged. * @throws FactoryException if the given factory is not an instance of {@link CoordinateOperationAuthorityFactory}. */ @Override CoordinateOperationAuthorityFactory createFromAPI(final AuthorityFactory factory, final String code) throws FactoryException { this.code = code; return opFactory(factory); } }
op[0] = transform(sourceCRS, prepend, first, null, first.getTargetCRS(), mtFactory); op[n] = transform(last.getSourceCRS(), null, last, append, targetCRS, mtFactory); return factory.createConcatenatedOperation(derivedFrom(operation), op);
op[0] = transform(sourceCRS, prepend, first, null, first.getTargetCRS(), mtFactory); op[n] = transform(last.getSourceCRS(), null, last, append, targetCRS, mtFactory); return factory.createConcatenatedOperation(derivedFrom(operation), op);
endOfRecursivity(CoordinateOperation.class, epsg); return copFactory.createConcatenatedOperation(opProperties, operations); } else {
endOfRecursivity(CoordinateOperation.class, epsg); return copFactory.createConcatenatedOperation(opProperties, operations); } else {
/** * Concatenates three transformation steps. If the first and/or the last operation is an {@link #AXIS_CHANGES}, * then it will be included as part of the second operation instead of creating a {@link ConcatenatedOperation}. * If a concatenated operation is created, it will get an automatically generated name. * * @param step1 the first step, or {@code null} for the identity operation. * @param step2 the second step, or {@code null} for the identity operation. * @param step3 the third step, or {@code null} for the identity operation. * @return a concatenated operation, or {@code null} if all arguments were null. * @throws FactoryException if the operation can not be constructed. */ private CoordinateOperation concatenate(final CoordinateOperation step1, final CoordinateOperation step2, final CoordinateOperation step3) throws FactoryException { if (isIdentity(step1)) return concatenate(step2, step3); if (isIdentity(step2)) return concatenate(step1, step3); if (isIdentity(step3)) return concatenate(step1, step2); if (canHide(step1.getName())) return concatenate(concatenate(step1, step2), step3); if (canHide(step3.getName())) return concatenate(step1, concatenate(step2, step3)); final Map<String,?> properties = defaultName(step1.getSourceCRS(), step3.getTargetCRS()); return factory.createConcatenatedOperation(properties, step1, step2, step3); }
/** * Concatenates three transformation steps. If the first and/or the last operation is an {@link #AXIS_CHANGES}, * then it will be included as part of the second operation instead of creating a {@link ConcatenatedOperation}. * If a concatenated operation is created, it will get an automatically generated name. * * @param step1 the first step, or {@code null} for the identity operation. * @param step2 the second step, or {@code null} for the identity operation. * @param step3 the third step, or {@code null} for the identity operation. * @return a concatenated operation, or {@code null} if all arguments were null. * @throws FactoryException if the operation can not be constructed. */ private CoordinateOperation concatenate(final CoordinateOperation step1, final CoordinateOperation step2, final CoordinateOperation step3) throws FactoryException { if (isIdentity(step1)) return concatenate(step2, step3); if (isIdentity(step2)) return concatenate(step1, step3); if (isIdentity(step3)) return concatenate(step1, step2); if (canHide(step1.getName())) return concatenate(concatenate(step1, step2), step3); if (canHide(step3.getName())) return concatenate(step1, concatenate(step2, step3)); final Map<String,?> properties = defaultName(step1.getSourceCRS(), step3.getTargetCRS()); return factory.createConcatenatedOperation(properties, step1, step2, step3); }
(main instanceof Conversion) ? Conversion.class : SingleOperation.class); } else { main = factory.createConcatenatedOperation(defaultName(sourceCRS, targetCRS), step1, step2);
(main instanceof Conversion) ? Conversion.class : SingleOperation.class); } else { main = factory.createConcatenatedOperation(defaultName(sourceCRS, targetCRS), step1, step2);