Package org.geotools.filter.spatial
Class ReprojectingFilterVisitor
- Object
-
- DuplicatingFilterVisitor
-
- ReprojectingFilterVisitor
-
- All Implemented Interfaces:
ExpressionVisitor
,FilterVisitor
public class ReprojectingFilterVisitor extends DuplicatingFilterVisitor
Returns a clone of the provided filter where all geometries and bboxes have been reprojected to the CRS of the associated attributes. The working assumption is that the filters specified are strictly compliant with the OGC spec, so the first item is always aPropertyName
, and the second always aLiteral
- Author:
- Andrea Aime - The Open Planning Project
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
ReprojectingFilterVisitor.FunctionReprojector
Makes sure that the result of a function gets reprojected to the specified CRS, should it be a Geometry
-
Field Summary
-
Fields inherited from class DuplicatingFilterVisitor
ff
-
-
Constructor Summary
Constructors Constructor Description ReprojectingFilterVisitor(FilterFactory factory, FeatureType featureType)
ReprojectingFilterVisitor(FilterFactory factory, FeatureType featureType, CoordinateReferenceSystem targetCrs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Geometry
reproject(Object value, CoordinateReferenceSystem propertyCrs)
Helper method to reproject a geometry.Object
visit(Literal expression, Object extraData)
Object
visit(PropertyIsEqualTo filter, Object extraData)
Object
visit(PropertyIsNotEqualTo filter, Object extraData)
Object
visit(BBOX filter, Object extraData)
Object
visit(Beyond filter, Object extraData)
Object
visit(Contains filter, Object extraData)
Object
visit(Crosses filter, Object extraData)
Object
visit(Disjoint filter, Object extraData)
Object
visit(DWithin filter, Object extraData)
Object
visit(Equals filter, Object extraData)
Object
visit(Intersects filter, Object extraData)
Object
visit(Overlaps filter, Object extraData)
Object
visit(Touches filter, Object extraData)
Object
visit(Within filter, Object extraData)
-
Methods inherited from class DuplicatingFilterVisitor
getFactory, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitNullFilter
-
-
-
-
Constructor Detail
-
ReprojectingFilterVisitor
public ReprojectingFilterVisitor(FilterFactory factory, FeatureType featureType)
-
ReprojectingFilterVisitor
public ReprojectingFilterVisitor(FilterFactory factory, FeatureType featureType, CoordinateReferenceSystem targetCrs)
-
-
Method Detail
-
visit
public Object visit(BBOX filter, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
- Overrides:
visit
in classDuplicatingFilterVisitor
-
visit
public Object visit(PropertyIsEqualTo filter, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
- Overrides:
visit
in classDuplicatingFilterVisitor
-
visit
public Object visit(PropertyIsNotEqualTo filter, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
- Overrides:
visit
in classDuplicatingFilterVisitor
-
visit
public Object visit(Beyond filter, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
- Overrides:
visit
in classDuplicatingFilterVisitor
-
visit
public Object visit(Contains filter, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
- Overrides:
visit
in classDuplicatingFilterVisitor
-
visit
public Object visit(Crosses filter, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
- Overrides:
visit
in classDuplicatingFilterVisitor
-
visit
public Object visit(Disjoint filter, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
- Overrides:
visit
in classDuplicatingFilterVisitor
-
visit
public Object visit(DWithin filter, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
- Overrides:
visit
in classDuplicatingFilterVisitor
-
visit
public Object visit(Intersects filter, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
- Overrides:
visit
in classDuplicatingFilterVisitor
-
visit
public Object visit(Overlaps filter, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
- Overrides:
visit
in classDuplicatingFilterVisitor
-
visit
public Object visit(Touches filter, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
- Overrides:
visit
in classDuplicatingFilterVisitor
-
visit
public Object visit(Within filter, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
- Overrides:
visit
in classDuplicatingFilterVisitor
-
visit
public Object visit(Equals filter, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
- Overrides:
visit
in classDuplicatingFilterVisitor
-
visit
public Object visit(Literal expression, Object extraData)
- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classDuplicatingFilterVisitor
-
reproject
protected Geometry reproject(Object value, CoordinateReferenceSystem propertyCrs)
Helper method to reproject a geometry.
-
-