
\documentclass[tikz]{standalone}

\usepackage{tikz}
\usepackage{fontspec}
\usepackage{contour}

\setmainfont{Atkinson Hyperlegible}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{calc}
\usetikzlibrary{positioning}
\usetikzlibrary{arrows.meta}

\definecolor{one}{RGB}{228,11,28}
\definecolor{two}{RGB}{90,150,43}
\definecolor{three}{RGB}{242,171,0}
\definecolor{four}{RGB}{0,55,121}
\definecolor{five}{RGB}{164,150,203}

\input{../shapes.tex}

\pgfdeclarelayer{bg}
\pgfdeclarelayer{lines}
\pgfdeclarelayer{stops}
\pgfdeclarelayer{labels}
\pgfdeclarelayer{legend}
\pgfsetlayers{bg,lines,stops,labels,main,legend}

\contourlength{.2ex}

\begin{document}

\begin{tikzpicture}[
    river/.style = {
      line width=0.5cm,
      cyan!50,
      rounded corners=0.5cm,
      -{Triangle Cap},
    },
    railway line/.style = {
      color=gray,
      line width=0.075cm,
      rounded corners=0.5cm,
    },
    railway/.style = {
      railway line,
      {Latex[length=5mm]}-{Latex[length=5mm]},
    },
    stop/.style = {
      rounded corners=0.1cm, 
      line width=0.05cm,
      fill=white, 
      draw,
      shape=stop,
      anchor=center,
      minimum height=0.2cm,
    },
    stop1/.style = {
      stop,
      minimum width=0.2cm, 
    },
    stop2/.style = {
      stop,
      minimum width=0.4cm, 
    },
    stop3/.style = {
      stop,
      minimum width=0.6cm, 
    },
    stop4/.style = {
      stop,
      minimum width=0.8cm, 
    },
    line/.style = {
      line width=0.15cm,
      rounded corners=0.1cm,
    },
    label/.style = {
      font=\scriptsize,
    },
    line name/.style = {
      label, 
      color=white, 
      minimum width=1em, 
      minimum height=1em, 
      inner sep=0pt,
    },
  ]

  \begin{pgfonlayer}{stops}

    % all of line 1
    \node[stop1] (Sesto I Maggio) at (1,2) {};
    \node[stop1, below=0.7cm of Sesto I Maggio] (Sesto Rondò) {};
    \node[stop1, below=0.7cm of Sesto Rondò] (Sesto Marelli) {};
    \node[stop1, below=0.7cm of Sesto Marelli] (Villa San Giovanni) {};
    \node[stop1, below=0.7cm of Villa San Giovanni] (Precotto) {};
    \node[stop1, below=0.7cm of Precotto] (Gorla)  {};
    \node[stop1, below=0.7cm of Gorla] (Turro)  {};
    \node[stop1, below=0.7cm of Turro] (Rovereto)  {};
    \node[stop1, below=0.7cm of Rovereto] (Pasteur) {};
    \node[stop1, below=0.7cm of Pasteur] (Loreto)  {};
    \node[stop1, below=0.7cm of Loreto] (Lima)  {};
    \node[stop1] (Porta Venezia) at ($(Lima)-(0.5,0.5)$) {};
    \node[stop1] (Palestro) at ($(Porta Venezia)-(0.5,0.5)$) {};
    \node[stop2, rotate=-45, anchor=one half] (San Babila) at ($(Palestro)-(0.5,0.5)$) {};
    \node[stop1] (Duomo) at ($(San Babila) - (1,0)$) {};
    \node[stop1, left=0.7cm of Duomo] (Cordusio) {};
    \node[stop1, left=0.7cm of Cordusio] (Cairoli) {};
    \node[stop1, left=0.7cm of Cairoli] (Cadorna FN) {};
    \node[stop1, left=0.7cm of Cadorna FN] (Conciliazione) {};
    \node[stop1, left=0.7cm of Conciliazione] (Pagano) {};

    % upper branch
    \node[stop1] (Buonarotti) at ($(Pagano) - (1,-.5)$) {};
    \node[stop1] (Amendola) at ($(Buonarotti) - (.5,-.5)$) {};
    \node[stop1] (Lotto) at ($(Amendola) - (.5,-.5)$) {};
    \node[stop1] (QT8) at ($(Lotto) - (.5,-.5)$) {};
    \node[stop1] (Lampugnano) at ($(QT8) - (.5,-.5)$) {};
    \node[stop1] (Uruguay) at ($(Lampugnano) - (.5,-.5)$) {};
    \node[stop1] (Bonola) at ($(Uruguay) - (.5,-.5)$) {};
    \node[stop1] (San Leonardo) at ($(Bonola) - (.5,-.5)$) {};
    \node[stop1] (Molino Dorino) at ($(San Leonardo) - (.5,-.5)$) {};
    \node[stop1] (Pero) at ($(Molino Dorino) - (.5,-.5)$) {};
    \node[stop1] (Rho Fiera) at ($(Pero) - (.5,-.5)$) {};

    % lower branch
    \node[stop1] (Wagner) at ($(Pagano) - (1,.5)$) {};
    \node[stop1] (De Angeli) at ($(Wagner) - (.5,.5)$) {};
    \node[stop1] (Gambara) at ($(De Angeli) - (.5,.5)$) {};
    \node[stop1] (Bande Nere) at ($(Gambara) - (.5,.5)$) {};
    \node[stop1] (Primaticcio) at ($(Bande Nere) - (.5,.5)$) {};
    \node[stop1] (Inganni) at ($(Primaticcio) - (.5,.5)$) {};
    \node[stop1] (Bisceglie) at ($(Inganni) - (.5,.5)$) {};


    % line two above cadorna
    \node[stop1] (Lanza) at ($(Cadorna FN) + (0,1)$) {};
    \node[stop1] (Moscova) at ($(Lanza) + (0.7,0.7)$) {};
    \node[stop2, rotate=-45, anchor=two half] (Garibaldi FS) at ($(Moscova) + (0.7,0.7)$) {};
    % line two left of loreto
    \node[stop1] (Caiazzo) at ($(Loreto) + (-.9,0)$) {};
    \node[stop1] (Centrale) at ($(Caiazzo) + (-.9,0)$) {};
    \node[stop1] (Gioia) at ($(Centrale) + (-.9,0)$) {};

    % line two right of loreto
    \node[stop1, right=0.7cm of Loreto] (Piola) {};
    \node[stop1, right=0.7cm of Piola] (Lambrate FS) {};
    \node[stop1] (Udine) at ($(Lambrate FS) + (1,.7)$) {};
    \node[stop1] (Cimiano) at ($(Udine) + (.7,.7)$) {};
    \node[stop1] (Crescenzago) at ($(Cimiano) + (.7,.7)$) {};
    \node[stop1] (Cascina Gobba) at ($(Crescenzago) + (.7,.7)$) {};
    \node[stop1] (Cologno Sud) at ($(Cascina Gobba) + (1.4,1.4)$) {};
    \node[stop1] (Cologno Centro) at ($(Cologno Sud) + (.7,.7)$) {};
    \node[stop1] (Cologno Nord) at ($(Cologno Centro) + (.7,.7)$) {};

    % line two, right branch
    \node[stop1] (Vimodrone) at ($(Cascina Gobba) + (1.2,.4)$) {};
    \node[stop1, right=0.7cm of Vimodrone] (Cascina Burrona) {};
    \node[stop1, right=0.7cm of Cascina Burrona] (Cernusco sul Naviglio) {};
    \node[stop1, right=0.7cm of Cernusco sul Naviglio] (Villa Fiorita) {};
    \node[stop1, right=0.7cm of Villa Fiorita] (Cassina de' Pecchi) {};
    \node[stop1, right=0.7cm of Cassina de' Pecchi] (Bussero) {};
    \node[stop1, right=0.7cm of Bussero] (Villa Pompea) {};
    \node[stop1, right=0.7cm of Villa Pompea] (Gorgonzola) {};
    \node[stop1, right=0.7cm of Gorgonzola] (Cascina Antonietta) {};
    \node[stop1, right=0.7cm of Cascina Antonietta] (Gessate) {};

    \node[stop1] (Tricolore) at ($(San Babila) + (1,0)$) {};
    \node[stop1, right=0.7cm of Tricolore] (Dateo) {};
    \node[stop1, right=0.7cm of Dateo] (Susa) {};
    \node[stop1, right=0.7cm of Susa] (Argonne) {};
    \node[stop1, right=0.7cm of Argonne] (Stazione Forlanini) {};
    \node[stop1, right=0.7cm of Stazione Forlanini] (Repetti) {};
    \node[stop1, right=0.7cm of Repetti] (Lineate Aeroporto) {};
  \end{pgfonlayer}


  \begin{pgfonlayer}{lines}
    \pgfmathsetmacro{\offset}{0.1*tan(45/2)}

    \draw[line, one]
    (Sesto I Maggio)
    -- (Sesto Rondò)
    -- (Sesto Marelli)
    -- (Villa San Giovanni)
    -- (Precotto)
    -- (Gorla)
    -- (Turro)
    -- (Rovereto)
    -- (Pasteur)
    -- (Loreto)
    -- (Lima)
    -- (Porta Venezia)
    -- (Palestro)
    -- (San Babila.one half)
    |- (Duomo)
    -- (Cordusio)
    -- (Cairoli)
    -- (Cadorna FN)
    -- (Conciliazione)
    -- (Pagano)
    -- ++(-.5,0)
    -- (Buonarotti)
    -- (Amendola)
    -- (Lotto)
    -- (QT8)
    -- (Lampugnano)
    -- (Uruguay)
    -- (Bonola)
    -- (San Leonardo)
    -- (Molino Dorino)
    -- (Pero)
    -- (Rho Fiera)
    ;

    \draw[line, one]
    (Pagano)
    -- ++(-.5,0)
    -- (Wagner)
    -- (De Angeli)
    -- (Gambara)
    -- (Bande Nere)
    -- (Primaticcio)
    -- (Inganni)
    -- (Bisceglie)
    ;

    \draw[line, two]
    (Cadorna FN)
    -- (Lanza)
    -- (Moscova)
    -- (Garibaldi FS.two half)
    -- (Gioia)
    -- (Centrale)
    -- (Caiazzo)
    -- (Loreto)
    -- (Piola)
    -- (Lambrate FS)
    -- ++(0.3,0)
    -- (Udine)
    -- (Cimiano)
    -- (Crescenzago)
    -- (Cascina Gobba)
    -- (Cologno Sud)
    -- (Cologno Centro)
    -- (Cologno Nord)
    ;

    \draw[line, two]
    (Cascina Gobba)
    -- ++(.4,.4)
    -- (Vimodrone)
    -- (Cascina Burrona)
    -- (Cernusco sul Naviglio)
    -- (Villa Fiorita)
    -- (Cassina de' Pecchi)
    -- (Bussero)
    -- (Villa Pompea)
    -- (Gorgonzola)
    -- (Cascina Antonietta)
    -- (Gessate)
    ;


    \draw[line, four]
    (San Babila.two half)
    -- ++(0.1,0.1)
    -- (Tricolore)
    -- (Dateo)
    -- (Susa)
    -- (Argonne)
    -- (Stazione Forlanini)
    -- (Repetti)
    -- (Lineate Aeroporto)
    ;
  \end{pgfonlayer}

  %%   \draw[line, one]
  %%   (Laßbergstr)
  %%     -- (Römerhof)
  %%     -- (Hasemannstr)
  %%     -- (Emil-Gött-Str)
  %%     -- (Musikhochschule)
  %%     -- (Alter Messplatz)
  %%     -- (Maria-Hilf-Kirche)
  %%     -- (Brauerei Ganter)
  %%     -- (Schwabentorbrücke)
  %%     -- (Schwabentorbrücke.west)
  %%     -- (Oberlinden.east)
  %%     -- (Oberlinden)
  %%     -- (Bertoldsbrunnen.two quarter)
  %%     -- (Stadttheater.two quarter)
  %%     -- (Hauptbahnhof.two quarter)
  %%     -- (Eschholzstrasse.two quarter)
  %%     -- (Rathaus.two quarter)
  %%     -- (Runzmattenweg.two half)
  %%     -- (Am Bischofskreuz)
  %%     -- (Betzenhauser Torplatz)
  %%     -| (Paduaallee)
  %%     -- (Moosgrund)
  %%     -- (Moosgrund.north two half)
  %%     -- (Diakoniekrankenhaus)
  %%     -- (Moosweiher)
  %%   ;
  %% \begin{pgfonlayer}{lines}
  %%   \pgfmathparse{0.1*tan(45/2)}
  %%   \let\offset\pgfmathresult

  %%   \draw[railway] ($(Gundelfinger Str)+(3.9,-1)$)
  %%     node[label, left, anchor=south west] {Karlsruhe}
  %%     -- ($(Hauptbahnhof)+(0,1.7)$)
  %%     -- ($(Hauptbahnhof)$)
  %%     -- ++(0, -1)
  %%     -- ($(Pressehaus)+(0.5,0)$)
  %%     -- ++(0,-5)
  %%     node[label, right, anchor=south west] {Basel};

  %%   \draw[railway] ($(Moosweiher)-(1,0)$)
  %%     node[label, right, anchor=south east] {Breisach}
  %%     -- ($(Moosweiher)$)
  %%     -| ($(Hauptbahnhof)$)
  %%     -- ++(0, -1)
  %%     -- ($(Pressehaus)+(0.5,0)$)
  %%     -- ++(0, -2.3)
  %%     -- ++(3.3, 0)
  %%     -- ++(3,3)
  %%     -- ++(3,0)
  %%     node[label, left, anchor=south east] {Villingen-Schwenningen}
  %%   ;


  %%   \draw[line, one]
  %%   (Laßbergstr)
  %%     -- (Römerhof)
  %%     -- (Hasemannstr)
  %%     -- (Emil-Gött-Str)
  %%     -- (Musikhochschule)
  %%     -- (Alter Messplatz)
  %%     -- (Maria-Hilf-Kirche)
  %%     -- (Brauerei Ganter)
  %%     -- (Schwabentorbrücke)
  %%     -- (Schwabentorbrücke.west)
  %%     -- (Oberlinden.east)
  %%     -- (Oberlinden)
  %%     -- (Bertoldsbrunnen.two quarter)
  %%     -- (Stadttheater.two quarter)
  %%     -- (Hauptbahnhof.two quarter)
  %%     -- (Eschholzstrasse.two quarter)
  %%     -- (Rathaus.two quarter)
  %%     -- (Runzmattenweg.two half)
  %%     -- (Am Bischofskreuz)
  %%     -- (Betzenhauser Torplatz)
  %%     -| (Paduaallee)
  %%     -- (Moosgrund)
  %%     -- (Moosgrund.north two half)
  %%     -- (Diakoniekrankenhaus)
  %%     -- (Moosweiher)
  %%   ;

  %%   \draw[line, two]
  %%     (Günterstal Dorfstr)
  %%     -- (Klosterplatz)
  %%     -- (Wiesenweg)
  %%     -- (Wonnhalde.south two half)
  %%     -- (Wonnhalde)
  %%     -- (Holbeinstr)
  %%     -- (Lorettostr)
  %%     -- (Johanneskirche.two half)
  %%     -- (Holzmarkt.two half)
  %%     {[rounded corners=0.15cm]
  %%       |- (Bertoldsbrunnen.three quarter)
  %%     }
  %%     -- (Stadttheater.three quarter)
  %%     -- (Hauptbahnhof.three quarter)
  %%     -- (Eschholzstrasse.three quarter)
  %%     -- (Rathaus.three quarter)
  %%     -| (Robert-Koch-Str.two half)
  %%     |- (Friedrich-Ebert-Platz)
  %%     -- (Friedrich-Ebert-Platz.two quarter)
  %%     -- ($(Hauptfriedhof)-(0.675,0.675)$)
  %%     -- (Hauptfriedhof)
  %%     -- (Zollhallenplatz)
  %%     -- (Eugen-Martin-Str)
  %%     -- (Hornusstr.south one half)
  %%     -- (Hornusstr.one half)
  %%   ;

  %%   \draw[line, three]
  %%     (Innsbrucker Str)
  %%     -- (Vauban Mitte)
  %%     -- (Paula-Modersohn-Platz)
  %%     -| (Peter-Thumb-Str)
  %%     -- (Weddingenstr)
  %%     |- (Heinrich-von-Stephan-Str.one half)
  %%     -| (Johanneskirche.one half)
  %%     -- (Holzmarkt.one half)
  %%     |- (Bertoldsbrunnen.one half)
  %%     -- (Stadttheater.one half)
  %%     -- (Hauptbahnhof.one half)
  %%     -- (Eschholzstrasse.one half)
  %%     -- (Rathaus.one half)
  %%     -- (Runzmattenweg.one half)
  %%     -- (Runzmattenweg.north one half)
  %%     -- (Bissier Str)
  %%     -- (Rohrgraben)
  %%     -- (Bugginger Str)
  %%     -- ++(-0.45,-0.45)
  %%     -- (Am Lindenwäldle.two half)
  %%     -| (VAG-Zentrum)
  %%     -- (Munzinger Str)
  %%   ;

  %%   \draw[line, four]
  %%     (Gundelfinger Str)
  %%     -- (Glottertalstr)
  %%     -- (Berggasse)
  %%     -- (Reutebachgasse)
  %%     -- (Tullastr)
  %%     -- (Hornusstr.two half)
  %%     -- (Okenstr)
  %%     -- (Hauptstr)
  %%     -- (Tennenbacher Str)
  %%     -- (Europaplatz.two half)
  %%     -- (Bertoldsbrunnen.south two half)
  %%     -- (Bertoldsbrunnen.two half)
  %%     -- (Stadttheater.two half)
  %%     -- (Hauptbahnhof.two half)
  %%     -- (Eschholzstrasse.two half)
  %%     -- (Rathaus.two half)
  %%     -| (Robert-Koch-Str.one half)
  %%     |- (Killianstr)
  %%     -- (Berliner Allee)
  %%     -| (Elsässer Str)
  %%     -- (Technische Fakultät)
  %%     -- (Technische Fakultät.north two half)
  %%     -- (Europa-Park-Stadium)
  %%     -- (Messe)
  %%   ;

  %%   \draw[line, five]
  %%     (Europaplatz)
  %%     -| (Stadttheater)
  %%     -- (Erbprinzenstr)
  %%     -- (Erbprinzenstr.south two half)
  %%     -- (Mattenstr)
  %%     -- ($(Mattenstr)-(0.6,0.6)$)
  %%     -- (Heinrich-von-Stephan-Str.two half)
  %%     -- (Pressehaus)
  %%     -- (Haslach Bad)
  %%     -- (Scherrerplatz)
  %%     -- (Dorfbrunnen)
  %%     -- (Krozinger Str)
  %%     -- (Am Lindenwäldle.one half)
  %%     -- (Geschwister-Scholl-Platz)
  %%     -- (Maria-von-Rudloff-Platz)
  %%     -- (Bollerstaudenstr)
  %%   ;

  %% \end{pgfonlayer}

  %% \begin{pgfonlayer}{labels}
  %%   \node[font=\scriptsize, color=white] at (4.0,1.5){Neckar};
  %%   \node[font=\scriptsize, color=white, rotate=-45] at (-3.5,3.5) {Neckar};
  %%   \foreach\stop/\placement/\anchor/\rotate in {
  %%     Hauptbahnhof/left/north east/45,
  %%     Eschholzstrasse/left/north east/45,
  %%     Rathaus/right/west/45,
  %%     Stadttheater/below right/south west/45,
  %%     Bertoldsbrunnen/right/north west/45,
  %%     Robert-Koch-Str/below right/west/0,
  %%     Killianstr/above/west/45,
  %%     Berliner Allee/above/west/45,
  %%     Elsässer Str/left/east/0,
  %%     Technische Fakultät/right/south west/0,
  %%     Europa-Park-Stadium/right/west/0,
  %%     Messe/right/west/0,
  %%     Europaplatz/right/west/0,
  %%     Gundelfinger Str/right/west/0,
  %%     Glottertalstr/right/west/0,
  %%     Berggasse/right/west/0,
  %%     Reutebachgasse/right/west/0,
  %%     Tullastr/right/west/0,
  %%     Hornusstr/right/west/0,
  %%     Okenstr/right/west/0,
  %%     Hauptstr/right/west/0,
  %%     Tennenbacher Str/right/west/0,
  %%     Fahnenbergplatz/below left/north east/0,
  %%     Friedrich-Ebert-Platz/above/south/0,
  %%     Eugen-Martin-Str/left/east/0,
  %%     Zollhallenplatz/left/east/0,
  %%     Hauptfriedhof/left/east/0,
  %%     Holzmarkt/right/west/0,
  %%     Johanneskirche/right/west/0,
  %%     Lorettostr/right/west/0,
  %%     Holbeinstr/right/west/0,
  %%     Wonnhalde/right/west/0,
  %%     Wiesenweg/right/west/0,
  %%     Klosterplatz/right/west/0,
  %%     Günterstal Dorfstr/right/west/0,
  %%     Erbprinzenstr/left/east/45,
  %%     Mattenstr/right/west/0,
  %%     Reiterstr/below left/east/45,
  %%     Heinrich-von-Stephan-Str/below left/east/45,
  %%     Pressehaus/below left/east/45,
  %%     Haslach Bad/below left/east/45,
  %%     Scherrerplatz/below left/east/45,
  %%     Dorfbrunnen/below left/east/45,
  %%     Krozinger Str/below left/east/45,
  %%     Am Lindenwäldle/below left/east/45,
  %%     Bissier Str/right/west/0,
  %%     Rohrgraben/left/east/0,
  %%     Bugginger Str/right/west/0,
  %%     Runzmattenweg/right/east/-45,
  %%     Geschwister-Scholl-Platz/above left/west/45,
  %%     Maria-von-Rudloff-Platz/above left/west/45,
  %%     Bollerstaudenstr/above left/west/45,
  %%     VAG-Zentrum/right/west/0,
  %%     Munzinger Str/right/west/0,
  %%     Weddingenstr/right/west/0,
  %%     Peter-Thumb-Str/right/west/0,
  %%     Paula-Modersohn-Platz/below left/east/45,
  %%     Vauban Mitte/below left/east/45,
  %%     Innsbrucker Str/below left/east/45,
  %%     Am Bischofskreuz/above/south/0,
  %%     Betzenhauser Torplatz/above left/west/45,
  %%     Paduaallee/left/east/0,
  %%     Moosgrund/left/east/0,
  %%     Diakoniekrankenhaus/right/west/0,
  %%     Moosweiher/above right/south west/0,
  %%     Oberlinden/above/west/45,
  %%     Schwabentorbrücke/above/west/45,
  %%     Brauerei Ganter/above/west/45,
  %%     Maria-Hilf-Kirche/above/west/45,
  %%     Alter Messplatz/above/west/45,
  %%     Musikhochschule/above/west/45,
  %%     Emil-Gött-Str/above/west/45,
  %%     Hasemannstr/above/west/45,
  %%     Römerhof/above/west/45,
  %%     Laßbergstr/above/west/45%
  %%   } \node[label, \placement=0.05cm of \stop, rotate=\rotate, anchor=\anchor] {\contour{white}{\stop}};
  %%   \node[line name, fill=four, left=0.2cm of Messe] {\bf 4};
  %%   \node[line name, fill=four, above=0.2cm of Gundelfinger Str] {\bf 4};
  %%   \node[line name, fill=two, left=0.2cm of Hornusstr] {\bf 2};
  %%   \node[line name, fill=two, below=0.2cm of Günterstal Dorfstr] {\bf 2};
  %%   \node[line name, fill=five] at ($(Europaplatz)+(0.5,0.4)$) {\bf 5};
  %%   \node[line name, fill=five, left=0.2cm of Bollerstaudenstr] {\bf 5};
  %%   \node[line name, fill=three, left=0.2cm of Munzinger Str] {\bf 3};
  %%   \node[line name, fill=three, above=0.2cm of Innsbrucker Str] {\bf 3};
  %%   \node[line name, fill=one, above=0.2cm of Moosweiher] {\bf 1};
  %%   \node[line name, fill=one, below=0.2cm of Laßbergstr] {\bf 1};
  %% \end{pgfonlayer}

\end{tikzpicture}

\end{document}
% vim: nospell conceallevel=0
