Package org.opengis.feature.type

Examples of org.opengis.feature.type.FeatureType


        runTestWithFilter(ft, filter, false);
    }

    @Test
    public void testOverlapsFilter() throws Exception {
        FeatureType ft = this.dataStore.getSchema(testData.getTempTableName());

        // Build the filter
        Polygon p = buildPolygon(-10, -10, -8, -8);
        Filter filter = ff.overlaps(ff.property("SHAPE"), ff.literal(p));
View Full Code Here


        runTestWithFilter(ft, filter, false);
    }

    @Test
    public void testWithinFilter() throws Exception {
        FeatureType ft = this.dataStore.getSchema(testData.getTempTableName());

        // Build the filter
        Polygon p = buildPolygon(-9, -9, -8, -8);
        Within filter = ff.within(ff.literal(p), ff.property("SHAPE"));
        runTestWithFilter(ft, filter, false);
View Full Code Here

        runTestWithFilter(ft, filter, false);
    }

    @Test
    public void testCrossesFilter() throws Exception {
        FeatureType ft = this.dataStore.getSchema(testData.getTempTableName());

        // Build the filter
        LineString ls = buildSegment(-12, -12, 12, 12);
        Filter filter = ff.crosses(ff.property("SHAPE"), ff.literal(ls));
View Full Code Here

    /**
     * TODO: resurrect testEqualFilter
     */
    @Test
    public void testEqualFilter() throws Exception {
        FeatureType ft = this.dataStore.getSchema(testData.getTempTableName());

        // Get a geometry for equality comparison
        Query Query = new Query(testData.getTempTableName());
        Query.setPropertyNames(safePropertyNames(ft));
        Query.setMaxFeatures(1);
View Full Code Here

        runTestWithFilter(ft, filter, false);
    }

    @Test
    public void testDwithinFilter() throws Exception {
        FeatureType ft = this.dataStore.getSchema(testData.getTempTableName());

        // Available geometries:
        // 1. POINT(0 0)
        // 2. MULTIPOINT(0 0, 170 0)
        // 3. LINESTRING(0 0, 170 80)
View Full Code Here

        runTestWithFilter(ft, filter, false, 2);// geoms 4. and 6.
    }

    @Test
    public void testBeyondFilter() throws Exception {
        FeatureType ft = this.dataStore.getSchema(testData.getTempTableName());

        // Available geometries:
        // 1. POINT(0 0)
        // 2. MULTIPOINT(0 0, 170 0)
        // 3. LINESTRING(0 0, 170 80)
View Full Code Here

        runTestWithFilter(ft, filter, false, 4);// all non null but geoms 4. and 6.
    }

    @Test
    public void testTouches() throws Exception {
        FeatureType ft = this.dataStore.getSchema(testData.getTempTableName());

        // Available geometries:
        // INT32_COL SHAPE
        // --------- --------
        // 1. ------ POINT(0 0)
View Full Code Here

            mappingDataStore = DataAccessFinder.getDataStore(dsParams);
        }
        assertNotNull(mappingDataStore);
        FeatureSource<FeatureType, Feature> fSource;
        {
            FeatureType fType = mappingDataStore.getSchema(typeName);
            assertNotNull(fType);
            fSource = mappingDataStore.getFeatureSource(typeName);
        }
        FeatureCollection features;
        // make a getFeatures request with a nested properties filter.
View Full Code Here

            Assert.assertTrue(type instanceof FeatureType);
            Assert.assertFalse(type instanceof SimpleFeatureType);
            Assert.assertEquals(typeName, type.getName());
            Assert.assertTrue(type.getUserData().get(XSDTypeDefinition.class) instanceof XSDComplexTypeDefinition);
   
            FeatureType wq_plus_Type = (FeatureType) type;
   
            // I do not think types have default geometries any more.
            // assertNotNull(wq_plus_Type.getDefaultGeometry());
            Assert.assertNotNull(wq_plus_Type.getSuper());
            typeName = Types.typeName(GML.NAMESPACE, GML.AbstractFeatureType.getLocalPart());
            Assert.assertEquals(typeName, wq_plus_Type.getSuper().getName());
            Assert.assertNotNull(wq_plus_Type.getDescriptors());
            Assert.assertEquals(8, ((ComplexFeatureTypeImpl) wq_plus_Type).getTypeDescriptors().size());
   
            Name name = Types.typeName(NS_URI, "wq_plus");
            AttributeDescriptor wqPlusDescriptor = typeRegistry.getDescriptor(name, null);
            Assert.assertNotNull(wqPlusDescriptor);
View Full Code Here

     * Test method for 'org.geotools.data.complex.ComplexDataStore.getFeatureReader(String)'
     */
    @Test
    public void testGetFeatureReader() throws IOException {
        FeatureSource<FeatureType, Feature> access = dataStore.getFeatureSource(targetName);
        FeatureType type = access.getSchema();
        assertEquals(targetType, type);

        FeatureCollection<FeatureType, Feature> reader = access.getFeatures();
        assertNotNull(reader);

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.