rotateAroundPoint static method
Rotate a geometry around a point by an angle in radians
Implementation
static Geometry rotateAroundPoint(
Geometry g,
Geometry? pt,
/// Angle (radians)
double angle) {
Coordinate loc;
if (pt == null) {
loc = new Coordinate(0, 0);
} else {
loc = pt.getCoordinates()[0];
}
AffineTransformation trans =
AffineTransformation.rotationInstanceTXY(angle, loc.x, loc.y);
return trans.transformGeom(g);
}