/** * Creates a {@linkplain VerticalCRS vertical coordinate reference system} from a code. * * @throws FactoryException if the object creation failed. */ @Override public VerticalCRS createVerticalCRS(final String code) throws FactoryException { return (VerticalCRS) replace(getCRSAuthorityFactory(code).createVerticalCRS(toBackingFactoryCode(code))); }
public VerticalCRS createVerticalCRS(String code) throws FactoryException { final String key = toKey(code); VerticalCRS crs = (VerticalCRS) cache.get(key); if (crs == null) { try { cache.writeLock(key); crs = (VerticalCRS) cache.peek(key); if (crs == null) { crs = crsAuthority.createVerticalCRS(code); cache.put(key, crs); } } finally { cache.writeUnLock(key); } } return crs; }
public VerticalCRS createVerticalCRS(String code) throws FactoryException { final String key = toKey(code); VerticalCRS crs = (VerticalCRS) cache.get(key); if (crs == null) { try { cache.writeLock(key); crs = (VerticalCRS) cache.peek(key); if (crs == null) { crs = crsAuthority.createVerticalCRS(code); cache.put(key, crs); } } finally { cache.writeUnLock(key); } } return crs; }
@Override public VerticalCRS createVerticalCRS(String code) throws FactoryException { return factory().createVerticalCRS(code); }
@Override VerticalCRS createFromAPI(AuthorityFactory factory, String code) throws FactoryException { return crsFactory(factory).createVerticalCRS(code); } };
@Override public VerticalCRS createVerticalCRS(String code) throws FactoryException { return factory().createVerticalCRS(code); }
@Override VerticalCRS createFromAPI(AuthorityFactory factory, String code) throws FactoryException { return crsFactory(factory).createVerticalCRS(code); } };
/** * Returns the vertical CRS instance to be tested. When this method is invoked for the first time, it creates the * vertical CRS to test by invoking the {@link CRSAuthorityFactory#createVerticalCRS(String)} method with the * current {@link #code} value in argument. The created object is then cached and returned in all subsequent * invocations of this method. * * @return the vertical CRS instance to test. * @throws FactoryException if an error occurred while creating the vertical CRS instance. */ @Override public VerticalCRS getIdentifiedObject() throws FactoryException { if (crs == null) { assumeNotNull(crsAuthorityFactory); try { crs = crsAuthorityFactory.createVerticalCRS(String.valueOf(code)); } catch (NoSuchAuthorityCodeException e) { unsupportedCode(VerticalCRS.class, code); throw e; } } return crs; }
return getCRSAuthorityFactory().createVerticalCRS(String.valueOf(epsg));