Package org.opengis.feature.type

Examples of org.opengis.feature.type.FeatureType


        private MathTransform getMathTransform(ObjectId mdid) {
            MathTransform transform = this.transformsByMetadataId.get(mdid);
            if (transform == null) {
                RevFeatureType revtype = source.getFeatureType(mdid);
                FeatureType type = revtype.type();
                CoordinateReferenceSystem sourceCrs = type.getCoordinateReferenceSystem();
                CoordinateReferenceSystem targetCrs = this.crs;
                if (sourceCrs == null) {
                    sourceCrs = targetCrs;
                }
                try {
View Full Code Here


     */
    @Override
    protected  ImmutableSet<PropertyDescriptor> _call() {
        Preconditions.checkState(featureType != null, "FeatureType has not been set.");

        FeatureType type = featureType.type();

        ImmutableSet.Builder<PropertyDescriptor> propertySetBuilder = new ImmutableSet.Builder<PropertyDescriptor>();

        propertySetBuilder.addAll(type.getDescriptors());

        return propertySetBuilder.build();
    }
View Full Code Here

        super("org.geoserver.wms.GetLegendGraphicRequest");
    }

    @Override
    protected List<String> getLayers(Object request) {
        FeatureType type = (FeatureType) OwsUtils.get(request, "layer");
        return Arrays.asList(type.getName().toString());
    }
View Full Code Here

        Optional<RevFeatureType> type = geogig.command(RevObjectParse.class)
                .setObjectId(entry.getOldObject().getMetadataId()).call(RevFeatureType.class);
        assertTrue(type.isPresent());

        FeatureType featureType = type.get().type();

        CoordinateReferenceSystem expected = CRS.decode("EPSG:4326", true);
        CoordinateReferenceSystem actual = featureType.getCoordinateReferenceSystem();

        assertTrue(actual.toString(), CRS.equalsIgnoreMetadata(expected, actual));
    }
View Full Code Here

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

        // Build a polygon that intercepts some of the geometries, but not all of them
        Polygon p = buildPolygon(-180, 0, -160, 90);

        Filter filter = ff.not(ff.isNull(ff.property("SHAPE")));
View Full Code Here

        runTestWithFilter(ft, filter, false);
    }

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

        // Build the filter with a polygon that is inside POLYGON((-10 -10, -10 10, 10 10, 10 -10,
        // -10 -10))
        Polygon p = buildPolygon(-9, -9, -8, -8);
        Filter filter = ff.contains(ff.property("SHAPE"), ff.literal(p));
View Full Code Here

        runTestWithFilter(ft, filter, false);
    }

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

        // Build a filter so that SDE would actually catch more geometries, it would
        // actually include
        // "MULTIPOLYGON( ((-1 -1, -1 1, 1 1, 1 -1, -1 -1)), ((-170 -80, -170 -70, -160 -70, -160 -80, -170 -80)) )"
        // in the results as well. It seems the containment semantics is applied in or to the
View Full Code Here

        runTestWithFilter(ft, filter, false);
    }

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

        // Build the filter
        Filter filter = ff.bbox("SHAPE", -1, -1, 1, 1, "EPSG:4326");

        runTestWithFilter(ft, filter, false);
View Full Code Here

        runTestWithFilter(ft, filter, false);
    }

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

        System.out
                .println(this.dataStore.getFeatureSource(ft.getName().getLocalPart()).getBounds());

        // build a or of bbox so that
        // - the intersection of the bboxes is empty
        // - the union of the bboxes actually gets more data than necessary
        BBOX bbox1 = ff.bbox("SHAPE", -171, -90, -169, 90, "EPSG:4326");
View Full Code Here

        runTestWithFilter(ft, filter, false);
    }

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

        // Build the filter
        Polygon p = buildPolygon(-1, -1, 1, 1);
        Filter filter = ff.intersects(ff.property("SHAPE"), ff.literal(p));
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.