/** * Returns a {@linkplain GeocentricCRS geocentric coordinate reference system} from a code. * * @throws FactoryException if the object creation failed. */ @Override public GeocentricCRS createGeocentricCRS(final String code) throws FactoryException { return (GeocentricCRS) replace( getCRSAuthorityFactory(code) .createGeocentricCRS(toBackingFactoryCode(code))); }
public GeocentricCRS createGeocentricCRS(String code) throws FactoryException { final String key = toKey(code); GeocentricCRS crs = (GeocentricCRS) cache.get(key); if (crs == null) { try { cache.writeLock(key); crs = (GeocentricCRS) cache.peek(key); if (crs == null) { crs = crsAuthority.createGeocentricCRS(code); cache.put(key, crs); } } finally { cache.writeUnLock(key); } } return crs; }
public GeocentricCRS createGeocentricCRS(String code) throws FactoryException { final String key = toKey(code); GeocentricCRS crs = (GeocentricCRS) cache.get(key); if (crs == null) { try { cache.writeLock(key); crs = (GeocentricCRS) cache.peek(key); if (crs == null) { crs = crsAuthority.createGeocentricCRS(code); cache.put(key, crs); } } finally { cache.writeUnLock(key); } } return crs; }
@Override GeocentricCRS createFromAPI(AuthorityFactory factory, String code) throws FactoryException { return crsFactory(factory).createGeocentricCRS(code); } };
@Override public GeocentricCRS createGeocentricCRS(String code) throws FactoryException { return factory().createGeocentricCRS(code); }
@Override GeocentricCRS createFromAPI(AuthorityFactory factory, String code) throws FactoryException { return crsFactory(factory).createGeocentricCRS(code); } };
@Override public GeocentricCRS createGeocentricCRS(String code) throws FactoryException { return factory().createGeocentricCRS(code); }
/** * Creates a geodetic CRS for the given code and verify its properties. * * @param crsCode the code of the CRS to create. * @throws FactoryException if an error occurred while creating the CRS instance. */ private void createAndVerifyGeocentricCRS(final int crsCode) throws FactoryException { if (crsAuthorityFactory != null) { final GeocentricCRS crs; try { crs = crsAuthorityFactory.createGeocentricCRS(String.valueOf(crsCode)); } catch (NoSuchAuthorityCodeException e) { unsupportedCode(GeocentricCRS.class, crsCode); throw e; } if (crs == null) { fail("CRSAuthorityFactory.createGeocentricCRS(\"" + code + "\") shall not return null."); } validators.validate(crs); verifyGeodeticCRS(crsCode, crs, GEOCENTRIC); } }
final GeocentricCRS crs = getCRSAuthorityFactory().createGeocentricCRS(String.valueOf(epsg)); verify(crs); return crs;