Package com.querydsl.spatial
Class GeometryExpressions
java.lang.Object
com.querydsl.spatial.GeometryExpressions
GeometryExpressions contains static functions for GEO operations
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringExpression
asEWKT
(GeometryExpression<?> expr) Return a specified ST_Geometry value from Extended Well-Known Text representation (EWKT).static <T extends org.geolatte.geom.Geometry>
GeometryExpression<T>asGeometry
(Expression<T> expr) Create a new GeometryExpressionstatic <T extends org.geolatte.geom.Geometry>
GeometryExpression<T>asGeometry
(T value) Create a new GeometryExpressionstatic GeometryExpression<?>
collect
(Expression<? extends org.geolatte.geom.Geometry> expr1, Expression<? extends org.geolatte.geom.Geometry> expr2) Return a specified ST_Geometry value from a collection of other geometries.static GeometryExpression<?>
collect
(Expression<? extends org.geolatte.geom.GeometryCollection> collection) Return a specified ST_Geometry value from a collection of other geometries.static BooleanExpression
dwithin
(Expression<? extends org.geolatte.geom.Geometry> expr1, Expression<? extends org.geolatte.geom.Geometry> expr2, double distance) Returns true if the geometries are within the specified distance of one another.static BooleanExpression
dwithin
(Expression<? extends org.geolatte.geom.Geometry> expr1, Expression<? extends org.geolatte.geom.Geometry> expr2, Expression<Double> distance) Returns true if the geometries are within the specified distance of one another.static GeometryExpression<?>
extent
(Expression<? extends org.geolatte.geom.GeometryCollection> collection) Returns the bounding box that bounds rows of geometries.static GeometryExpression<?>
fromText
(Expression<String> text) Return a specified ST_Geometry value from Well-Known Text representation (WKT).static GeometryExpression<?>
Return a specified ST_Geometry value from Well-Known Text representation (WKT).static GeometryExpression<org.geolatte.geom.Geometry>
geometryOperation
(Operator op, Expression<?>... args) Create a new Geometry operation expressionstatic <T extends org.geolatte.geom.Geometry>
GeometryExpression<T>geometryOperation
(Class<? extends T> type, Operator op, Expression<?>... args) Create a new Geometry operation expressionstatic LineStringExpression<org.geolatte.geom.LineString>
lineStringOperation
(Operator op, Expression<?>... args) Create a new LineString operation expressionstatic PointExpression<org.geolatte.geom.Point>
pointOperation
(Operator op, Expression<?>... args) Create a new Point operation expressionstatic PolygonExpression<org.geolatte.geom.Polygon>
polygonOperation
(Operator op, Expression<?>... args) Create a new Polygon operation expressionstatic <T extends org.geolatte.geom.Geometry>
GeometryExpression<T>setSRID
(Expression<T> expr, int srid) Sets the SRID on a geometry to a particular integer value.static <T extends org.geolatte.geom.Geometry>
GeometryExpression<T>translate
(Expression<T> expr, float deltax, float deltay) Translates the geometry to a new location using the numeric parameters as offsets.static <T extends org.geolatte.geom.Geometry>
GeometryExpression<T>translate
(Expression<T> expr, float deltax, float deltay, float deltaz) Translates the geometry to a new location using the numeric parameters as offsets.static NumberExpression<Double>
xmax
(GeometryExpression<?> expr) Returns X maxima of a bounding box 2d or 3d or a geometry.static NumberExpression<Double>
xmin
(GeometryExpression<?> expr) Returns X minima of a bounding box 2d or 3d or a geometry.static NumberExpression<Double>
ymax
(GeometryExpression<?> expr) Returns Y maxima of a bounding box 2d or 3d or a geometry.static NumberExpression<Double>
ymin
(GeometryExpression<?> expr) Returns Y minima of a bounding box 2d or 3d or a geometry.
-
Method Details
-
asEWKT
Return a specified ST_Geometry value from Extended Well-Known Text representation (EWKT).- Parameters:
expr
- geometry- Returns:
- serialized form
-
fromText
Return a specified ST_Geometry value from Well-Known Text representation (WKT).- Parameters:
text
- WKT form- Returns:
- geometry
-
fromText
Return a specified ST_Geometry value from Well-Known Text representation (WKT).- Parameters:
text
- WKT form- Returns:
- geometry
-
setSRID
public static <T extends org.geolatte.geom.Geometry> GeometryExpression<T> setSRID(Expression<T> expr, int srid) Sets the SRID on a geometry to a particular integer value.- Type Parameters:
T
-- Parameters:
expr
- geometrysrid
- SRID- Returns:
- converted geometry
-
xmin
Returns X minima of a bounding box 2d or 3d or a geometry.- Parameters:
expr
- geometry- Returns:
- x minima
-
xmax
Returns X maxima of a bounding box 2d or 3d or a geometry.- Parameters:
expr
- geometry- Returns:
- x maxima
-
ymin
Returns Y minima of a bounding box 2d or 3d or a geometry.- Parameters:
expr
- geometry- Returns:
- y minima
-
ymax
Returns Y maxima of a bounding box 2d or 3d or a geometry.- Parameters:
expr
- geometry- Returns:
- y maxima
-
dwithin
public static BooleanExpression dwithin(Expression<? extends org.geolatte.geom.Geometry> expr1, Expression<? extends org.geolatte.geom.Geometry> expr2, Expression<Double> distance) Returns true if the geometries are within the specified distance of one another. For geometry units are in those of spatial reference and For geography units are in meters.- Parameters:
expr1
- geometryexpr2
- other geometrydistance
- distance- Returns:
- true, if within distance of each other
-
dwithin
public static BooleanExpression dwithin(Expression<? extends org.geolatte.geom.Geometry> expr1, Expression<? extends org.geolatte.geom.Geometry> expr2, double distance) Returns true if the geometries are within the specified distance of one another. For geometry units are in those of spatial reference and For geography units are in meters.- Parameters:
expr1
- geometryexpr2
- other geometrydistance
- distance- Returns:
- true, if within distance of each other
-
extent
public static GeometryExpression<?> extent(Expression<? extends org.geolatte.geom.GeometryCollection> collection) Returns the bounding box that bounds rows of geometries.- Parameters:
collection
- geometry collection- Returns:
- bounding box
-
collect
public static GeometryExpression<?> collect(Expression<? extends org.geolatte.geom.GeometryCollection> collection) Return a specified ST_Geometry value from a collection of other geometries.- Parameters:
collection
- geometry collection- Returns:
- geometry collection
-
collect
public static GeometryExpression<?> collect(Expression<? extends org.geolatte.geom.Geometry> expr1, Expression<? extends org.geolatte.geom.Geometry> expr2) Return a specified ST_Geometry value from a collection of other geometries.- Parameters:
expr1
- geometryexpr2
- other geometry- Returns:
- geometry collection
-
translate
public static <T extends org.geolatte.geom.Geometry> GeometryExpression<T> translate(Expression<T> expr, float deltax, float deltay) Translates the geometry to a new location using the numeric parameters as offsets.- Type Parameters:
T
-- Parameters:
expr
- geometrydeltax
- x offsetdeltay
- y offset- Returns:
- geometry
-
translate
public static <T extends org.geolatte.geom.Geometry> GeometryExpression<T> translate(Expression<T> expr, float deltax, float deltay, float deltaz) Translates the geometry to a new location using the numeric parameters as offsets.- Type Parameters:
T
-- Parameters:
expr
- geometrydeltax
- x offsetdeltay
- y offsetdeltaz
- z offset- Returns:
- geometry
-
geometryOperation
public static GeometryExpression<org.geolatte.geom.Geometry> geometryOperation(Operator op, Expression<?>... args) Create a new Geometry operation expression- Parameters:
op
- operatorargs
- arguments- Returns:
- operation expression
-
geometryOperation
public static <T extends org.geolatte.geom.Geometry> GeometryExpression<T> geometryOperation(Class<? extends T> type, Operator op, Expression<?>... args) Create a new Geometry operation expression- Parameters:
op
- operatorargs
- arguments- Returns:
- operation expression
-
lineStringOperation
public static LineStringExpression<org.geolatte.geom.LineString> lineStringOperation(Operator op, Expression<?>... args) Create a new LineString operation expression- Parameters:
op
- operatorargs
- arguments- Returns:
- operation expression
-
pointOperation
public static PointExpression<org.geolatte.geom.Point> pointOperation(Operator op, Expression<?>... args) Create a new Point operation expression- Parameters:
op
- operatorargs
- arguments- Returns:
- operation expression
-
polygonOperation
public static PolygonExpression<org.geolatte.geom.Polygon> polygonOperation(Operator op, Expression<?>... args) Create a new Polygon operation expression- Parameters:
op
- operatorargs
- arguments- Returns:
- operation expression
-
asGeometry
public static <T extends org.geolatte.geom.Geometry> GeometryExpression<T> asGeometry(Expression<T> expr) Create a new GeometryExpression- Parameters:
expr
- Expression of type Geometry- Returns:
- new GeometryExpression
-
asGeometry
Create a new GeometryExpression- Parameters:
value
- Geometry- Returns:
- new GeometryExpression
-