/** * Creates a spherical coordinate system from a code. * * @throws FactoryException if the object creation failed. */ @Override public SphericalCS createSphericalCS(final String code) throws FactoryException { return (SphericalCS) replace(getCSAuthorityFactory(code).createSphericalCS(toBackingFactoryCode(code))); }
public SphericalCS createSphericalCS(String code) throws FactoryException { final String key = toKey(code); SphericalCS cs = (SphericalCS) cache.get(key); if (cs == null) { try { cache.writeLock(key); cs = (SphericalCS) cache.peek(key); if (cs == null) { cs = csAuthority.createSphericalCS(code); cache.put(key, cs); } } finally { cache.writeUnLock(key); } } return cs; }
@Override SphericalCS createFromAPI(AuthorityFactory factory, String code) throws FactoryException { return csFactory(factory).createSphericalCS(code); } };
@Override SphericalCS createFromAPI(AuthorityFactory factory, String code) throws FactoryException { return csFactory(factory).createSphericalCS(code); } };
/** Possibly sets {@link #coordinateSystem} to a predefined CS matching the axes defined in the netCDF file. */ @Override void candidate(final Decoder decoder) throws FactoryException { super.candidate(decoder); final Integer epsg = epsgCandidate(Units.DEGREE); if (epsg != null) try { coordinateSystem = decoder.getCSAuthorityFactory().createSphericalCS(epsg.toString()); return; } catch (NoSuchAuthorityCodeException e) { recoverableException(e); } if (isPredefined(Units.DEGREE)) { coordinateSystem = (SphericalCS) DEFAULT.spherical().getCoordinateSystem(); if (isLongitudeFirst) { coordinateSystem = DefaultSphericalCS.castOrCopy(coordinateSystem).forConvention(AxesConvention.RIGHT_HANDED); } } }