/** * Configures the gml3 context. * * <p>The following factories are registered: * * <ul> * <li>{@link CoordinateArraySequenceFactory} under {@link CoordinateSequenceFactory} * <li>{@link GeometryFactory} * </ul> */ public void configureContext(MutablePicoContainer container) { super.configureContext(container); container.registerComponentInstance(new FeatureTypeCache()); container.registerComponentInstance(new XSDIdRegistry()); // factories container.registerComponentInstance( CoordinateSequenceFactory.class, CoordinateArraySequenceFactory.instance()); container.registerComponentInstance( geometryFactory == null ? new GeometryFactory() : geometryFactory); container.registerComponentInstance(new GML3EncodingUtils()); container.registerComponentInstance(new ArcParameters()); container.registerComponentInstance(srsSyntax); if (numDecimals >= 0) { CoordinateFormatter formatter = new CoordinateFormatter(numDecimals); formatter.setForcedDecimal(forceDecimalEncoding); formatter.setPadWithZeros(padWithZeros); container.registerComponentInstance(formatter); } }
/** * Configures the gml3 context. * <p> * The following factories are registered: * <ul> * <li>{@link CoordinateArraySequenceFactory} under {@link CoordinateSequenceFactory} * <li>{@link GeometryFactory} * </ul> * </p> */ public void configureContext(MutablePicoContainer container) { super.configureContext(container); container.registerComponentInstance(new FeatureTypeCache()); container.registerComponentInstance(new XSDIdRegistry()); //factories container.registerComponentInstance(CoordinateSequenceFactory.class, CoordinateArraySequenceFactory.instance()); container.registerComponentImplementation(GeometryFactory.class); container.registerComponentInstance(new GML3EncodingUtils()); if (isExtendedArcSurfaceSupport()) { container.registerComponentInstance(new ArcParameters()); } container.registerComponentInstance(srsSyntax); } }