<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Forum Bauen und Umwelt - Bedeutung deutscher KFZ-Kennzeichen (volkstümliche Interpretation)</title>
<link>https://bauforum.wirklichewelt.de/</link>
<description>Das Bauforum</description>
<language>de</language>
<item>
<title>Bedeutung deutscher KFZ-Kennzeichen (volkstümliche Interpretation) (Antwort)</title>
<content:encoded><![CDATA[<p>Man kann mit den Geodaten zwar auch sinnvolle Dinge anstellen, aber ich hatte letztlich eine Webseite mit volkstümlichen Interpretationen von KFZ-Kennzeichen gesehen und wollte den Quatsch unbedingt mal in Python umsetzen. </p>
<p><img src="https://bauforum.wirklichewelt.de/images/uploaded/201803171256415aad1089b6dd9.png" alt="[image]"  /></p>
<p>Falls jemand mit dem Programm oder den Daten herumspielen möchte, hier sind sie: <a href="images/uploaded/ZIP-Archiv_HXTZ0CEY1.zip" target="_blank"><img src="img/zip.png" alt="[image]"  />ZIP-Archiv</a><br />
Das Programm benötigt wegen der verwendeten <a href="https://docs.python.org/3/whatsnew/3.6.html#whatsnew36-pep498" target="_blank">f-Strings</a> mindestens die Python-Version 3.6.</p>
<pre class="python" style="font-family:monospace;"><ol><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#!/usr/bin/env python3</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">import</span> json</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">import</span> <span style="color: #dc143c;">csv</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">from</span> tkinter <span style="color: #ff7700;">import</span> Tk<span style="color: #000;">,</span> Canvas<span style="color: #000;">,</span> Text</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">from</span> <span style="color: #dc143c;">random</span> <span style="color: #ff7700;">import</span> randint</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Deutschlandkarte mit Anzeige der KFZ-Kennzeichen aller Kreise, Landkreise,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># kreisfreien Städte und Kreisstädte sowie der angeblichen Volksmund-</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Interpretationen dieser Kennzeichen.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Info: https://bauforum.wirklichewelt.de/index.php?nr=11591</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">def</span> Zufallsfarben<span style="color: black;">&#40;</span>Grundton<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Erzeugt zufällige Farben im Grundton des Bundeslandes.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    a<span style="color: #000;">,</span> b <span style="color: #000;">=</span> <span style="color: #008;">100</span><span style="color: #000;">,</span> <span style="color: #008;">130</span>  <span style="color: #800; font-style: italic;"># Intervall der Zufallsstreuung der Bezirksfarbe</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    c <span style="color: #000;">=</span> <span style="color: #008;">255</span>-b  <span style="color: #800; font-style: italic;"># Einfluss des Bundeslandes auf die Farbe</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Füllfarbe</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    rf <span style="color: #000;">=</span> randint<span style="color: black;">&#40;</span>a<span style="color: #000;">,</span> b<span style="color: black;">&#41;</span>+c*<span style="color: #808;">int</span><span style="color: black;">&#40;</span>Grundton<span style="color: black;">&#91;</span><span style="color: #008;">1</span>:<span style="color: #008;">3</span><span style="color: black;">&#93;</span><span style="color: #000;">,</span> <span style="color: #008;">16</span><span style="color: black;">&#41;</span>//<span style="color: #008;">256</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    gf <span style="color: #000;">=</span> randint<span style="color: black;">&#40;</span>a<span style="color: #000;">,</span> b<span style="color: black;">&#41;</span>+c*<span style="color: #808;">int</span><span style="color: black;">&#40;</span>Grundton<span style="color: black;">&#91;</span><span style="color: #008;">3</span>:<span style="color: #008;">5</span><span style="color: black;">&#93;</span><span style="color: #000;">,</span> <span style="color: #008;">16</span><span style="color: black;">&#41;</span>//<span style="color: #008;">256</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    bf <span style="color: #000;">=</span> randint<span style="color: black;">&#40;</span>a<span style="color: #000;">,</span> b<span style="color: black;">&#41;</span>+c*<span style="color: #808;">int</span><span style="color: black;">&#40;</span>Grundton<span style="color: black;">&#91;</span><span style="color: #008;">5</span>:<span style="color: #008;">7</span><span style="color: black;">&#93;</span><span style="color: #000;">,</span> <span style="color: #008;">16</span><span style="color: black;">&#41;</span>//<span style="color: #008;">256</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Randfarbe wie Füllfarbe, nur dunkler</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    rr <span style="color: #000;">=</span> rf//<span style="color: #008;">2</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    gr <span style="color: #000;">=</span> gf//<span style="color: #008;">2</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    br <span style="color: #000;">=</span> bf//<span style="color: #008;">2</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">return</span> <span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;#{rf:02x}{gf:02x}{bf:02x}&quot;</span><span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            f<span style="color: #080;">&quot;#{rr:02x}{gr:02x}{br:02x}&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">class</span> Bezirk:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Alle Informationen zu einem Bezirkspolygon</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #808;">self</span><span style="color: #000;">,</span> cid<span style="color: #000;">,</span> B<span style="color: #000;">,</span> Flächenfarbe<span style="color: #000;">,</span> Randfarbe<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #800; font-style: italic;"># Canvas-ID der Bezirksfläche</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #808;">self</span>.<span style="color: black;">cid</span> <span style="color: #000;">=</span> cid</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #800; font-style: italic;"># Informationen aus der Bezirkliste</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #808;">self</span>.<span style="color: black;">name</span> <span style="color: #000;">=</span> B<span style="color: black;">&#91;</span><span style="color: #080;">&quot;Name&quot;</span><span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #808;">self</span>.<span style="color: black;">typ</span> <span style="color: #000;">=</span> B<span style="color: black;">&#91;</span><span style="color: #080;">&quot;Typ&quot;</span><span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #808;">self</span>.<span style="color: black;">kfz</span> <span style="color: #000;">=</span> <span style="color: #808;">sorted</span><span style="color: black;">&#40;</span>B<span style="color: black;">&#91;</span><span style="color: #080;">&quot;Kennzeichen&quot;</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #808;">self</span>.<span style="color: black;">land</span> <span style="color: #000;">=</span> Bundesland<span style="color: black;">&#91;</span>B<span style="color: black;">&#91;</span><span style="color: #080;">&quot;Bundesland&quot;</span><span style="color: black;">&#93;</span><span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #008;">0</span><span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #800; font-style: italic;"># Füllfarbe</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #808;">self</span>.<span style="color: #dc143c;">fl</span>ächenfarbe <span style="color: #000;">=</span> Flächenfarbe</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #800; font-style: italic;"># Randfarbe</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #808;">self</span>.<span style="color: black;">randfarbe</span> <span style="color: #000;">=</span> Randfarbe</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #800; font-style: italic;"># Wenn die Maus auf die Fläche kommt</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        C.<span style="color: black;">tag_bind</span><span style="color: black;">&#40;</span><span style="color: #808;">self</span>.<span style="color: black;">cid</span><span style="color: #000;">,</span> <span style="color: #080;">&quot;&lt;Enter&gt;&quot;</span><span style="color: #000;">,</span> <span style="color: #808;">self</span>.<span style="color: black;">hervorhebung</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #800; font-style: italic;"># Wenn die Maus die Fläche wieder verlässt</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        C.<span style="color: black;">tag_bind</span><span style="color: black;">&#40;</span><span style="color: #808;">self</span>.<span style="color: black;">cid</span><span style="color: #000;">,</span> <span style="color: #080;">&quot;&lt;Leave&gt;&quot;</span><span style="color: #000;">,</span> <span style="color: #808;">self</span>.<span style="color: black;">entfernehervorhebung</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">def</span> hervorhebung<span style="color: black;">&#40;</span><span style="color: #808;">self</span><span style="color: #000;">,</span> event<span style="color: #000;">=</span><span style="color: #808;">None</span><span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #800; font-style: italic;"># Fläche rot einfärben, Rand dicker zeichnen</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        C.<span style="color: black;">itemconfig</span><span style="color: black;">&#40;</span><span style="color: #808;">self</span>.<span style="color: black;">cid</span><span style="color: #000;">,</span> outline<span style="color: #000;">=</span><span style="color: #080;">&quot;red&quot;</span><span style="color: #000;">,</span> fill<span style="color: #000;">=</span><span style="color: #080;">&quot;red&quot;</span><span style="color: #000;">,</span> width<span style="color: #000;">=</span><span style="color: #008;">7</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #800; font-style: italic;"># Informationen im Textfenster ausgeben</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #808;">self</span>.<span style="color: black;">info</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">def</span> entfernehervorhebung<span style="color: black;">&#40;</span><span style="color: #808;">self</span><span style="color: #000;">,</span> event<span style="color: #000;">=</span><span style="color: #808;">None</span><span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #800; font-style: italic;"># Ursprüngliche Flächenfarbe und Randstärke wiederherstellen</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        C.<span style="color: black;">itemconfig</span><span style="color: black;">&#40;</span><span style="color: #808;">self</span>.<span style="color: black;">cid</span><span style="color: #000;">,</span> outline<span style="color: #000;">=</span><span style="color: #808;">self</span>.<span style="color: black;">randfarbe</span><span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                     fill<span style="color: #000;">=</span><span style="color: #808;">self</span>.<span style="color: #dc143c;">fl</span>ächenfarbe<span style="color: #000;">,</span> width<span style="color: #000;">=</span><span style="color: #008;">1</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">def</span> info<span style="color: black;">&#40;</span><span style="color: #808;">self</span><span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #800; font-style: italic;"># Informationen über den hervorgehobenen Bezirk ausgeben:</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #800; font-style: italic;"># Textbereich löschen</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        T.<span style="color: black;">delete</span><span style="color: black;">&#40;</span><span style="color: #008;">1.0</span><span style="color: #000;">,</span> <span style="color: #080;">&quot;end&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #800; font-style: italic;"># Überschrift</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        T.<span style="color: black;">insert</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;end&quot;</span><span style="color: #000;">,</span> f<span style="color: #080;">&quot;n{self.typ} {self.name} in {self.land}n&quot;</span><span style="color: #000;">,</span> <span style="color: #080;">&quot;h1&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #800; font-style: italic;"># Liste der Kennzeichen und ihrer angeblichen Bedeutungen</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #ff7700;">for</span> k <span style="color: #ff7700;">in</span> <span style="color: #808;">self</span>.<span style="color: black;">kfz</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            T.<span style="color: black;">insert</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;end&quot;</span><span style="color: #000;">,</span> f<span style="color: #080;">&quot;n{k} ({Kennzeichen[k]})n&quot;</span><span style="color: #000;">,</span> <span style="color: #080;">&quot;h2&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            <span style="color: #ff7700;">if</span> k <span style="color: #ff7700;">in</span> Interpretation:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                Ints <span style="color: #000;">=</span> <span style="color: black;">&#40;</span><span style="color: #080;">&quot;“n- „&quot;</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span><span style="color: #808;">sorted</span><span style="color: black;">&#40;</span>Interpretation<span style="color: black;">&#91;</span>k<span style="color: black;">&#93;</span><span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                                      key<span style="color: #000;">=</span><span style="color: #ff7700;">lambda</span> x: x.<span style="color: black;">lower</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                T.<span style="color: black;">insert</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;end&quot;</span><span style="color: #000;">,</span> f<span style="color: #080;">&quot;- „{Ints}“n&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">def</span> canvaskoord<span style="color: black;">&#40;</span>Polygon<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Umrechnung der Geokoordinaten auf das quadratische Canvas-Fenster</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">return</span> <span style="color: black;">&#91;</span><span style="color: black;">&#40;</span><span style="color: #008;">80</span>*<span style="color: black;">&#40;</span>x-<span style="color: #008;">5.5</span><span style="color: black;">&#41;</span><span style="color: #000;">,</span> Größe-<span style="color: #008;">100</span>*<span style="color: black;">&#40;</span>y-<span style="color: #008;">47.2</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;">for</span> x<span style="color: #000;">,</span> y <span style="color: #ff7700;">in</span> Polygon<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Umriss der BRD als Liste von Geokoordinaten</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">with</span> <span style="color: #808;">open</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;deutschland.json&quot;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;">as</span> f:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    Deutschlandumriss <span style="color: #000;">=</span> json.<span style="color: black;">load</span><span style="color: black;">&#40;</span>f<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Die „Bezirkliste“ ist eine Liste von Dictionarys mit Informationen über</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Landkreise, Kreise und kreisfreie Städte in Deutschland.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Koordinaten: entweder Liste mit Geokoordinaten (Ost, Nord) der Bezirksgrenzen</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#              oder Liste solcher Listen für nicht zusammenhängende Flächen</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Name:        Name des Bezirks</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Typ:         Kreis, Landkreis oder kreisfreie Stadt</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Kennzeichen: Liste mit KFZ-Kennzeichen des Bezirks (einige Einträge sind</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#              möglicherweise nicht korrekt, bitte überprüfen!)</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Bundesland:  Kennzahl von &quot;01&quot; bis &quot;16&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">with</span> <span style="color: #808;">open</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;bezirke.json&quot;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;">as</span> f:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    Bezirkliste <span style="color: #000;">=</span> json.<span style="color: black;">load</span><span style="color: black;">&#40;</span>f<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Namen und Grundfarben der 16 Bundesländer; die fünf Farben sind</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># so gewählt, dass benachbarte Länder nicht dieselbe Farbe haben.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">with</span> <span style="color: #808;">open</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;laender.csv&quot;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;">as</span> f:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    Bundesland <span style="color: #000;">=</span> <span style="color: black;">&#123;</span>k: v <span style="color: #ff7700;">for</span> k<span style="color: #000;">,</span> *v <span style="color: #ff7700;">in</span> <span style="color: #dc143c;">csv</span>.<span style="color: black;">reader</span><span style="color: black;">&#40;</span>f<span style="color: #000;">,</span> delimiter<span style="color: #000;">=</span><span style="color: #080;">&quot;t&quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#125;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Liste der Ortskennzeichen</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">with</span> <span style="color: #808;">open</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;kfz.csv&quot;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;">as</span> f:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    Kennzeichen <span style="color: #000;">=</span> <span style="color: black;">&#123;</span>k: v <span style="color: #ff7700;">for</span> k<span style="color: #000;">,</span> v <span style="color: #ff7700;">in</span> <span style="color: #dc143c;">csv</span>.<span style="color: black;">reader</span><span style="color: black;">&#40;</span>f<span style="color: #000;">,</span> delimiter<span style="color: #000;">=</span><span style="color: #080;">&quot;t&quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#125;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Liste mehr oder weniger geistreicher Interpretationen der Ortskennzeichen.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Verwendete Quellen:</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># https://www.chefkoch.de/forum/2,31,46569/Kfz-Zeichen-und-Ihre-ganz-spezielle-Deutung-aber-nicht-beleidigt-sein-Ck-users-danke.html</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># https://blog.jannewap.ws/2009/04/05/kfz-kennzeichen-fiese-interpretationen-gibt-es-uberall/</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># https://www.meine-auto.info/ratgeber/kfz-kennzeichen/autokennzeichen-mal-anders.html</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># http://www.spiegel.de/auto/fahrkultur/auto-kennzeichen-kennen-sie-die-witzigsten-kuerzel-a-1192622.html</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># … sowie individuelle Einsendungen von Ortskundigen</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">with</span> <span style="color: #808;">open</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;kfzint.csv&quot;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;">as</span> f:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    Interpretation <span style="color: #000;">=</span> <span style="color: black;">&#123;</span>k: v <span style="color: #ff7700;">for</span> k<span style="color: #000;">,</span> *v <span style="color: #ff7700;">in</span> <span style="color: #dc143c;">csv</span>.<span style="color: black;">reader</span><span style="color: black;">&#40;</span>f<span style="color: #000;">,</span> delimiter<span style="color: #000;">=</span><span style="color: #080;">&quot;t&quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#125;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># GUI-Hauptfenster</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">F <span style="color: #000;">=</span> Tk<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">F.<span style="color: black;">title</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Deutschlands Kennzeichen&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Die Zeichenfläche/Canvas</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Größe <span style="color: #000;">=</span> <span style="color: #008;">800</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">C <span style="color: #000;">=</span> Canvas<span style="color: black;">&#40;</span>width<span style="color: #000;">=</span>Größe<span style="color: #000;">,</span> height<span style="color: #000;">=</span>Größe<span style="color: #000;">,</span> background<span style="color: #000;">=</span><span style="color: #080;">&quot;white&quot;</span><span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">           bd<span style="color: #000;">=</span><span style="color: #008;">0</span><span style="color: #000;">,</span> highlightthickness<span style="color: #000;">=</span><span style="color: #008;">0</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">C.<span style="color: black;">pack</span><span style="color: black;">&#40;</span>side<span style="color: #000;">=</span><span style="color: #080;">&quot;left&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Infofenster rechts neben der Karte</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">T <span style="color: #000;">=</span> Text<span style="color: black;">&#40;</span>width<span style="color: #000;">=</span><span style="color: #008;">40</span><span style="color: #000;">,</span> wrap<span style="color: #000;">=</span><span style="color: #080;">&quot;word&quot;</span><span style="color: #000;">,</span> font<span style="color: #000;">=</span><span style="color: #080;">&quot;sans 11&quot;</span><span style="color: #000;">,</span> bd<span style="color: #000;">=</span><span style="color: #008;">0</span><span style="color: #000;">,</span> highlightthickness<span style="color: #000;">=</span><span style="color: #008;">0</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">T.<span style="color: black;">pack</span><span style="color: black;">&#40;</span>fill<span style="color: #000;">=</span><span style="color: #080;">&quot;both&quot;</span><span style="color: #000;">,</span> expand<span style="color: #000;">=</span><span style="color: #808;">True</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Erste Zeile des Infofensters hervorheben</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">T.<span style="color: black;">tag_config</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;h1&quot;</span><span style="color: #000;">,</span> font<span style="color: #000;">=</span><span style="color: #080;">&quot;sans 12 bold&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Kennzeichen hervorheben</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">T.<span style="color: black;">tag_config</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;h2&quot;</span><span style="color: #000;">,</span> font<span style="color: #000;">=</span><span style="color: #080;">&quot;sans 11 bold&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Gesamtumriss zeichnen</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">for</span> Polygon <span style="color: #ff7700;">in</span> Deutschlandumriss:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    C.<span style="color: black;">create_polygon</span><span style="color: black;">&#40;</span>canvaskoord<span style="color: black;">&#40;</span>Polygon<span style="color: black;">&#41;</span><span style="color: #000;">,</span> fill<span style="color: #000;">=</span><span style="color: #080;">&quot;&quot;</span><span style="color: #000;">,</span> outline<span style="color: #000;">=</span><span style="color: #080;">&quot;black&quot;</span><span style="color: #000;">,</span> width<span style="color: #000;">=</span><span style="color: #008;">7</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Liste mit Bezirk-Objekten zusammenstellen:</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Bezirke <span style="color: #000;">=</span> <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">for</span> B <span style="color: #ff7700;">in</span> Bezirkliste:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># passende Farben aussuchen</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #dc143c;">fl</span>äche<span style="color: #000;">,</span> rand <span style="color: #000;">=</span> Zufallsfarben<span style="color: black;">&#40;</span>Bundesland<span style="color: black;">&#91;</span>B<span style="color: black;">&#91;</span><span style="color: #080;">&quot;Bundesland&quot;</span><span style="color: black;">&#93;</span><span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #008;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Liste der Polygone holen</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    K <span style="color: #000;">=</span> B<span style="color: black;">&#91;</span><span style="color: #080;">&quot;Koordinaten&quot;</span><span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Ist die Polygonliste nur eine Punkteliste?</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">if</span> <span style="color: #808;">type</span><span style="color: black;">&#40;</span>K<span style="color: black;">&#91;</span><span style="color: #008;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #008;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> <span style="color: #000;">==</span> <span style="color: #808;">float</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #800; font-style: italic;"># nochmal einpacken, Punkteliste wird zur Polygonliste</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        K <span style="color: #000;">=</span> <span style="color: black;">&#91;</span>K<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># für alle Polygone in der Polygonliste</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> Polygon <span style="color: #ff7700;">in</span> K:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #800; font-style: italic;"># Polygon zeichnen und Canvas-ID merken</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        cid <span style="color: #000;">=</span> C.<span style="color: black;">create_polygon</span><span style="color: black;">&#40;</span>canvaskoord<span style="color: black;">&#40;</span>Polygon<span style="color: black;">&#41;</span><span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                               fill<span style="color: #000;">=</span><span style="color: #dc143c;">fl</span>äche<span style="color: #000;">,</span> outline<span style="color: #000;">=</span>rand<span style="color: #000;">,</span> width<span style="color: #000;">=</span><span style="color: #008;">1</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #800; font-style: italic;"># Bezirk-Objekt anlegen</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        Bezirke.<span style="color: black;">append</span><span style="color: black;">&#40;</span>Bezirk<span style="color: black;">&#40;</span>cid<span style="color: #000;">,</span> B<span style="color: #000;">,</span> <span style="color: #dc143c;">fl</span>äche<span style="color: #000;">,</span> rand<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Kreisfreie Städte und Stadtkreise dürfen nicht von den sie</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># umschließenden Kreisen und Landkreisen überdeckt werden und</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># werden deshalb in den Vordergrund gehoben:</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">for</span> B <span style="color: #ff7700;">in</span> Bezirke:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">if</span> <span style="color: #080;">&quot;Stadt&quot;</span> <span style="color: #ff7700;">in</span> B.<span style="color: black;">typ</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        C.<span style="color: black;">tag_raise</span><span style="color: black;">&#40;</span>B.<span style="color: black;">cid</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">F.<span style="color: black;">mainloop</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></li></ol></pre>]]></content:encoded>
<link>https://bauforum.wirklichewelt.de/index.php?id=11591</link>
<guid>https://bauforum.wirklichewelt.de/index.php?id=11591</guid>
<pubDate>Sat, 17 Feb 2018 16:13:16 +0000</pubDate>
<category>Software</category><dc:creator>Martin Vogel</dc:creator>
</item>
<item>
<title>Geodaten aller Gemeinden in Deutschland als kostenloser JSON-Download</title>
<content:encoded><![CDATA[<p>Die beiden Softwareentwickler Adrian Stabiszewski und Felix Ebert aus dem Raum Heilbronn betreiben die Website OpenDataLab, auf der sich jedermann Umrisse und Daten zu allen Gemeinden, Kreisen und Bundesländern in Deutschland herunterladen kann. Als Datenformat verwenden sie das mit Python besonders einfach auszuwertende GeoJSON-Format. Zusatzdaten aus Wikipedia und Destatis, wie beispielsweise Einwohnerzahlen, KFZ-Kennzeichen, Steuereinnahmen oder Geburtenrate machen die Website zu einer Fundgrube für eigene Projekte.</p>
<p><a href="http://opendatalab.de/projects/geojson-utilities/" target="_blank">http://opendatalab.de/projects/geojson-utilities/</a></p>
<p>Den Quelltext ihres Geodatensammlers stellen die Entwickler auf GitHub zur Verfügung: <a href="https://github.com/opendatalab-de/simple-geodata-selector" target="_blank">https://github.com/opendatalab-de/simple-geodata-selector</a></p>
]]></content:encoded>
<link>https://bauforum.wirklichewelt.de/index.php?id=11590</link>
<guid>https://bauforum.wirklichewelt.de/index.php?id=11590</guid>
<pubDate>Sat, 17 Feb 2018 12:54:01 +0000</pubDate>
<category>Software</category><dc:creator>Martin Vogel</dc:creator>
</item>
</channel>
</rss>
