If I collapse a (say, closed) set in a length space, I obtain a length space: is there some literature on this?


We consider length spaces as defined by Gromov and others. [However the case of a Riemannian distance already leads to interesting examples of what I am writing]. If $X$ is one such space, it has a distance $d$ which can be recovered by the length of curves. Suppose $X$ is path connected. Let $c:[a,b]\to X$ be a curve, define $|c'(t)|=\lim\_{\epsilon\to0}\sup\_{|u-t|,|v-t|\le\epsilon}\frac{d(c(u),c(v))}{|u-v|}$ and
$$
L(c)=\int\_a^b|c'(t)|dt,
$$
and set 
$$
D(x,y)=\inf\{L(c) \text{ $c$ is a curve having endpoints $x$ and $y$}\}.
$$
We are interested in cases where $d=D$ and where the distance $D=d$ is realized by lengths of geodesics (i.e. the hard work has been already done).


Now, let $E\subseteq X$ be closed and define a distance $D\_X$ on $X\setminus E\cup\{E\}$ ($X$ with $E$ collapsed to a point):
$$
L\_E(c)=\int\_a^b|c'(t)|\chi\_{X\setminus E}(c(t))dt,
$$
and set 
$$
D\_E(x,y)=\inf\{L\_E(c) \text{ $c$ is a curve having endpoints $x$ and $y$}\},
$$
if $x,y\in X\setminus E$, and $D\_E(x,E)=D(x,E)=\inf\_{y\in E}D(x,y)$.


The space $X\setminus E\cup\{E\}$ is clearly a length space w.r.t. the distance $D\_E$.


The reason I find these objects interesting is that, if $E$ is the smooth boundary of an open subset of $X$, a nice Riemannian manifold, then the points of $E$ play the role of the unit vectors in the tangent space of a point; this meaning that they can parametrize those geodesics leaving $E$ which, at least locally, minimize the distance from $E$. Even in the case of the Euclidean plane one obtains interesting pictures.


I would be very surprised if no one had developed this viewpoint in the past.



Quotient metrics in length spaces
If you take $X=\mathbb R$ and $E=[1,2]\cup[3,4]$ you see that $D\_E(0,5) = 3$ while the geodesic distance between $0$ and $5$ in $X\setminus E \cup\{E\}$ is $2$ because you can join $0$ to $E$ with a curve of length $1$ and $E$ to $5$ with a curve of length $1$. I think you need to require $E$ to be geodesic-convex if you want the resulting space to be a length space.


Maybe what you really mean is 
$$
d\_E(x,y) = \min\{d(x,y), d(x,E) + d(y,E)\}.
$$
This is the particular case of a quotient space. It is understood that the quotient space of a length space is a length space if the quotient has good properties (in your case $E$ being closed). See, for example, <https://people.math.ethz.ch/~lang/LengthSpaces.pdf> Proposition 3.2


