/** * Creates an operation from coordinate reference system codes. The default implementation first * invokes the same method from the {@linkplain #operationFactory underlying operation factory}, * and next invokes {@link #replace(CoordinateOperation) replace} for each operations. */ public Set<CoordinateOperation> createFromCoordinateReferenceSystemCodes( final String sourceCode, final String targetCode) throws FactoryException { final Set /* <CoordinateOperation> */ operations, modified; operations = super.createFromCoordinateReferenceSystemCodes(sourceCode, targetCode); modified = new LinkedHashSet((int) (operations.size() / 0.75f) + 1); for (final Iterator it = operations.iterator(); it.hasNext(); ) { final CoordinateOperation operation; try { operation = (CoordinateOperation) it.next(); } catch (BackingStoreException exception) { final Throwable cause = exception.getCause(); if (cause instanceof FactoryException) { throw (FactoryException) cause; } else { throw exception; } } modified.add(replace(operation)); } return modified; }
/** * Creates an operation from coordinate reference system codes. * * @throws FactoryException if the object creation failed for all factories. */ @Override public Set<CoordinateOperation> createFromCoordinateReferenceSystemCodes( final String sourceCRS, final String targetCRS) throws FactoryException { try { return super.createFromCoordinateReferenceSystemCodes(sourceCRS, targetCRS); } catch (FactoryException exception) { notifyFailure("createFromCoordinateReferenceSystemCodes", exception); try { return fallback.createFromCoordinateReferenceSystemCodes(sourceCRS, targetCRS); } catch (NoSuchAuthorityCodeException ignore) { throw exception; } } }