A connectivity-preserving function from a connected set onto an interval Let $C$ be a connected set in the plane and $I$ the unit interval. Call a function $f$ from $C$ onto $I$ Connectivity-preserving if the following is true for every subset $I'\subseteq I$:

*

*If $I'$ has zero length then $f^{-1}(I')$ has zero area.

*If $I'$ is connected (i.e. an interval) then $f^{-1}(I')$ is connected.

In what cases does a connectivity-preserving function exists?
If $C$ is convex, then a connectivity-preserving function always exists: just position $C$ above $I$ and project each point of $C$ to the point of $I$ just below it:

(this function is even convexity-preserving).
But if $C$ is not convex, the simple vertical projection is not connectivity-preserving:

Is there another way to find a connectivity-preserving function when $C$ is simply-connected? path-connected? connected?
 A: (Incomplete answer, I may get back when I understand these sets better)
Connectedness is a necessary condition because we can take $I'=I.$ I will enumerate a few sufficient conditions but I have not been able to unify them. Let us call the property $P,$ so $P(C)$ is an abbreviation for the existence of a connectivity-preserving map $f$ from $C\subset\mathbb R^2$ to $I.$
Open and star-shaped is sufficient: if $c\in C$ and all the lines $\{[cx]|x\in C\}$ are contained in $C$ then the map
$$f:C\to I:x\mapsto\frac1\pi\arg(x-c)$$
is connectivity-preserving ($c$ itself can be mapped to any argument because $C$ contains an open disk around $c$).
More generally any simply connected open proper subset of the plane is conformally equivalent to an open disk (by the Riemann mapping theorem). The conformal equivalence (known as "Riemann mapping") maps positive areas to positive areas and preserves connectedness of subsets (being a homeomorphism), and therefore preserves property $P.$
The whole plane has property $P,$ as well.
$P(\emptyset).$ More generally any connected set of zero area has property $P:$ use the constant map to a single point of $I.$
An open disk with the centre removed has property $P:$ the distance from the centre is connectivity-preserving. Thus simple connectedness is not a necessary condition. Any open subset of the plane that is conformally equivalent to an open disk with the centre removed also has property $P.$
If $P(C)$ and there exists a homeomorphism $C\to D$ that preserves thinness of subsets (i.e., having zero area) then $P(D).$ Conformal equivalences are examples of such homeomorphisms.
Let $C$ be an open disk with a finite number of points $\{x_1,\ldots,x_n\}$ removed. We shall construct a projection $f$ as follows. Draw a finite number of line segments inside $C$ that make up a tree structure $T$ (no loops) and that connect the missing points with the boundary of $C.$ The tree structure must be connected inside $C,$ i.e., the missing points are end nodes of the tree.
Then $T$ is a closed connected subset of $C$ having zero area and such that its complement $T\setminus C$ is an open simply connected subset of the plane. Take a projection $g$ on the complement with the particular property that it has limit $1$ near the boundary. Extend $g:T\setminus C\to I$ to $f:C\to I$ by assigning the constant $1$ to all points of $T.$ The extended mapping $f$ is a projection of $C$ because it agrees with the original $g$ almost everywhere and because the inverse of any nontrivial interval $I'$ containing $1$ also contains connected subsets of $C\setminus T$ arbitrarily close to the closed set $T.$
Now for a class of counterexamples.
If there exists a point $c\in C$ such that $C-\{c\}$ has at least $3$ connected components with nonzero area, then $P(C)$ is false. To see this consider a hypothetical connectivity-preserving map $f,$ set $r=f(c)$ and observe that each of the $3$ components has at least one point that is mapped to a value different from $r.$ This implies that the inverse image of $[0,r)$ or the inverse image of $(r,1]$ is disconnected.
More generally $P(C)$ is false if there are a finite number of points $\{c_1,\ldots,c_n\}$ such that $C-\{c_1,\ldots,c_n\}$ has at least $n+2$ components of nonzero area. Think of certain planar graph representations where the vertices are points and the edges are disjoint nonsingular curves between them, and then blow up some of the vertex points to become little balls.
