public CoordinateReferenceSystem getCoordinateReferenceSystem(Identifier identifier) throws RegistryException, CRSException { Map<String,String> params = getParameters(identifier.getAuthorityKey()); if (!identifier.getAuthorityName().equalsIgnoreCase(getRegistryName())) { throw new RegistryException("CRS code '" + identifier.getCode() + "' does not match this registry name : " + getRegistryName()); } if (params == null) { throw new CRSException("Registry '" + getRegistryName() + "' contains no parameter for " + identifier); } // try to set a name from params to the identifier if identifier name is empty if (identifier.getName() == null || identifier.getName().isEmpty()) { String title = params.get(ProjKeyParameters.title); if (title != null && !title.isEmpty()) { identifier = new Identifier(identifier.getAuthorityName(), identifier.getAuthorityKey(), title); } } return CRSHelper.createCoordinateReferenceSystem(identifier, params); }