calculate_label_pos#
- zeroheliumkit.src.utils.calculate_label_pos(x: float, y: float, centroid: Point, label_distance: float = 0.5) tuple[source]#
Calculates the position of the label in respect to the centroid of the polygon.
- Parameters:
x (float) – x coordinate of the point.
y (float) – y coordinate of the point.
centroid (Point) – Point object representing the centroid of the polygon.
label_distance (float, optional) – desired distance from the point to the label. Defaults to 0.5.
- Returns:
Calculated (x, y) coordinates for this label.
- Return type:
tuple