Package org.geotools.filter

Examples of org.geotools.filter.LiteralExpression


                    query.setPropertyNames(properties);
                }
               
                // Add range to filter
                AttributeExpression geomAttb = filterFactory.createAttributeExpression(meta.getFeatureType(), meta.getFeatureType().getDefaultGeometry().getName());
                LiteralExpression pointExpr = filterFactory.createLiteralExpression(request.getPoint());
                DWithin dWithin = filterFactory.dwithin(geomAttb, pointExpr, request.getMaxRange(), request.getUnits());
                if (query.getFilter() == null) {
                    query.addFilter((Filter)dWithin);
                   
                } else {
View Full Code Here


                LinearRing outerShell = new LinearRing(coords,
                        new PrecisionModel(), 0);
                Geometry polygon = new Polygon(outerShell,
                        new PrecisionModel(), 0);
                LiteralExpression rightExpression = factory
                    .createLiteralExpression(polygon);

                //finalFilter.addLeftGeometry(leftExpression);
                finalFilter.addRightGeometry(rightExpression);
                filters.add(finalFilter);
View Full Code Here

        CompareFilter compFilter = factory.createCompareFilter(AbstractFilter.COMPARE_GREATER_THAN);
        AttributeExpression tempLeftExp = factory.createAttributeExpression((AttributeType)null);
        tempLeftExp.setAttributePath("TILE_ID");

        LiteralExpression tempRightExp = factory.createLiteralExpression(1000);
        compFilter.addLeftValue(tempLeftExp);
        compFilter.addRightValue(tempRightExp);
        update2.setFilter(compFilter);
        update2.addProperty("FAC_ID", "100");
View Full Code Here

        };
        PrecisionModel precModel = new PrecisionModel();
        LinearRing shell = new LinearRing(points, precModel, srid);
        Polygon testPoly = new Polygon(shell, precModel, srid);

        LiteralExpression right = factory.createLiteralExpression(testPoly);
        gf.addRightGeometry(right);
        gf.addLeftGeometry(factory.createAttributeExpression(null, "the_geom"));
        request.addLock("INWATERA_1M", gf, "Lock3");
    }
View Full Code Here

        coords[3] = new Coordinate(20, 10);
        coords[4] = new Coordinate(10, 10);

        LinearRing outerShell = new LinearRing(coords, new PrecisionModel(), 0);
        Polygon polygon = new Polygon(outerShell, new PrecisionModel(), 0);
        LiteralExpression rightExpression = factory.createLiteralExpression(polygon);
        filter.addLeftGeometry(leftExpression);
        filter.addRightGeometry(rightExpression);
        baseRequest.addLock("rail", filter);
        baseRequest.addLock("roads", filter);
View Full Code Here

        coords[3] = new Coordinate(20, 10);
        coords[4] = new Coordinate(10, 10);

        LinearRing outerShell = new LinearRing(coords, new PrecisionModel(), 0);
        Polygon polygon = new Polygon(outerShell, new PrecisionModel(), 0);
        LiteralExpression rightExpression = factory.createLiteralExpression(polygon);
        filter.addLeftGeometry(leftExpression);
        filter.addRightGeometry(rightExpression);

        internalRequest1.setFilter(filter);
View Full Code Here

        coords[3] = new Coordinate(20, 10);
        coords[4] = new Coordinate(10, 10);

        LinearRing outerShell = new LinearRing(coords, new PrecisionModel(), 0);
        Polygon polygon = new Polygon(outerShell, new PrecisionModel(), 0);
        LiteralExpression rightExpression = factory.createLiteralExpression(polygon);
        filter.addRightGeometry(rightExpression);

        internalRequest1.setFilter(filter);
        baseRequest.addSubRequest(internalRequest1);
View Full Code Here

                new PrecisionModel(), 0);
        //djb -- trying to get this to work with new FeatureType
        AttributeExpression tempLeftExp = factory.createAttributeExpression((FeatureType)null,"location");
        //tempLeftExp.setAttributePath("location");

        LiteralExpression tempRightExp = factory.createLiteralExpression(DefaultExpression.LITERAL_GEOMETRY);
        tempRightExp.setLiteral(tempPoly);

        org.geotools.filter.GeometryFilter tempFilter = factory
            .createGeometryFilter(AbstractFilter.GEOMETRY_DISJOINT);
        tempFilter.addLeftGeometry(tempLeftExp);
        tempFilter.addRightGeometry(tempRightExp);
View Full Code Here

        Polygon tempPoly = new Polygon(outerRing, innerRing,
                new PrecisionModel(), 0);
        AttributeExpression tempLeftExp = factory.createAttributeExpression((FeatureType)null,"location");
        //tempLeftExp.setAttributePath("location");

        LiteralExpression tempRightExp = factory.createLiteralExpression(DefaultExpression.LITERAL_GEOMETRY);
        tempRightExp.setLiteral(tempPoly);

        org.geotools.filter.GeometryFilter tempFilter = factory
            .createGeometryFilter(AbstractFilter.GEOMETRY_WITHIN);
        tempFilter.addLeftGeometry(tempLeftExp);
        tempFilter.addRightGeometry(tempRightExp);
View Full Code Here

        Polygon tempPoly = new Polygon(outerRing, innerRing,
                new PrecisionModel(), 0);
        AttributeExpression tempLeftExp = factory.createAttributeExpression((FeatureType)null,"location");
       // tempLeftExp.setAttributePath("location");

        LiteralExpression tempRightExp = factory.createLiteralExpression(DefaultExpression.LITERAL_GEOMETRY);
        tempRightExp.setLiteral(tempPoly);

        org.geotools.filter.GeometryFilter tempFilter = factory
            .createGeometryFilter(AbstractFilter.GEOMETRY_WITHIN);
        tempFilter.addLeftGeometry(tempLeftExp);
        tempFilter.addRightGeometry(tempRightExp);
View Full Code Here

TOP

Related Classes of org.geotools.filter.LiteralExpression

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.