Package org.opengis.filter

Examples of org.opengis.filter.FilterFactory2.literal()


              geometryPropertyName);
        } else if (spatialFilterType.equals(SpatialFilterType.TOUCHES)) {
          geometryFilter = ff.touches(ff.literal(geometry),
              geometryPropertyName);
        } else if (spatialFilterType.equals(SpatialFilterType.WITHIN)) {
          geometryFilter = ff.within(ff.literal(geometry),
              geometryPropertyName);
        }
      }

      Filter attributesFilter = null;
View Full Code Here


    private static Style createGreyscaleRasterStyle(GridCoverage2D cov) {
        StyleFactory sf = CommonFactoryFinder.getStyleFactory(null);
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
       
        ContrastEnhancement ce = sf.contrastEnhancement(ff.literal(1.0), ContrastMethod.NORMALIZE);
        SelectedChannelType sct = sf.createSelectedChannelType("1", ce);

        RasterSymbolizer sym = sf.getDefaultRasterSymbolizer();
        ChannelSelection sel = sf.channelSelection(sct);
        sym.setChannelSelection(sel);
View Full Code Here

        SelectedChannelType[] sct = new SelectedChannelType[cov.getNumSampleDimensions()];
       
        StyleFactory sf = CommonFactoryFinder.getStyleFactory(null);
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
       
        ContrastEnhancement ce = sf.contrastEnhancement(ff.literal(1.0), ContrastMethod.NORMALIZE);
        for (int i = 0; i < 3; i++) {
            sct[i] = sf.createSelectedChannelType(String.valueOf(channelNum[i]), ce);
        }
        RasterSymbolizer sym = sf.getDefaultRasterSymbolizer();
        ChannelSelection sel = sf.channelSelection(sct[RED], sct[GREEN], sct[BLUE]);
View Full Code Here

        _lock.lock();
        try {
            FilterFactory2 factory = CommonFactoryFinder
                    .getFilterFactory2(GeoTools.getDefaultHints());
            Filter filter = factory.equals(
                    factory.property(_idColumn), factory.literal(id));

            _index = null;

            _featureStore.removeFeatures(filter);
            try {
View Full Code Here

           
            List<Filter> filters = new LinkedList<Filter>();
           
            for(String id : ids) {
                filters.add(factory.equals(
                    factory.property(_idColumn), factory.literal(id)));
            }
           
            _index = null;

            _featureStore.removeFeatures(factory.or(filters));
View Full Code Here

        // PropertyIsEqualTo);

        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        // @id = 'DELETEME.1' AND STRING_COL = 'test'
        filter = ff.and(ff.id(Collections.singleton(ff.featureId(typeName + ".1"))),
                ff.equals(ff.property("STRING_COL"), ff.literal("test")));

        filteringQuery = new Query(typeName, filter);
        // filteringQuery based on the above filter...
        sdeQuery = createFilteringQuery();
View Full Code Here

                        final Range range= (Range)value;
                        filters.add(
                                ff.and(
                                        ff.lessOrEqual(
                                                ff.property(propertyName),
                                                ff.literal(range.getMaxValue())),
                                        ff.greaterOrEqual(
                                                ff.property(propertyName),
                                                ff.literal(range.getMinValue()))
                                ));
                    else {
View Full Code Here

                                        ff.lessOrEqual(
                                                ff.property(propertyName),
                                                ff.literal(range.getMaxValue())),
                                        ff.greaterOrEqual(
                                                ff.property(propertyName),
                                                ff.literal(range.getMinValue()))
                                ));
                    else {
                        // SINGLE value
                        filters.add(
                                ff.equal(
View Full Code Here

                    else {
                        // SINGLE value
                        filters.add(
                                ff.equal(
                                        ff.property(propertyName),
                                        ff.literal(value),true)
                                    );
                    }
                } else { //domainType == DomainType.RANGE
                    // Domain made of ranges such as (beginTime,endTime) , (beginElevation,endElevation) , ...
                    if(value instanceof Range){
View Full Code Here

                        final Comparable minValue = range.getMinValue();
                        if(maxValue.compareTo(minValue)!=0){
                            // logic comes from Range.intersectsNC(Range)
                            // in summary, requestedMax > min && requestedMin < max
                            Filter maxCondition = ff.greaterOrEqual(
                                                        ff.literal(maxValue),
                                                        ff.property(propertyName));
                            Filter minCondition = ff.lessOrEqual(
                                                        ff.literal(minValue),
                                                        ff.property(additionalPropertyName));
                           
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.