private static CoordinateSequenceFactory getDefaultCoordinateSequenceFactory() { return CoordinateArraySequenceFactory.instance(); }
private Object readResolve() { // http://www.javaworld.com/javaworld/javatips/jw-javatip122.html return CoordinateArraySequenceFactory.instance(); }
private static CoordinateSequenceFactory getDefaultCoordinateSequenceFactory() { return CoordinateArraySequenceFactory.instance(); }
private Object readResolve() { // http://www.javaworld.com/javaworld/javatips/jw-javatip122.html return CoordinateArraySequenceFactory.instance(); }
public PgWKBAttributeIO(boolean useByteArray, Hints hints) { this.useByteArray = useByteArray; // setup the geometry factory according to the hints GeometryFactory gf = (GeometryFactory) hints.get(Hints.JTS_GEOMETRY_FACTORY); if(gf == null) { PrecisionModel pm = (PrecisionModel) hints.get(Hints.JTS_PRECISION_MODEL); if(pm == null) pm = new PrecisionModel(); Integer SRID = (Integer) hints.get(Hints.JTS_SRID); int srid = SRID == null ? 0 : SRID.intValue(); Integer dimension = (Integer) hints.get(Hints.COORDINATE_DIMENSION); CoordinateSequenceFactory csFactory = (CoordinateSequenceFactory) hints.get(Hints.JTS_COORDINATE_SEQUENCE_FACTORY); if(csFactory == null) { if(dimension == null || dimension <= 3) { csFactory = CoordinateArraySequenceFactory.instance(); } else { csFactory = new LiteCoordinateSequenceFactory(); } } gf = new GeometryFactory(pm, srid, csFactory); } wkbr = new WKBReader(gf); }
private GeometryFactory getGeometryFactory(final Hints queryHints) { // setup the geometry factory according to the hints final Hints hints; if (queryHints == null) { hints = GeoTools.getDefaultHints(); } else { hints = queryHints; } GeometryFactory gf = (GeometryFactory) hints.get(Hints.JTS_GEOMETRY_FACTORY); if (gf == null) { PrecisionModel pm = (PrecisionModel) hints.get(Hints.JTS_PRECISION_MODEL); if (pm == null) { pm = new PrecisionModel(); } Integer SRID = (Integer) hints.get(Hints.JTS_SRID); int srid = SRID == null ? 0 : SRID.intValue(); Integer dimension = (Integer) hints.get(Hints.COORDINATE_DIMENSION); CoordinateSequenceFactory csFactory = (CoordinateSequenceFactory) hints .get(Hints.JTS_COORDINATE_SEQUENCE_FACTORY); if (csFactory == null) { if (dimension == null || dimension <= 3) { csFactory = CoordinateArraySequenceFactory.instance(); } else { csFactory = new LiteCoordinateSequenceFactory(); } } gf = new GeometryFactory(pm, srid, csFactory); } return gf; }
/** * 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.registerComponentImplementation(FeaturePropertyExtractor.class); //factories container.registerComponentInstance(CoordinateSequenceFactory.class, CoordinateArraySequenceFactory.instance()); container.registerComponentImplementation(GeometryFactory.class); } }
/** * 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.registerComponentImplementation(FeaturePropertyExtractor.class); //factories container.registerComponentInstance(CoordinateSequenceFactory.class, CoordinateArraySequenceFactory.instance()); container.registerComponentImplementation(GeometryFactory.class); } }
/** * Configures the gml2 context. * <p> * The following classes are registered: * <ul> * <li>{@link CoordinateArraySequenceFactory} under {@link CoordinateSequenceFactory} * <li>{@link GeometryFactory} * <li>{@link FeatureTypeCache} * <li>{@link DefaultFeatureCollections} * </ul> * </p> */ public void configureContext(MutablePicoContainer container) { super.configureContext(container); container.registerComponentInstance(new FeatureTypeCache()); container.registerComponentInstance(CoordinateSequenceFactory.class, CoordinateArraySequenceFactory.instance()); container.registerComponentImplementation(GeometryFactory.class); container.registerComponentImplementation(DefaultFeatureCollections.class); } }
/** * Places an instance of {@link GeometryFactory}. */ protected void configureContext(MutablePicoContainer container) { StyleFactory styleFactory = CommonFactoryFinder.getStyleFactory(null); StyleBuilder styleBuilder = new StyleBuilder(styleFactory); container.registerComponentInstance(styleFactory); container.registerComponentInstance(styleBuilder); container.registerComponentInstance(new GeometryFactory()); container.registerComponentInstance(CoordinateArraySequenceFactory.instance()); container.registerComponentInstance(new StyleMap()); container.registerComponentInstance(new FolderStack()); container.registerComponentInstance(new SchemaRegistry()); }
@Override protected void configureContext(MutablePicoContainer container) { StyleFactory styleFactory = CommonFactoryFinder.getStyleFactory(null); StyleBuilder styleBuilder = new StyleBuilder(styleFactory); container.registerComponentInstance(styleFactory); container.registerComponentInstance(styleBuilder); container.registerComponentInstance(new GeometryFactory()); container.registerComponentInstance(CoordinateArraySequenceFactory.instance()); container.registerComponentInstance(new StyleMap()); container.registerComponentInstance(new FolderStack()); SchemaRegistry schemaRegistry = new SchemaRegistry(); KMLCustomSchemaHandlerFactory handlerFactory = new KMLCustomSchemaHandlerFactory( schemaRegistry); container.registerComponentInstance(schemaRegistry); container.registerComponentInstance(handlerFactory); }
/** * 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); } }