public final Geometry innermostPoint(double tolerance) throws GeometryException {
    if (canBePolygon()) {
      // cache as long as the tolerance hasn't changed
      if (tolerance != innermostPointTolerance || innermostPoint == null) {
        innermostPoint = MaximumInscribedCircle.getCenter(polygon(), Math.sqrt(area()) * tolerance);
        innermostPointTolerance = tolerance;
      }
      return innermostPoint;
    } else if (canBeLine()) {
      return lineMidpoint();
    } else {
      return pointOnSurface();
    }
  }
Returns {@link MaximumInscribedCircle#getCenter()} of this geometry in world web mercator coordinates.

@param tolerance precision for calculating maximum inscribed circle. 0.01 means 1% of the square root of the area.
                 Smaller values for a more precise tolerance become very expensive to compute. Values between
                 0.05-0.1 are a good compromise of performance vs. precision.
planetiler-core/src/main/java/com/onthegomap/planetiler/geo/WithGeometry.java