Haskell - 481 405405 387 bytes
import Data.List
s&t=elemIndices s t
l=last
b a=(([id,reverse]<*>[a]>>=).)
c!(x:y:z)=l$(y:c)!(x:z):((!)[].(do{[x:c++z)<$>b xp,q]<-mapM(b y[id,reverse]<*>)[[x],[y]];x&[l q];[[]!(\(x:p)q->[q++p]<*x&[l q]q++p):c++z)]}
c!(x:[])=x[x]=x:[]!c
c!z=z
main=interact(\m->let{g=' '&m;
u=(\\[k|k<-g,length(k&concat vv>>=(k&))==2])<$>[]!v;
v=[[x,y]|x<-g,y<-g,elem(y-x-1)[0,head$'\n'&m]];
}in '|':(u>>=(++"|").init.(>>=(:" ").toEnum.((+)<*>(+65).(*32).(`div`26)).l.(-1:).(&(nub$u>>=init.tail)))))
This gets thecreates a list of spaces that are in the maze (numbered, numbered by index in the string), and uses it to find all the pairs of adjacent spaces. It then stitches the pairs together into longer sequences of points based on matching first/last elements and removes the ones corresponding to corridors, so that each sequence is one room in the 1D maze. A pairing between letters andThe sequences are then translated into a string by replacing points on the interior of these roomsat least one room (the warp points) is createdinto corresponding letters and used to translate the lists of numbersrest into a string, which is the outputspaces.
The 2D maze is read from STDIN and the 1D maze is printed to STDOUT.
Edit: Reduced by 62 bytes rearranging a bunch of stuff and modifying the algorithm a bit, and another 14 by replacing chr
with toEnum
as suggested by Laikoni.
Edit 2: Saved 13 more bytes by simplifying the logic in (!)
, 3 by using the list pattern match sugar, and 2 by using >>=
to concat in u
.