Package org.opengis.feature.type

Examples of org.opengis.feature.type.FeatureType


        builder.addAttribute("name", String.class);

        builder.setNamespaceURI(NSURI);
        builder.setName("wq_plus");

        FeatureType wqPlusType = builder.feature();
        return wqPlusType;
    }
View Full Code Here


     *
     * @param typeFactory
     * @return FeatureType
     */
    public static FeatureType createExample05NoNamespaceURI(FeatureTypeFactory typeFactory) {
        FeatureType wqPlusType;

        TypeBuilder builder = new TypeBuilder(typeFactory);

        builder.setName("sitename");
        builder.setBinding(String.class);
View Full Code Here

        dsParams.put("dbtype", "app-schema");
        dsParams.put("url", url.toExternalForm());

        DataAccess guDataStore = DataAccessFinder.getDataStore(dsParams);
        assertNotNull(guDataStore);
        FeatureType geologicUnitType = guDataStore.getSchema(FeatureChainingTest.GEOLOGIC_UNIT);
        assertNotNull(geologicUnitType);

        url = getClass().getResource(schemaBase + "MappedFeaturePropertyfile.xml");
        assertNotNull(url);
View Full Code Here

        builder.setName("target");
        builder.addAttribute("areaOfInfluence", areaOfInfluence);
        builder.addAttribute("concatenated", concatType);

        FeatureType targetType = builder.feature();
        AttributeDescriptor targetFeature = tf.createAttributeDescriptor(targetType, targetType
                .getName(), 0, Integer.MAX_VALUE, true, null);

        // create the mapping definition
        List attMappings = new LinkedList();
View Full Code Here

     */
    public static FeatureType createComplexWaterQualityType() {
        FeatureTypeFactory tfac = new UniqueNameFeatureTypeFactoryImpl();
        TypeBuilder builder = new TypeBuilder(tfac);

        FeatureType wq_plusType;

        AttributeType detdesc = builder.name("determinand_description").bind(String.class)
                .attribute();
        AttributeType result = builder.name("result").bind(Float.class).attribute();

View Full Code Here

    public static FeatureType createComplexWaterSampleType() {
        FeatureTypeFactory tfac = new UniqueNameFeatureTypeFactoryImpl();
        TypeBuilder builder = new TypeBuilder(tfac);

        FeatureType sampleType;

        AttributeType parameter = builder.name("parameter").bind(String.class).attribute();
        AttributeType value = builder.name("value").bind(Double.class).attribute();

        builder.setName("measurement");
View Full Code Here

            throws Exception {
        Name sourceTypeName = WATERSAMPLE_TYPENAME;
        final FeatureSource<SimpleFeatureType, SimpleFeature> wsSource = simpleStore
                .getFeatureSource(sourceTypeName);

        FeatureType targetType = createComplexWaterQualityType();
        FeatureTypeFactory tf = new UniqueNameFeatureTypeFactoryImpl();
        AttributeDescriptor targetFeature = tf.createAttributeDescriptor(targetType, targetType
                .getName(), 0, Integer.MAX_VALUE, true, null);

        List mappings = new LinkedList();
        Expression id;
        Expression source;
View Full Code Here

                new LiteCoordinateSequenceFactory());
        q.setHints(hints);

        // check the srs you get is the expected one
        FeatureCollection fc = fs.getFeatures(q);
        FeatureType fcSchema = fc.getSchema();
        assertEquals(epsg4326, fcSchema.getCoordinateReferenceSystem());
        assertEquals(epsg4326, fcSchema.getGeometryDescriptor().getCoordinateReferenceSystem());

        // build up the reference 2d line, the 3d one is (1 1 0, 2 2 0, 4 2 1, 5
        // 1 1)
        LineString expected = new GeometryFactory().createLineString(new Coordinate[] {
                new Coordinate(1, 1), new Coordinate(2, 2), new Coordinate(4, 2),
View Full Code Here

        assertEquals(XMMLNS, targetFeature.getName().getNamespaceURI());
        assertEquals("Borehole", targetFeature.getName().getLocalPart());

        source = mapping.getSource();
        assertNotNull(source);
        FeatureType schema = source.getSchema();
        String typeName = schema.getName().toString();
        assertEquals("test-data:boreholes_denormalized", typeName);

        List attributeMappings = mapping.getAttributeMappings();
        assertEquals(24, attributeMappings.size());
View Full Code Here

                bounds = featureSource.getBounds(query);
            } else {
                bounds = featureSource.getBounds();
            }
            if( bounds != null ){
                FeatureType schema = featureSource.getSchema();
                CoordinateReferenceSystem schemaCrs = schema.getCoordinateReferenceSystem();
                CoordinateReferenceSystem boundsCrs = bounds.getCoordinateReferenceSystem();
               
                if( boundsCrs == null && schemaCrs != null ){
                    LOGGER.warning("Bounds crs not defined; assuming bounds from schema are correct for "+featureSource );
                    bounds = new ReferencedEnvelope(bounds.getMinX(),bounds.getMaxX(),bounds.getMinY(),bounds.getMaxY(),schemaCrs);
View Full Code Here

TOP

Related Classes of org.opengis.feature.type.FeatureType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.