Package org.geotools.filter

Examples of org.geotools.filter.AttributeExpression


                    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);
                   
View Full Code Here


        baseRequest.setLockAll(true);

        // make base comparison objects
        GeometryFilter filter = factory.createGeometryFilter(AbstractFilter.GEOMETRY_WITHIN);
        //DJB changed this so it conforms to new FeatureType method
        AttributeExpression leftExpression = factory.createAttributeExpression((FeatureType)null,"location");
        //leftExpression.setAttributePath("location");

        // Creates coordinates for the linear ring
        Coordinate[] coords = new Coordinate[5];
        coords[0] = new Coordinate(10, 10);
View Full Code Here

        UpdateRequest update2 = new UpdateRequest();
        update2.setTypeName("BUILTUPA_1M");

        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);
View Full Code Here

        internalRequest1.setTypeName("rail");

        //baseRequest.setReleaseAction(true);
        // make base comparison objects
        GeometryFilter filter = factory.createGeometryFilter(AbstractFilter.GEOMETRY_WITHIN);
        AttributeExpression leftExpression = factory.createAttributeExpression((AttributeType)null);
        leftExpression.setAttributePath("location");

        // Creates coordinates for the linear ring
        Coordinate[] coords = new Coordinate[5];
        coords[0] = new Coordinate(10, 10);
        coords[1] = new Coordinate(10, 20);
View Full Code Here

        LinearRing outerRing = new LinearRing(coord, new PrecisionModel(), 0);
        LinearRing[] innerRing = new LinearRing[0];
        Polygon tempPoly = new Polygon(outerRing, innerRing,
                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);
View Full Code Here

        LinearRing outerRing = new LinearRing(coord, new PrecisionModel(), 0);
        LinearRing[] innerRing = new LinearRing[0];
        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);
View Full Code Here

        LinearRing outerRing = new LinearRing(coord, new PrecisionModel(), 0);
        LinearRing[] innerRing = new LinearRing[0];
        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);
View Full Code Here

    public void test8() throws Exception {
        // make base comparison objects              
        LiteralExpression tempExp1 = factory.createLiteralExpression(DefaultExpression.LITERAL_STRING);
        tempExp1.setLiteral("Main St.");

        AttributeExpression tempExp2 = factory.createAttributeExpression((FeatureType)null,"Person/Address/StreetName");
        //tempExp2.setAttributePath("Person/Address/StreetName");

        CompareFilter tempFilter = factory.createCompareFilter(AbstractFilter.COMPARE_EQUALS);
        tempFilter.addRightValue(tempExp1);
        tempFilter.addLeftValue(tempExp2);
View Full Code Here

            + "FILTER=<Filter xmlns:gml='http://www.opengis.net/gml'><Within><PropertyName>location</PropertyName><gml:Box><gml:coordinates>10,10 20,20</gml:coordinates></gml:Box></Within></Filter>";

        // make base comparison objects
        org.geotools.filter.GeometryFilter filter = factory
            .createGeometryFilter(AbstractFilter.GEOMETRY_WITHIN);
        AttributeExpression leftExpression = factory.createAttributeExpression((FeatureType)null,"location");
        //leftExpression.setAttributePath("location");

        // Creates coordinates for the linestring
        Coordinate[] coords = new Coordinate[5];
        coords[0] = new Coordinate(10, 10);
View Full Code Here

        baseRequest.setVersion("1.0.0");

        // make base comparison objects
        org.geotools.filter.GeometryFilter filter = factory
            .createGeometryFilter(AbstractFilter.GEOMETRY_WITHIN);
        AttributeExpression leftExpression = factory.createAttributeExpression((FeatureType)null,"location");
        //leftExpression.setAttributePath("location");

        // Creates coordinates for the linear ring
        Coordinate[] coords = new Coordinate[5];
        coords[0] = new Coordinate(10, 10);
View Full Code Here

TOP

Related Classes of org.geotools.filter.AttributeExpression

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.