if (!(candidate instanceof CoordinateOperationFactoryUsingWKT) && candidate .getAuthority() .getTitle() .equals(this.getAuthority().getTitle())) {
final Citation authority = authorityFactory.getAuthority(); final Identifier sourceID = AbstractIdentifiedObject.getIdentifier(sourceCRS, authority); if (sourceID == null) {
/** * Finds the authority codes for the given coordinate reference system. * This method does not trust the code given by the user in its CRS - we verify it. * This method may return codes even if the axis order does not match; * it will be caller's responsibility to make necessary adjustments. */ private List<String> findCode(final CoordinateReferenceSystem crs) throws FactoryException { final List<String> codes = new ArrayList<>(); if (codeFinder != null) { for (final IdentifiedObject candidate : codeFinder.find(crs)) { final Identifier identifier = IdentifiedObjects.getIdentifier(candidate, registry.getAuthority()); if (identifier != null) { final String code = identifier.getCode(); if (Utilities.deepEquals(candidate, crs, ComparisonMode.APPROXIMATIVE)) { codes.add(0, code); // If axis order match, give precedence to that CRS. } else { codes.add(code); } } } } return codes; }
/** * Finds the authority codes for the given coordinate reference system. * This method does not trust the code given by the user in its CRS - we verify it. * This method may return codes even if the axis order does not match; * it will be caller's responsibility to make necessary adjustments. */ private List<String> findCode(final CoordinateReferenceSystem crs) throws FactoryException { final List<String> codes = new ArrayList<>(); if (codeFinder != null) { for (final IdentifiedObject candidate : codeFinder.find(crs)) { final Identifier identifier = IdentifiedObjects.getIdentifier(candidate, registry.getAuthority()); if (identifier != null) { final String code = identifier.getCode(); if (Utilities.deepEquals(candidate, crs, ComparisonMode.APPROXIMATIVE)) { codes.add(0, code); // If axis order match, give precedence to that CRS. } else { codes.add(code); } } } } return codes; }
codeFinder = ((GeodeticAuthorityFactory) registry).newIdentifiedObjectFinder(); } else try { codeFinder = IdentifiedObjects.newFinder(Citations.getIdentifier(registry.getAuthority(), false)); } catch (NoSuchAuthorityFactoryException e) { Logging.recoverableException(Logging.getLogger(Loggers.COORDINATE_OPERATION),
codeFinder = ((GeodeticAuthorityFactory) registry).newIdentifiedObjectFinder(); } else try { codeFinder = IdentifiedObjects.newFinder(Citations.toCodeSpace(registry.getAuthority())); } catch (NoSuchAuthorityFactoryException e) { Logging.recoverableException(Logging.getLogger(Loggers.COORDINATE_OPERATION),