Class FilterUtilities
- java.lang.Object
-
- org.hortonmachine.gears.utils.features.FilterUtilities
-
public class FilterUtilities extends Object
Helper class for simple filter constructions.- Author:
- Andrea Antonello (www.hydrologis.com)
-
-
Constructor Summary
Constructors Constructor Description FilterUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.opengis.filter.FiltergetBboxFilter(String attribute, double west, double east, double south, double north)Create a bounding box filter from the bounds coordinates.static org.opengis.filter.FiltergetBboxFilter(String attribute, org.opengis.geometry.BoundingBox bbox)Create a bounding box filter from a bounding box.static org.opengis.filter.FiltergetCQLFilter(String expression)static org.opengis.filter.FiltergetIntersectsGeometryFilter(String geomName, org.locationtech.jts.geom.Geometry geometry)Creates an intersect filter.
-
-
-
Method Detail
-
getBboxFilter
public static org.opengis.filter.Filter getBboxFilter(String attribute, org.opengis.geometry.BoundingBox bbox) throws org.geotools.filter.text.cql2.CQLException
Create a bounding box filter from a bounding box.- Parameters:
attribute- the geometry attribute or null in the case of default "the_geom".bbox- theBoundingBox.- Returns:
- the filter.
- Throws:
org.geotools.filter.text.cql2.CQLException
-
getBboxFilter
public static org.opengis.filter.Filter getBboxFilter(String attribute, double west, double east, double south, double north) throws org.geotools.filter.text.cql2.CQLException
Create a bounding box filter from the bounds coordinates.- Parameters:
attribute- the geometry attribute or null in the case of default "the_geom".west- western bound coordinate.east- eastern bound coordinate.south- southern bound coordinate.north- northern bound coordinate.- Returns:
- the filter.
- Throws:
org.geotools.filter.text.cql2.CQLException
-
getCQLFilter
public static org.opengis.filter.Filter getCQLFilter(String expression) throws org.geotools.filter.text.cql2.CQLException
- Throws:
org.geotools.filter.text.cql2.CQLException
-
getIntersectsGeometryFilter
public static org.opengis.filter.Filter getIntersectsGeometryFilter(String geomName, org.locationtech.jts.geom.Geometry geometry) throws org.geotools.filter.text.cql2.CQLException
Creates an intersect filter.- Parameters:
geomName- the name of the geom field to filter.geometry- the geometry to use as filtering geom.- Returns:
- the filter.
- Throws:
org.geotools.filter.text.cql2.CQLException
-
-