/** * Creates a polar coordinate system from a code. The default implementation invokes <code> * {@linkplain #createCoordinateSystem createCoordinateSystem}(code)</code>. * * @param code Value allocated by authority. * @return The coordinate system for the given code. * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found. * @throws FactoryException if the object creation failed for some other reason. */ public PolarCS createPolarCS(final String code) throws NoSuchAuthorityCodeException, FactoryException { final CoordinateSystem cs = createCoordinateSystem(code); try { return (PolarCS) cs; } catch (ClassCastException exception) { throw noSuchAuthorityCode(PolarCS.class, code, exception); } }
return buffered.createCoordinateReferenceSystem(code); case 1: return buffered.createCoordinateSystem(code); case 2: return buffered.createCoordinateSystemAxis(code);
/** * Creates a spherical coordinate system from a code. The default implementation invokes <code> * {@linkplain #createCoordinateSystem createCoordinateSystem}(code)</code>. * * @param code Value allocated by authority. * @return The coordinate system for the given code. * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found. * @throws FactoryException if the object creation failed for some other reason. */ public SphericalCS createSphericalCS(final String code) throws NoSuchAuthorityCodeException, FactoryException { final CoordinateSystem cs = createCoordinateSystem(code); try { return (SphericalCS) cs; } catch (ClassCastException exception) { throw noSuchAuthorityCode(SphericalCS.class, code, exception); } }
/** * Creates an ellipsoidal coordinate system from a code. The default implementation invokes * <code>{@linkplain #createCoordinateSystem createCoordinateSystem}(code)</code>. * * @param code Value allocated by authority. * @return The coordinate system for the given code. * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found. * @throws FactoryException if the object creation failed for some other reason. */ public EllipsoidalCS createEllipsoidalCS(final String code) throws NoSuchAuthorityCodeException, FactoryException { final CoordinateSystem cs = createCoordinateSystem(code); try { return (EllipsoidalCS) cs; } catch (ClassCastException exception) { throw noSuchAuthorityCode(EllipsoidalCS.class, code, exception); } }
/** * Creates a cartesian coordinate system from a code. The default implementation invokes <code> * {@linkplain #createCoordinateSystem createCoordinateSystem}(code)</code>. * * @param code Value allocated by authority. * @return The coordinate system for the given code. * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found. * @throws FactoryException if the object creation failed for some other reason. */ public CartesianCS createCartesianCS(final String code) throws NoSuchAuthorityCodeException, FactoryException { final CoordinateSystem cs = createCoordinateSystem(code); try { return (CartesianCS) cs; } catch (ClassCastException exception) { throw noSuchAuthorityCode(CartesianCS.class, code, exception); } }
/** * Creates a vertical coordinate system from a code. The default implementation invokes <code> * {@linkplain #createCoordinateSystem createCoordinateSystem}(code)</code>. * * @param code Value allocated by authority. * @return The coordinate system for the given code. * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found. * @throws FactoryException if the object creation failed for some other reason. */ public VerticalCS createVerticalCS(final String code) throws NoSuchAuthorityCodeException, FactoryException { final CoordinateSystem cs = createCoordinateSystem(code); try { return (VerticalCS) cs; } catch (ClassCastException exception) { throw noSuchAuthorityCode(VerticalCS.class, code, exception); } }
/** * Creates a cylindrical coordinate system from a code. The default implementation invokes * <code>{@linkplain #createCoordinateSystem createCoordinateSystem}(code)</code>. * * @param code Value allocated by authority. * @return The coordinate system for the given code. * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found. * @throws FactoryException if the object creation failed for some other reason. */ public CylindricalCS createCylindricalCS(final String code) throws NoSuchAuthorityCodeException, FactoryException { final CoordinateSystem cs = createCoordinateSystem(code); try { return (CylindricalCS) cs; } catch (ClassCastException exception) { throw noSuchAuthorityCode(CylindricalCS.class, code, exception); } }
/** * Creates a temporal coordinate system from a code. The default implementation invokes <code> * {@linkplain #createCoordinateSystem createCoordinateSystem}(code)</code>. * * @param code Value allocated by authority. * @return The coordinate system for the given code. * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found. * @throws FactoryException if the object creation failed for some other reason. */ public TimeCS createTimeCS(final String code) throws NoSuchAuthorityCodeException, FactoryException { final CoordinateSystem cs = createCoordinateSystem(code); try { return (TimeCS) cs; } catch (ClassCastException exception) { throw noSuchAuthorityCode(TimeCS.class, code, exception); } }
/** * Returns an arbitrary {@linkplain CoordinateSystem coordinate system} from a code. * * @throws FactoryException if the object creation failed for all factories. */ @Override public CoordinateSystem createCoordinateSystem(final String code) throws FactoryException { try { return super.createCoordinateSystem(code); } catch (FactoryException exception) { notifyFailure("createCoordinateSystem", exception); try { return fallback.createCoordinateSystem(code); } catch (NoSuchAuthorityCodeException ignore) { throw exception; } } }
/** Returns an arbitrary coordinate system from a code. */ @Override public synchronized CoordinateSystem createCoordinateSystem(final String code) throws FactoryException { final CoordinateSystem cs; final String key = trimAuthority(code); final Object cached = objectCache.get(key); if (cached instanceof CoordinateSystem) { cs = (CoordinateSystem) cached; } else { cs = getBackingStore().createCoordinateSystem(code); } objectCache.put(key, cs); return cs; }
/** * Returns an arbitrary coordinate system from a code. * * @throws FactoryException if the object creation failed. */ @Override public synchronized CoordinateSystem createCoordinateSystem(final String code) throws FactoryException { final CoordinateSystem cs; final String key = trimAuthority(code); final Object cached = get(key); if (cached instanceof CoordinateSystem) { cs = (CoordinateSystem) cached; } else { cs = getBackingStore().createCoordinateSystem(code); } put(key, cs); return cs; }
final String csCode = getString(result, 7, code); final String dmCode = getString(result, 8, code); final CoordinateSystem cs = buffered.createCoordinateSystem(csCode); final GeodeticDatum datum = buffered.createGeodeticDatum(dmCode); final Map<String, Object> properties = final String csCode = getString(result, 7, code); final String dmCode = getString(result, 8, code); final CoordinateSystem cs = buffered.createCoordinateSystem(csCode); final EngineeringDatum datum = buffered.createEngineeringDatum(dmCode); final Map<String, Object> properties =