fork download
  1. #!/usr/bin/env python3
  2.  
  3. from lxml import etree
  4. import sys
  5. import re
  6.  
  7. gpx = etree.Element('gpx')
  8. for note in etree.parse(sys.stdin).getroot():
  9. wpt = etree.SubElement(gpx, "wpt", lat=note.get('lat'), lon=note.get('lon'))
  10. etree.SubElement(wpt, "time").text = note.get('created_at')
  11. etree.SubElement(wpt, "name").text = re.sub(r'\s+', ' ', next(iter(note)).text)[:100]
  12. etree.SubElement(wpt, "sym").text = 'Flag, Green'
  13. print(etree.tostring(gpx, pretty_print=True, xml_declaration=True).decode(), end="")
Success #stdin #stdout 0.05s 95104KB
stdin
<?xml version="1.0" encoding="UTF-8"?>
<osm-notes>
  <note id="1306896" lat="53.5531971" lon="10.0064421" created_at="2018-02-21T21:00:54Z" >
    <comment action="OPENED" timestamp="2018-02-21T21:00:54Z" is_new="false" >https://r...content-available-to-author-only...n.de&#xA;for osmand</comment>
    <comment action="CLOSED" timestamp="2018-03-04T13:16:11Z" uid="1431737" user="ma-rt-in" is_new="false" >Mache hier zu, da ja der Zweck dieser Note irrelevant ist </comment>
    <comment action="REOPENED" timestamp="2018-03-07T20:13:02Z" uid="2583932" user="Kiezkickerde" is_new="false" ></comment>
    <comment action="COMMENTED" timestamp="2018-03-07T20:13:53Z" uid="2583932" user="Kiezkickerde" is_new="false" >Naja, so ganz sinnlos ist das nicht, denn dabei dürfte es sich um die Position handeln, bei der sich diese riesigen Anzeigetafeln mit den Ankünften und Abfahrten der Züge im Fernbahnhof - Teil befinden:&#xA;http://w...content-available-to-author-only...y.com/doc/kiezkicker/449653&#xA;Also nicht für ein einzelnes Gleis, sondern gesammelt mit allen Gleisen auf einem einzigen Display.&#xA;Und die Positionsangabe kann für bspw. kurzsichtige Personen schon hilfreich zum finden sein, speziell mit der URL dann sogar in für sie nutzbarer Form.&#xA;&#xA;Mögliche Tags:&#xA;&#xA;advertising=screen -&#xA;https://w...content-available-to-author-only...p.org/wiki/DE:Key:advertising&#xA;&#xA;message=local - https://w...content-available-to-author-only...p.org/wiki/Key:message&#xA;&#xA;homepage=https://r...content-available-to-author-only...n.de&#xA;&#xA;Kann es im Browser leider nicht eintragen, Script läuft wegen zu vielen Punkten zu lange, mal später schauen, ob ich das mit josm geregelt bekomme. Bis dahin erst mal wieder geöffnet.</comment>
    <comment action="COMMENTED" timestamp="2018-03-07T21:08:13Z" uid="2583932" user="Kiezkickerde" is_new="false" >Auch hier noch mal kurz der Hinweis zu https://w...content-available-to-author-only...p.org/wiki/DE:Key:passenger_information_display was wohl passender ist.&#xA;Ansonsten gilt das in Note 1306902 gesagte hinsichtlich der Displays.</comment>
    <comment action="COMMENTED" timestamp="2018-05-03T21:04:57Z" uid="579262" user="MatthiasMatthias" is_new="false" >Das ist nicht korrekt, die Anzeigetafeln befinden sich in der Wandelhalle bei den Eingängen. Aus meiner Sicht kann diese Note geschlossen werden.</comment>
    <comment action="COMMENTED" timestamp="2018-05-03T21:26:21Z" uid="1431737" user="ma-rt-in" is_new="false" >Es geht hier aber nicht um die Lage der Note sondern die Schreibung der Anzeigetafel. </comment>
    <comment action="COMMENTED" timestamp="2018-05-04T12:15:29Z" uid="2583932" user="Kiezkickerde" is_new="false" >Eben, MatthiasMatthias redet halt schon wieder von den großen, hängenden Anzeigetafeln, um die es hier aber eben explizit nicht geht.&#xA;In dieser Hinweismeldung geht es um ein Bildschirm - Display mit einer Größe von etwa 30 Zoll.</comment>
    <comment action="COMMENTED" timestamp="2018-05-04T12:17:50Z" uid="2583932" user="Kiezkickerde" is_new="false" >Na gut, eher 45 bis 50 Zoll, wenn man den Schatten von mir aus http://w...content-available-to-author-only...y.com/doc/kiezkicker/449653 betrachtet... Aber eben ein Bildschirm.</comment>
  </note>
  <note id="1773092" lat="53.5513296" lon="9.993844" created_at="2019-05-09T17:21:30Z" >
    <comment action="OPENED" timestamp="2019-05-09T17:21:30Z" uid="6701886" user="Mapward" is_new="false" >Unable to answer &quot;What are the opening hours of Blumen Hajo G. Eilers?&quot; for https://o...content-available-to-author-only...m.org/node/583554303 via StreetComplete 11.0:&#xA;&#xA;doesnt exsist anymore</comment>
  </note>
  <note id="1713805" lat="53.5489902" lon="10.0057608" created_at="2019-03-17T17:28:35Z" >
    <comment action="OPENED" timestamp="2019-03-17T17:28:35Z" uid="2583932" user="Kiezkickerde" is_new="false" >3, 112, 34 &amp; 640 Ab Montag, 18.3.19 Betriebsbeginn bis vsl. Freitag, 27.10.23, kann die Haltestelle U Steinstr. in Ri Elbbrücken aufgrund eines Hausabbruch nicht bedient werden und entfällt ersatzlos: https://t...content-available-to-author-only...r.com/HVVStoerungen/status/1107329097410191361&#xA;&#xA;Ich nehme an, sie reißen dann ab Montag die denkmalgeschützte City-Hof-Passage ab...?</comment>
    <comment action="COMMENTED" timestamp="2019-03-17T22:13:00Z" uid="1431737" user="ma-rt-in" is_new="false" >Hier noch ein weiterer Beleg von der HVV Website:&#xA;&#xA;Gültigkeit: 12.03.2019 - 31.07.2023, Letzte Änderung: 12.03.2019 08:25&#xA;&#xA;Maßnahme: Haltestellenaufhebung&#xA;Anlass: Abbruch der Hochhäuser U Steinstraße&#xA;&#xA;Termin: Montag, 18. März 2019 von Betriebsbeginn&#xA;Dauer: Montag, 31. Juli 2023&#xA;&#xA;Die Haltestelle U Steinstraße Richtung Kraftwerk Tiefstack wird ersatzlos aufgehoben.&#xA;&#xA;Ich werde die Änderung nun vollziehen.</comment>
    <comment action="COMMENTED" timestamp="2019-03-17T22:22:59Z" uid="1431737" user="ma-rt-in" is_new="false" >Hier noch eine Abschrift zum Abbruch: http://d...content-available-to-author-only...g.de/Dataport.HmbTG.ZS.Webservice.GetRessource100/GetRessource100.svc/92d06b70-a547-4781-b8e7-c7f41dcd43db/Akte_760.05-01.pdf</comment>
    <comment action="COMMENTED" timestamp="2019-03-20T11:11:06Z" uid="2583932" user="Kiezkickerde" is_new="false" >Jo, die Gebäude werden abgerissen: https://w...content-available-to-author-only...r.de/nachrichten/hamburg/City-Hof-darf-abgerissen-werden,cityhof276.html</comment>
    <comment action="COMMENTED" timestamp="2019-04-11T15:10:18Z" uid="1431737" user="ma-rt-in" is_new="false" >Heute mal vorbei gefahren und die Baustelle weiter angepasst</comment>
  </note>
  <note id="1289161" lat="53.5490157" lon="10.0145531" created_at="2018-02-04T11:07:39Z" >
    <comment action="OPENED" timestamp="2018-02-04T11:07:39Z" is_new="false" >Wird alles abgerissen.</comment>
    <comment action="COMMENTED" timestamp="2018-02-12T20:07:45Z" uid="37977" user="Thomas22549" is_new="false" >Stimmt. Gebäude stehen noch, sind aber leer.</comment>
    <comment action="COMMENTED" timestamp="2018-10-03T12:09:09Z" is_new="false" >Die &quot;Fences&quot; sind alles schon Bauzäune, aber die Bauarbeiten sind noch nicht begonnen. (Beinhaltet die vier Gebäude 22,24,26,73 und die Flächen darum)</comment>
    <comment action="CLOSED" timestamp="2018-12-18T13:48:09Z" uid="1431737" user="ma-rt-in" is_new="false" >Stand 2018-12-18: Gebäude stehen noch.</comment>
    <comment action="REOPENED" timestamp="2018-12-18T13:48:10Z" uid="1431737" user="ma-rt-in" is_new="false" ></comment>
  </note>
  <note id="804518" lat="53.5538727" lon="10.0079334" created_at="2016-12-03T22:32:08Z" >
    <comment action="OPENED" timestamp="2016-12-03T22:32:08Z" uid="645538" user="vademecum" is_new="false" >hier sind zwei landuse=railway übereinander, alles sehr verworren. vielleicht kann da mal jemand mit eisenbahnerfahrung draufschauen?</comment>
    <comment action="COMMENTED" timestamp="2018-11-02T11:58:09Z" uid="1431737" user="ma-rt-in" is_new="false" >die zwei landuses sind schonmal vereint.</comment>
  </note>
  <note id="433102" lat="53.5527923" lon="10.006898" created_at="2015-09-11T18:44:35Z" >
    <comment action="OPENED" timestamp="2015-09-11T18:44:35Z" uid="165061" user="mapper999" is_new="false" >Im Hamburger Hauptbahnhof gibt es massenweise doppelte und dreifache POIs. Auch die Klassifizierung scheint mir nicht immer zu stimmen (z.B. ein Restaurant namens Edeka?). Ich habe leider überhaupt keine Ortskenntnis, aber vielleicht gibt es ja Mapper, die sich am Hamburger Hauptbahnhof auskennen und etwas aufräumen wollen?</comment>
    <comment action="COMMENTED" timestamp="2015-09-18T21:14:51Z" is_new="false" >Edeka war schon shop=supermarket, hatte aber zusätzlich amenity=food_court (das ist jetzt gelöscht). </comment>
    <comment action="COMMENTED" timestamp="2015-12-16T00:03:36Z" is_new="false" >In der Tat sind viele Läden als Fläche und als Node eingetragen. Vielleicht kann das ja derjenige Mapper wieder in Ordnung bringen, der das im Mai 2015 alles doppelt eingetragen hat?</comment>
    <comment action="COMMENTED" timestamp="2016-03-02T22:33:27Z" uid="192278" user="Prince Kassad" is_new="false" >das dürfte ähnlich wie in Frankfurt sein, da hat auch ein Mentz-Account einfach den kompletten DB-Stationsplan abgezeichnet und ein riesiges Chaos angerichtet.</comment>
    <comment action="COMMENTED" timestamp="2018-03-04T13:20:03Z" uid="1431737" user="ma-rt-in" is_new="false" >Bin gerade im Bahnhof und muss feststellen das vieles nicht passt. Zum einen das einige Geschäfte für indoor mapping als Gebäudeteil dann aber auch soll da stehen. Werde es in Angriff nehmen, da ich eh bald regelmäßig in Hamburg bin</comment>
  </note>
  <note id="1773093" lat="53.5512649" lon="9.9936654" created_at="2019-05-09T17:22:41Z" >
    <comment action="OPENED" timestamp="2019-05-09T17:22:41Z" uid="6701886" user="Mapward" is_new="false" >Unable to answer &quot;What are the opening hours of Pal Zilieri?&quot; for https://o...content-available-to-author-only...m.org/node/3414876231 via StreetComplete 11.0:&#xA;&#xA;New &quot;whatever&quot; called Occhio</comment>
  </note>
