public class SpatialRestrictions extends Object
A factory for spatial criteria. <p> The criterion types created by this class implement the spatial query expressions of the OpenGIS Simple Features Specification for SQL, Revision 1.1. In addition, it provides for a simple spatial <code>filter</code> that works mostly using the spatial index. This corresponds to the Oracle Spatial’s "SDO_FILTER" function, or the "&&" operator of PostGIS.
| Modifier and Type | Method and Description |
|---|---|
static SpatialRelateExpression |
contains(String propertyName,
com.vividsolutions.jts.geom.Geometry value)
Apply a "spatially contains" constraint to the named property
|
static SpatialRelateExpression |
crosses(String propertyName,
com.vividsolutions.jts.geom.Geometry value)
Apply a "spatially crosses" constraint to the named property
|
static SpatialRelateExpression |
disjoint(String propertyName,
com.vividsolutions.jts.geom.Geometry value)
Apply a "spatially disjoint" constraint to the named property
|
static org.hibernate.criterion.Criterion |
distanceWithin(String propertyName,
com.vividsolutions.jts.geom.Geometry geometry,
double distance)
Apply a "distance within" constraint to the named property
|
static SpatialRelateExpression |
eq(String propertyName,
com.vividsolutions.jts.geom.Geometry value)
Apply a "spatially equal" constraint to the named property
|
static SpatialFilter |
filter(String propertyName,
com.vividsolutions.jts.geom.Envelope envelope,
int srid)
Apply a bounding box overlap constraint to the named property
|
static SpatialFilter |
filter(String propertyName,
com.vividsolutions.jts.geom.Geometry value)
Apply a bounding box overlap constraint to the named property
|
static org.hibernate.criterion.Criterion |
havingSRID(String propertyName,
int srid)
Apply a "having srid" constraint to the named property
|
static SpatialRelateExpression |
intersects(String propertyName,
com.vividsolutions.jts.geom.Geometry value)
Apply a "spatially intersects" constraint to the named property
|
static org.hibernate.criterion.Criterion |
isEmpty(String propertyName)
Apply an "is empty" constraint to the named property
|
static org.hibernate.criterion.Criterion |
isNotEmpty(String propertyName)
Apply an "is not empty" constraint to the named property
|
static SpatialRelateExpression |
overlaps(String propertyName,
com.vividsolutions.jts.geom.Geometry value)
Apply a "spatially overlaps" constraint to the named property
|
static org.hibernate.criterion.Criterion |
spatialRestriction(int relation,
String propertyName,
com.vividsolutions.jts.geom.Geometry value)
Apply the specified spatial relation constraint to the named property.
|
static SpatialRelateExpression |
touches(String propertyName,
com.vividsolutions.jts.geom.Geometry value)
Apply a "spatially touches" constraint to the named property
|
static SpatialRelateExpression |
within(String propertyName,
com.vividsolutions.jts.geom.Geometry value)
Apply a "spatially within" constraint to the named property
|
public static SpatialRelateExpression eq(String propertyName, com.vividsolutions.jts.geom.Geometry value)
Apply a "spatially equal" constraint to the named property
propertyName - The name of the propertyvalue - The geometry value to use in comparisonSpatialRelateExpressionpublic static SpatialRelateExpression within(String propertyName, com.vividsolutions.jts.geom.Geometry value)
Apply a "spatially within" constraint to the named property
propertyName - The name of the propertyvalue - The geometry value to use in comparisonSpatialRelateExpressionpublic static SpatialRelateExpression contains(String propertyName, com.vividsolutions.jts.geom.Geometry value)
Apply a "spatially contains" constraint to the named property
propertyName - The name of the propertyvalue - The geometry value to use in comparisonSpatialRelateExpressionpublic static SpatialRelateExpression crosses(String propertyName, com.vividsolutions.jts.geom.Geometry value)
Apply a "spatially crosses" constraint to the named property
propertyName - The name of the propertyvalue - The geometry value to use in comparisonSpatialRelateExpressionpublic static SpatialRelateExpression disjoint(String propertyName, com.vividsolutions.jts.geom.Geometry value)
Apply a "spatially disjoint" constraint to the named property
propertyName - The name of the propertyvalue - The geometry value to use in comparisonSpatialRelateExpressionpublic static SpatialRelateExpression intersects(String propertyName, com.vividsolutions.jts.geom.Geometry value)
Apply a "spatially intersects" constraint to the named property
propertyName - The name of the propertyvalue - The geometry value to use in comparisonSpatialRelateExpressionpublic static SpatialRelateExpression overlaps(String propertyName, com.vividsolutions.jts.geom.Geometry value)
Apply a "spatially overlaps" constraint to the named property
propertyName - The name of the propertyvalue - The geometry value to use in comparisonSpatialRelateExpressionpublic static SpatialRelateExpression touches(String propertyName, com.vividsolutions.jts.geom.Geometry value)
Apply a "spatially touches" constraint to the named property
propertyName - The name of the propertyvalue - The geometry value to use in comparisonSpatialRelateExpressionpublic static SpatialFilter filter(String propertyName, com.vividsolutions.jts.geom.Geometry value)
Apply a bounding box overlap constraint to the named property
propertyName - The name of the propertyvalue - The geometry value whose bounding box to use in the comparisonSpatialFilterpublic static SpatialFilter filter(String propertyName, com.vividsolutions.jts.geom.Envelope envelope, int srid)
Apply a bounding box overlap constraint to the named property
propertyName - The name of the propertyenvelope - The envelope or bounding box to use in the comparisonsrid - the SRID of the bounding boxSpatialFilterpublic static org.hibernate.criterion.Criterion distanceWithin(String propertyName, com.vividsolutions.jts.geom.Geometry geometry, double distance)
Apply a "distance within" constraint to the named property
propertyName - The name of the propertygeometry - The geometry value to use in the comparisondistance - The distanceDWithinExpressionpublic static org.hibernate.criterion.Criterion havingSRID(String propertyName, int srid)
Apply a "having srid" constraint to the named property
propertyName - The name of the propertysrid - The SRID value to use in the comparisonHavingSridExpressionpublic static org.hibernate.criterion.Criterion isEmpty(String propertyName)
Apply an "is empty" constraint to the named property
propertyName - The name of the propertyIsEmptyExpressionpublic static org.hibernate.criterion.Criterion isNotEmpty(String propertyName)
Apply an "is not empty" constraint to the named property
propertyName - The name of the propertyIsEmptyExpressionpublic static org.hibernate.criterion.Criterion spatialRestriction(int relation,
String propertyName,
com.vividsolutions.jts.geom.Geometry value)
Apply the specified spatial relation constraint to the named property.
relation - The spatial relation to applypropertyName - The name of the propertyvalue - The geometry value to use in the comparisonSpatialFilterCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.