/** * Returns the first implementation of {@link PrecisionModel} matching the specified hints. If * no implementation matches, a new one is created if possible or an exception is thrown * otherwise. * * @param hints An optional map of hints, or {@code null} if none. * @return The first precision model that matches the supplied hints. * @throws FactoryRegistryException if no implementation was found or can be created for the * {@link PrecisionModel} category and the given hints. */ public static synchronized PrecisionModel getPrecisionModel(Hints hints) throws FactoryRegistryException { hints = mergeSystemHints(hints); return getServiceRegistry() .getFactory(PrecisionModel.class, null, hints, Hints.JTS_PRECISION_MODEL); }
/** * Returns the first implementation of {@link CoordinateSequenceFactory} matching the specified * hints. If no implementation matches, a new one is created if possible or an exception is * thrown otherwise. * * @param hints An optional map of hints, or {@code null} if none. * @return The first coordinate sequence factory that matches the supplied hints. * @throws FactoryRegistryException if no implementation was found or can be created for the * {@link CoordinateSequenceFactory} interface and the given hints. */ public static synchronized CoordinateSequenceFactory getCoordinateSequenceFactory(Hints hints) throws FactoryRegistryException { hints = mergeSystemHints(hints); return getServiceRegistry() .getFactory( CoordinateSequenceFactory.class, null, hints, Hints.JTS_COORDINATE_SEQUENCE_FACTORY); }
/** * Returns the first implementation of {@link GeometryFactory} matching the specified hints. If * no implementation matches, a new one is created if possible or an exception is thrown * otherwise. * * <p>Hints that may be understood includes {@link Hints#JTS_COORDINATE_SEQUENCE_FACTORY * JTS_COORDINATE_SEQUENCE_FACTORY}, {@link Hints#JTS_PRECISION_MODEL JTS_PRECISION_MODEL} and * {@link Hints#JTS_SRID JTS_SRID}. * * @param hints An optional map of hints, or {@code null} if none. * @return The first geometry factory that matches the supplied hints. * @throws FactoryRegistryException if no implementation was found or can be created for the * {@link GeometryFactory} category and the given hints. */ public static synchronized GeometryFactory getGeometryFactory(Hints hints) throws FactoryRegistryException { hints = mergeSystemHints(hints); return getServiceRegistry() .getFactory(GeometryFactory.class, null, hints, Hints.JTS_GEOMETRY_FACTORY); } /**
/** * Returns the first implementation of {@link PrecisionModel} matching the specified hints. * If no implementation matches, a new one is created if possible or an exception is thrown * otherwise. * * @param hints An optional map of hints, or {@code null} if none. * @return The first precision model that matches the supplied hints. * @throws FactoryRegistryException if no implementation was found or can be created for the * {@link PrecisionModel} category and the given hints. */ public static synchronized PrecisionModel getPrecisionModel(Hints hints) throws FactoryRegistryException { hints = mergeSystemHints(hints); return (PrecisionModel) getServiceRegistry().getServiceProvider( PrecisionModel.class, null, hints, Hints.JTS_PRECISION_MODEL); }
/** * Returns the first implementation of {@link CoordinateSequenceFactory} matching the specified * hints. If no implementation matches, a new one is created if possible or an exception is * thrown otherwise. * * @param hints An optional map of hints, or {@code null} if none. * @return The first coordinate sequence factory that matches the supplied hints. * @throws FactoryRegistryException if no implementation was found or can be created for the * {@link CoordinateSequenceFactory} interface and the given hints. */ public static synchronized CoordinateSequenceFactory getCoordinateSequenceFactory(Hints hints) throws FactoryRegistryException { hints = mergeSystemHints(hints); return (CoordinateSequenceFactory) getServiceRegistry().getServiceProvider( CoordinateSequenceFactory.class, null, hints, Hints.JTS_COORDINATE_SEQUENCE_FACTORY); }
/** * Returns the first implementation of {@link GeometryFactory} matching the specified hints. * If no implementation matches, a new one is created if possible or an exception is thrown * otherwise. * <p> * Hints that may be understood includes * {@link Hints#JTS_COORDINATE_SEQUENCE_FACTORY JTS_COORDINATE_SEQUENCE_FACTORY}, * {@link Hints#JTS_PRECISION_MODEL JTS_PRECISION_MODEL} and * {@link Hints#JTS_SRID JTS_SRID}. * * @param hints An optional map of hints, or {@code null} if none. * @return The first geometry factory that matches the supplied hints. * @throws FactoryRegistryException if no implementation was found or can be created for the * {@link GeometryFactory} category and the given hints. */ public static synchronized GeometryFactory getGeometryFactory(Hints hints) throws FactoryRegistryException { hints = mergeSystemHints(hints); return (GeometryFactory) getServiceRegistry().getServiceProvider( GeometryFactory.class, null, hints, Hints.JTS_GEOMETRY_FACTORY); } /**