Examples of literal()


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

        };
        response = new GetMapResponse(Collections.singleton((GetMapProducer) producer));
        response.execute(request);
       
        // only defaults
        assertNull(ff.function("env", ff.literal("myParam")).evaluate(null));
        assertEquals(10, ff.function("env", ff.literal("otherParam"), ff.literal(10)).evaluate(null));
    }

    private void assertInvalidMandatoryParam(String expectedExceptionCode) {
        try {
View Full Code Here

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

        response = new GetMapResponse(Collections.singleton((GetMapProducer) producer));
        response.execute(request);
       
        // only defaults
        assertNull(ff.function("env", ff.literal("myParam")).evaluate(null));
        assertEquals(10, ff.function("env", ff.literal("otherParam"), ff.literal(10)).evaluate(null));
    }

    private void assertInvalidMandatoryParam(String expectedExceptionCode) {
        try {
            response.execute(request);
View Full Code Here

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

        response = new GetMapResponse(Collections.singleton((GetMapProducer) producer));
        response.execute(request);
       
        // only defaults
        assertNull(ff.function("env", ff.literal("myParam")).evaluate(null));
        assertEquals(10, ff.function("env", ff.literal("otherParam"), ff.literal(10)).evaluate(null));
    }

    private void assertInvalidMandatoryParam(String expectedExceptionCode) {
        try {
            response.execute(request);
View Full Code Here

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

        MapLayerInfo layer = request.getLayers()[0];
        assertEquals(getLayerId(MockData.BASIC_POLYGONS), layer.getName());
        // check the filter imposed in the feature type constraint
        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        assertEquals(1, layer.getLayerFeatureConstraints().length);
        assertEquals(ff.equals(ff.property("ID"), ff.literal("xyz")), layer.getLayerFeatureConstraints()[0].getFilter());
    }
   
    public void testSldLibraryFeatureTypeConstraints() throws Exception {
        // no styles, no layer, the full definition is in the sld
        HashMap kvp = new HashMap();
View Full Code Here

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

        MapLayerInfo layer = request.getLayers()[0];
        assertEquals(getLayerId(MockData.BASIC_POLYGONS), layer.getName());
        // check the filter imposed in the feature type constraint
        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        assertEquals(1, layer.getLayerFeatureConstraints().length);
        assertEquals(ff.equals(ff.property("ID"), ff.literal("xyz")), layer.getLayerFeatureConstraints()[0].getFilter());
    }
   
    /**
     * One of the cite tests ensures that WMTVER is recognized as VERSION and the server does
     * not complain
View Full Code Here

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

        }
       
        FilterFactory2 ff = (FilterFactory2) CommonFactoryFinder.getFilterFactory(null);
       
        String geomProperty = layer.getSchema().getGeometryDescriptor().getLocalName();
        Filter aoiFilter = ff.intersects(ff.property(geomProperty), ff.literal(geometry));
       
        return ff.and(aoiFilter, filter );
    }

    protected void reloadFeatures( final ILayer notifierLayer ) {
View Full Code Here

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

        }
        FilterFactory2 factory = (FilterFactory2) CommonFactoryFinder.getFilterFactory(GeoTools
                .getDefaultHints());
        Geometry geom = new GeometryFactory().toGeometry(bbox);
        Intersects filter = factory.intersects(factory.property(type.getGeometryDescriptor()
                .getName()), factory.literal(geom));

        layer.getQuery(false);
        final FeatureCollection<SimpleFeatureType, SimpleFeature> results = source
                .getFeatures(filter);
View Full Code Here

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

    public void testSVGGraphicsFactory() throws Exception {
        URL url = GeoToolsTest.class.getResource("example.svg");
       
        SVGGraphicFactory svgFactory = new SVGGraphicFactory();
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        Literal expr = ff.literal( url.toExternalForm() );
       
        Icon icon = svgFactory.getIcon(null, expr, "image/svg",16 );
        assertNotNull( icon );
       
    }
View Full Code Here

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

      final Geometry splitLineGeom = reprojectSplitLine(splittingLine, layerCrs);

      SimpleFeatureType schema = selectedLayer.getSchema();
      String geomName = schema.getGeometryDescriptor().getLocalName();

      intersectsFilter = ff.intersects(ff.property(geomName), ff.literal(splitLineGeom));

      if (Filter.EXCLUDE.equals(filter)) {
              filter = intersectsFilter;
          } else {
              filter = ff.and(filter, intersectsFilter);
View Full Code Here

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

                    if (!CRS.equalsIgnoreMetadata(crs,dataCRS)) {
                        MathTransform transform = CRS.findMathTransform(crs, dataCRS);
                        geometry = JTS.transform(geometry, transform);
                    }
                    String the_geom = schema.getGeometryDescriptor().getName().getLocalPart();
                    Filter spatialFilter = ff.intersects( ff.property(the_geom), ff.literal( geometry ) );
                    if( filter != null ){
                        return ff.and( filter, spatialFilter );
                    }
                    else {
                        return spatialFilter;
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.