Skip to content

Commit c81c70a

Browse files
Michael MaierMichael Maier
Michael Maier
authored and
Michael Maier
committed
cleaned up notes file
1 parent 6c88557 commit c81c70a

File tree

2 files changed

+29
-71
lines changed

2 files changed

+29
-71
lines changed

doc/notes.txt

+29-71
Original file line numberDiff line numberDiff line change
@@ -179,74 +179,32 @@ Show only ways (from a given list of ways) which are part of a bicycle route
179179
way for our task is to select only the parent ways for all nodes from the input
180180
set with *way(bn*);
181181

182-
Problem:
183-
ways ohne node-änderungen (nur tags) schmeisst der osmosis-crop-befehl raus.
184-
185-
wenn wir wget http://www.openstreetmap.org/api/0.6/changeset/24005065
186-
dann kriegen wir das XML mit den changeset-tags, wo min_max lon/lat drinstehen
187-
188-
so problem: ways ohne nodes, vorgehensweise:
189-
* osmosis-toolchain bis auf schritt b-poly durchführen
190-
* filtern nach unseren benötigten tag-kombinationen
191-
hw=cw || hw=tr|path|fw|serv && (( bicy=¬false || access=¬false)
192-
false ≙ private|no
193-
true ≙ yes|designated|permissive|official|public
194-
195-
--read-xml input.osm \
196-
--tf accept-ways highway=* \
197-
--tf reject-ways highway=motorway,motorway_link,trunk,trunk_link,bus_guideway,raceway \
198-
--used-node \
199-
--write-xml output.osm
200-
201-
* von überbleibenden ways jeweils den ersten node runterladen und ins .osm.xml einfügen
202-
* dann mit osmosis beschneiden
203-
204-
Problem mit Relations:
205-
was ist, wenn jemand einen way aus der Bundesstraße löscht?
206-
→ dann wird die Relation modified, und wir kriegens mit.
207-
208-
Seine vorgangsweise:
209-
croppen
210-
alle ways schaun ob in [route="bicycle"] ->.bikerouteways → needs alle hw's !motorway-etc
211-
alle ways schaun ob hw=cw -> .cycleways;
212-
alle rels schaun ob [route="bicycle"] -> .bikerouts → TODO kann mit osmosis gemacht werden → DONE werden nur diese rels durchgelassen
213-
alle ways schaun ob hw=rest+bic=ja → .bicycleallowed → FIXME könnte mit osmosis gemacht werden
214-
get ALLE results von overpass API als osm.xml zurück
215-
parse und printe.
216-
217-
besser:
218-
nur schaun ob in [route="bicycle"] via overpass.
219-
Rest müsste via osmosis gehen!
220-
direkt aus osmosis folgendes nehmen:
221-
• alle rels [route="bicycle"]
222-
• alle hw=cw; hw=rest+bic=ja
223-
→ doppelte rausfiltern wie?
224-
overpass kann das... ( () (union) )
225-
das ist genau das was er macht...
226-
am einfachsten nur den Input verkleinern
227-
wir müssen sowieso alle ways an overpass schicken, da machen die 10% doppelten und 1% rels extra auch nix aus
228-
→ Todo:
229-
filtern mit osmosis, ev. mehrere steps
230-
1. nur die typen die interessieren
231-
dann fehlende way-koordinaten nodes hinzufügen (get a list of nodes via overpass)
232-
croppen
233-
(ev: 2. satz filtern nach nur cw=erlaubt ways mittels osmosis, damit die overpass-server weniger zu tun haben)
234-
große (oder ev. etwas verkleinerte) overpass-query absetzen
235-
236-
vars: self.__content_diff ist die antwort der overpass API, aus der das Ergebnis generiert wird
237-
238-
TO TEST overpass QL if leer.
239-
240-
TO TEST if rel modified with no members supplied (no spatial information)
241-
testcase: sortiere nur Murradweg um
242-
243-
TO TEST __readWayNodes liest ja jetzt nur mehr das von osmosis von osc in XML umgewandelte File - sind im XML die deleted items noch drin?
244-
NEIN - FUCK.
245-
beeinflusst:
246-
• nodes, die in ways waren die in [route="bicycle"] ->.bikerouteways drin waren - NEIN, da way dann auch modified wurde
247-
• gelöschte Ways - NEIN, da Rel dann auch modifiziert würde (kA ob server objekte löschen lässt, wenn in rel vorhanden. sollte aber normalerweise kein Editor zulassen)
248-
· wär aber klass, in einer übersicht den status anzuzeigen
249-
• alleinstehende cws, die nicht in einer Relation sind.
250-
• deletete Relations (!)
251-
abhilfe:
252-
per regex <deleted> → <modified> im osc NACH --simplify-change - Schritt. -OK
182+
Thu 10 Jul 16:04:02 CEST 2014 (and before) -MM
183+
==============================================
184+
Problems fixed:
185+
• Ways without node-changes have no spatial information in diff file, so get removed by crop
186+
· pick a node for each way missing spatial information
187+
· download them via overpass in bulk
188+
· there was need to limit the download to only 1000 nodes at once, and merge the results later
189+
· merge them into osm-file before crop
190+
191+
• filter out non-highway ways with osmosis instead of overpass → reduces load on overpass server
192+
· allow only highway types with --tag-filter that are allowed for bicyclists
193+
194+
• added handling of deleted ways: osmosis removes deleted items when converting osc→osm
195+
· regex <deleted> → <modified> in osc after simplify change → fixed it.
196+
197+
Testcases:
198+
• ./regional-diff.py -f minutely-796.osc.gz
199+
this includes changeset http://www.openstreetmap.org/api/0.6/changeset/24005065 from user species
200+
there should be 89 ways and 2 relations (all from this changeset)
201+
• ./regional-diff.py -f scripts/637.osc.gz
202+
there should be 5 ways and 2 relations
203+
204+
Notes for the future :
205+
206+
• overpass API does NOT return deleted nodes.
207+
· for ways without spatial information, some nodes (if deleted meanwhile on the server) will not come back on overpass quere → way gets removed (wrongly) on crop
208+
But: this should happen only (rareley) on fresh changesets.
209+
210+
• if a relation modified is only sorted or tag-changed without having modified members in the changesets, this is not reported.

scripts/minutely-796.osc.gz

41.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)