\documentclass[tikz,border=5mm]{standalone}
\usepackage[sfdefault,lining]{FiraSans}
\usepackage{siunitx}
\usetikzlibrary{decorations.markings,decorations.pathmorphing,decorations.pathreplacing,arrows.meta}
%Redefine font size
\renewcommand{\scriptsize}{\fontsize{1.5mm}{2mm}\selectfont}
%Starting angle
\newcommand{\currentangle}{180}
%Save and restore a position and an angle (for switches)
\newcommand{\storeLocation}[2]{coordinate(#1) \pgfextra{\pgfmathsetmacro\switchangle{\currentangle + #2} \expandafter\xdef\csname #1\endcsname{\switchangle}}}
\newcommand{\getLocation}[1]{\pgfextra{\renewcommand{\currentangle}{\csname #1\endcsname}} (#1)}
\newcommand{\getLocationInverted}[1]{\pgfextra{\renewcommand{\currentangle}{\csname #1\endcsname}\pgfmathsetmacro\currentangle{\currentangle + 180}} (#1)}
%Commands to create new track
\newcommand{\newTrack}[3][]{\renewcommand{\currentangle}{#2}\draw[line width=4,postaction=show track segments,#1] #3;}
%Commands to create new curved track
\newcommand{\curveL}[3]{arc (\currentangle-180:\currentangle - 180 + #2:#3) node[midway,sloped,white,font=\scriptsize]{#1} \pgfextra{\pgfmathsetmacro\currentangle{\currentangle + #2}}}
\newcommand{\curveR}[3]{arc (\currentangle:\currentangle - #2:#3) node[midway,sloped,white,font=\scriptsize]{#1} \pgfextra{\pgfmathsetmacro\currentangle{\currentangle - #2}}}
\newcommand{\newcurve}[4]{\expandafter\newcommand\csname #1L\endcsname{\curveL{#2}{#3}{#4}}\expandafter\newcommand\csname #1R\endcsname{\curveR{#2}{#3}{#4}}}
%Define curves for Märklin
\newcurve{s}{24130}{30}{36}
\newcurve{m}{24230}{30}{43.75}
\newcurve{l}{24330}{30}{51.5}
\newcurve{xl}{24430}{30}{57.93}
\newcurve{xxl}{24530}{30}{64.36}
\newcurve{wide}{24912}{12.1}{111.46}
%Commands to create new straight track
\newcommand{\newstraight}[3]{\expandafter\newcommand\csname #1\endcsname{-- ++(\currentangle - 90:#3) node[midway,sloped,white,font=\scriptsize]{#2}}}
%Define straights for Märklin
\newstraight{single}{24180}{18}
\newstraight{double}{24360}{36}
%Define switches
\newcommand{\wideSwitchL}[1]{coordinate(switchstart) arc (\currentangle-180:\currentangle - 180 + 12.1:111.46) \storeLocation{#1}{+12.1} (switchstart) -- ++(\currentangle-90:23.61) node[midway,sloped,white,font=\scriptsize]{24711}}
\newcommand{\wideSwitchR}[1]{coordinate(switchstart) arc (\currentangle:\currentangle - 12.1:111.46) \storeLocation{#1}{-12.1} (switchstart) -- ++(\currentangle-90:23.61) node[midway,sloped,white,font=\scriptsize]{24712}}
%Define special tracks (move to other commands)
\newcommand{\wideAddition}{-- ++(\currentangle - 90:7.08) node[midway,sloped,white,font=\scriptsize]{24071}}
\newcommand{\wideCorrection}{-- ++(\currentangle - 90:22.91) node[midway,sloped,white,font=\scriptsize]{24229}}
\newcommand{\widelength}{-- ++(\currentangle - 90:23.61) node[midway,sloped,white,font=\scriptsize]{24236}}
%Define how tracks should appear
\tikzset{
show track segments/.style={
decoration={
show path construction,
moveto code={},
lineto code={
\draw [{Tee Barb[line width=1pt,inset=0pt,length=0pt,width=12]}-{Tee Barb[line width=1pt,inset=0pt,length=0pt,width=12]}] (\tikzinputsegmentfirst) -- (\tikzinputsegmentlast);
},
curveto code={
\draw [{Tee Barb[line width=1pt,inset=0pt,length=0pt,width=12]}-{Tee Barb[line width=1pt,inset=0pt,length=0pt,width=12]}] (\tikzinputsegmentfirst) .. controls
(\tikzinputsegmentsupporta) and (\tikzinputsegmentsupportb)
..(\tikzinputsegmentlast);
},
closepath code={
\draw [{Tee Barb[line width=1pt,inset=0pt,length=0pt,width=12]}-{Tee Barb[line width=1pt,inset=0pt,length=0pt,width=12]}] (\tikzinputsegmentfirst) -- (\tikzinputsegmentlast);
}
},decorate
},
lok links/.style={anchor=west,inner sep=0pt,outer sep=0pt}
}
%Start drawing the layout
\begin{document}
\begin{tikzpicture}[scale=0.1]
%Measurements
\draw[<->,xshift=-10mm] (0,-330) -- (0,0) node[midway,sloped,above]{\SI{330}{\centi\metre}};
\draw[<->,yshift=10mm] (0,0) -- (330,0) node[midway,sloped,above]{\SI{330}{\centi\metre}};
\draw[<->,xshift=10mm] (337,-30) -- (337,0) node[midway,sloped,below]{$\leq\SI{30}{\centi\metre}$};
\draw[<->,yshift=-10mm] (0,-330) -- (30,-330) node[midway,sloped,below]{$\leq\SI{30}{\centi\metre}$};
%Surface
\fill[lightgray,text=red] (0,-330)node{1} -| ++(30,140)node{2} -- ++(-20,120)node{3} -- ++(40,40)node{4} -| ++(257,-110) -| ++(30,140)node{5} -| cycle;
%Layout
\draw[line width=4,orange,postaction=show track segments] (3,-67.36) \storeLocation{startpunkt}{0} \xxlR \xxlR \xxlR \wideSwitchR{StreckengleisHolzverladung} \double \double \double;
\draw[line width=4,orange,postaction=show track segments] \getLocation{StreckengleisHolzverladung} \single \single \single \wideL \wideSwitchL{gleis2} \wideAddition coordinate(gleis3Zughalt) \wideCorrection \wideAddition \wideCorrection \wideCorrection \wideAddition \widelength \single \storeLocation{prellbock}{180};
\draw[line width=4,orange,postaction=show track segments] \getLocation{prellbock} \single \wideSwitchR{prellbockweiche};
\draw[line width=4,orange,postaction=show track segments] \getLocation{prellbockweiche} \wideAddition \wideL;
\draw[line width=4,orange,postaction=show track segments] \getLocation{gleis2} \wideAddition \wideSwitchR{gleis1} \wideAddition \wideR \wideCorrection \wideAddition \widelength \single;
\draw[line width=4,orange,postaction=show track segments] \getLocation{gleis1} \wideAddition \wideCorrection;
\draw[line width=4,magenta,postaction=show track segments] \getLocationInverted{startpunkt} \wideSwitchL{gleisanschluss} \wideAddition \wideL \double \double \wideR \wideSwitchR{bahnhofgleis2} \wideAddition \wideR \double;
\draw[line width=4,blue,postaction=show track segments] \getLocation{gleisanschluss} \wideAddition \double \double;
\end{tikzpicture}
\end{document}
tikzobject database to be productive. But it is possible if you re willing to write 5000 lines code :) – Martin H May 01 '13 at 23:04