# Adding automatic labelling of boundaries to region plot

Is it possible to automatically label boundaries of a RegionPlot in a similar style to PlotLabels by the equality that describes them. Ideally even splitting any Or statement to the relevant part that holds at that boundary. So that for example in the plot below

RegionPlot[{x > y || x^2 + y^2 < 1, y > 2 x || x^2 + y^2 < 2}, {x, -2,
2}, {y, -2, 2}]


The straight lines have labels "x = y" and "y = 2 x" and the round parts "x^2 + y^2 = 1" and "x^2 + y^2 = 2".

1. Manually adjust the positions and offsets in Arrowheads and Text to place the labels on the boundary curves:

RegionPlot[{x > y || x^2 + y^2 < 1, y > 2 x || x^2 + y^2 < 2}, {x, -2, 2}, {y, -2, 2},
BoundaryStyle ->
Graphics[{Text[Style[ToString[x^2 + y^2 == 2, TraditionalForm], Black,  16],
{0, 0}, {0, -2}, {-1, 0}]}]},
{Automatic, .53,
Graphics[{Text[Style[ToString[y == 2 x, TraditionalForm], Black, 16],
{.5, 0}, {0, 1}, {-1, 0}]}]}}],
Graphics[{Text[Style[ToString[x^2 + y^2 == 1, TraditionalForm], Black,  16],
{0, 0}, {0, 2}, {1, 0}]}]},
{Automatic, .1,
Graphics[{Text[Style[ToString[y == x, TraditionalForm], Black, 16],
{.5, 0}, {0, 1}, {1, 0}]}]}}]}] /. Line -> Arrow


2. Use ListPlot with Callouts and Show with RegionPlot output:

labels = Style[#, 16]& /@ TraditionalForm /@
{y == x, x^2 + y^2 == 1, y == 2 x, x^2 + y^2 == 2};

points = {{-1.5, -1.3}, {-1.25, .2}, {.5, 1.3}, {1.1, -1.25}};

angles = {45, 60, 60, 60};

rp =  RegionPlot[{x > y || x^2 + y^2 < 1,  y > 2 x || x^2 + y^2 < 2},
{x, -2, 2}, {y, -2, 2}];


3. Interactively position the labels using LocatorPane:
DynamicModule[{pts = points}, LocatorPane[Dynamic[pts], rp, Appearance -> labels]]