Class ST_Rotate
java.lang.Object
org.h2gis.api.AbstractFunction
org.h2gis.api.DeterministicScalarFunction
org.h2gis.functions.spatial.affine_transformations.ST_Rotate
- All Implemented Interfaces:
org.h2gis.api.Function,org.h2gis.api.ScalarFunction
public class ST_Rotate
extends org.h2gis.api.DeterministicScalarFunction
ST_Rotate rotates a geometry by a given angle (in radians) about the
geometry's center.
- Author:
- Adam Gouge
-
Field Summary
Fields inherited from interface org.h2gis.api.Function
PROP_NAME, PROP_REMARKSFields inherited from interface org.h2gis.api.ScalarFunction
PROP_DETERMINISTIC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.locationtech.jts.geom.Geometryrotate(org.locationtech.jts.geom.Geometry geom, double theta) Rotates a geometry by a given angle (in radians) about the center of the geometry's envelope.static org.locationtech.jts.geom.Geometryrotate(org.locationtech.jts.geom.Geometry geom, double theta, double x0, double y0) Rotates a geometry by a given angle (in radians) about the specified point at (x0, y0).static org.locationtech.jts.geom.Geometryrotate(org.locationtech.jts.geom.Geometry geom, double theta, org.locationtech.jts.geom.Point point) Rotates a geometry by a given angle (in radians) about the specified point.Methods inherited from class org.h2gis.api.AbstractFunction
addProperty, getProperty, removePropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.h2gis.api.Function
getProperty
-
Constructor Details
-
ST_Rotate
public ST_Rotate()
-
-
Method Details
-
getJavaStaticMethod
-
rotate
public static org.locationtech.jts.geom.Geometry rotate(org.locationtech.jts.geom.Geometry geom, double theta) Rotates a geometry by a given angle (in radians) about the center of the geometry's envelope.- Parameters:
geom- Geometrytheta- Angle- Returns:
- The geometry rotated about the center of its envelope
-
rotate
public static org.locationtech.jts.geom.Geometry rotate(org.locationtech.jts.geom.Geometry geom, double theta, org.locationtech.jts.geom.Point point) Rotates a geometry by a given angle (in radians) about the specified point.- Parameters:
geom- Geometrytheta- Anglepoint- The point about which to rotate- Returns:
- The geometry rotated by theta about the given point
-
rotate
public static org.locationtech.jts.geom.Geometry rotate(org.locationtech.jts.geom.Geometry geom, double theta, double x0, double y0) Rotates a geometry by a given angle (in radians) about the specified point at (x0, y0).- Parameters:
geom- Geometrytheta- Anglex0- x-coordinate of point about which to rotatey0- y-coordinate of point about which to rotate- Returns:
- The geometry rotated by theta about (x0, y0)
-