translateCentreToOrigin static method

Geometry translateCentreToOrigin(
  1. Geometry g
)

Implementation

static Geometry translateCentreToOrigin(Geometry g) {
  Coordinate centre = envelopeCentre(g)!;
  AffineTransformation trans =
      AffineTransformation.translationInstance(-centre.x, -centre.y);
  return trans.transformGeom(g);
}