Define label positions for JamPolygon using polylabelr::poi()

labelr_JamPolygon(jp, precision = 1, add_to_jp = FALSE, ...)

Arguments

jp

JamPolygon

precision

numeric passed to polylabelr::poi()

add_to_jp

logical indicating whether to add "label_x", "label_y" into the jp@polygons data.frame.

...

additional arguments are ignored.

Value

matrix with columns "x", "y", "dist"

Details

This function is a simple wrapper for polylabelr::poi(), which recognizes holes inside polygons.

Todo:

  • Consider basic support for non-overlapping label positions.

    1. First pass might be to use non-overlapping regions of a polygon among a set of polygons.

    2. Second pass would be to use the region with fewest overlaps among other polygons in the set, to define the label position. This rule could serve to solve (1) as well.