</osm-notes>
stdout
<?xml version='1.0' encoding='ASCII'?>
<gpx>
  <wpt lat="53.5531971" lon="10.0064421">
    <time>2018-02-21T21:00:54Z</time>
    <name>https://r...content-available-to-author-only...n.de for osmand</name>
    <sym>Flag, Green</sym>
  </wpt>
  <wpt lat="53.5513296" lon="9.993844">
    <time>2019-05-09T17:21:30Z</time>
    <name>Unable to answer "What are the opening hours of Blumen Hajo G. Eilers?" for https://o...content-available-to-author-only...m.org/node/583</name>
    <sym>Flag, Green</sym>
  </wpt>
  <wpt lat="53.5489902" lon="10.0057608">
    <time>2019-03-17T17:28:35Z</time>
    <name>3, 112, 34 &amp; 640 Ab Montag, 18.3.19 Betriebsbeginn bis vsl. Freitag, 27.10.23, kann die Haltestelle </name>
    <sym>Flag, Green</sym>
  </wpt>
  <wpt lat="53.5490157" lon="10.0145531">
    <time>2018-02-04T11:07:39Z</time>
    <name>Wird alles abgerissen.</name>
    <sym>Flag, Green</sym>
  </wpt>
  <wpt lat="53.5538727" lon="10.0079334">
    <time>2016-12-03T22:32:08Z</time>
    <name>hier sind zwei landuse=railway &#252;bereinander, alles sehr verworren. vielleicht kann da mal jemand mit</name>
    <sym>Flag, Green</sym>
  </wpt>
  <wpt lat="53.5527923" lon="10.006898">
    <time>2015-09-11T18:44:35Z</time>
    <name>Im Hamburger Hauptbahnhof gibt es massenweise doppelte und dreifache POIs. Auch die Klassifizierung </name>
    <sym>Flag, Green</sym>
  </wpt>
  <wpt lat="53.5512649" lon="9.9936654">
    <time>2019-05-09T17:22:41Z</time>
    <name>Unable to answer "What are the opening hours of Pal Zilieri?" for https://o...content-available-to-author-only...m.org/node/3414876231 vi</name>
    <sym>Flag, Green</sym>
  </wpt>
</gpx>