rotate static method

Geometry rotate(
  1. Geometry g,
  2. double angle
)

Rotate a geometry by an angle in radians

Implementation

static Geometry rotate(
    Geometry g,
    // Angle (radians)
    double angle) {
  Coordinate centre = envelopeCentre(g)!;
  AffineTransformation trans =
      AffineTransformation.rotationInstanceTXY(angle, centre.x, centre.y);
  return trans.transformGeom(g);
}