<div dir="ltr">Hi Richard,<div><br><div>> clever query or script<br></div><div><br></div><div>maybe you can use OSM OPL format this ad-hoc query, </div><div>and process the data with sed, awk, grep .</div><div><br></div>
<div>my draft ubuntu script - with comments.<br> <a href="https://gist.github.com/ImreSamu/be49fd1ce511975325d2#file-bridge_swing-sh">https://gist.github.com/ImreSamu/be49fd1ce511975325d2#file-bridge_swing-sh</a></div>
<div><br></div><div>result ( Overpass-Wizard Query - but you can export the data to JOSM )</div><div> <a href="https://gist.github.com/ImreSamu/a2dd0a8c25f0fea5284c#file-bridge_swing_overpass_wizard-md">https://gist.github.com/ImreSamu/a2dd0a8c25f0fea5284c#file-bridge_swing_overpass_wizard-md</a><br>
<br><br></div><div>the example result - Overpass-Wizard Query :</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font color="#0000ff">type:way and ( id:28134411 or id:29295367 or id:30178341 or id:30178382 or id:33132931 or id:33132936 or id:33132949 ) global</font></div>
</blockquote><div><br></div><div><font color="#000000">( <span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;font-style:italic;line-height:16.7999992370605px;white-space:pre"><a href="http://wiki.openstreetmap.org/wiki/Overpass_turbo/Wizard">http://wiki.openstreetmap.org/wiki/Overpass_turbo/Wizard</a> -> see "Meta-Data Filters" )</span></font></div>
<div><i style="color:rgb(0,0,0);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace"><div style="display:inline!important"><span style="font-size:12px;line-height:16.7999992370605px;white-space:pre"><br>
</span></div></i></div><div><i style="color:rgb(0,0,0);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace"><div style="display:inline!important"><span style="font-size:12px;line-height:16.7999992370605px;white-space:pre">How to check the query</span></div>
</i></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><i style="color:rgb(0,0,0)"><div style="display:inline!important"><span style="line-height:16.7999992370605px;white-space:pre"><font face="times new roman, serif" size="1">* go <a href="http://overpass-turbo.eu/">http://overpass-turbo.eu/</a></font></span></div>
</i></div><div><font color="#000000" face="times new roman, serif" size="1"><i><div><span style="line-height:16.7999992370605px;white-space:pre">* select "Wizard"</span></div></i></font></div><div><font color="#000000" face="times new roman, serif" size="1"><i><div>
<span style="line-height:16.7999992370605px;white-space:pre">* copy /paste the generated query : " type:way and ( id:27001207 or id:72584563 ) global"</span></div></i></font></div><div><font color="#000000" face="times new roman, serif" size="1"><i><div>
<span style="line-height:16.7999992370605px;white-space:pre">* "Build and run query" -> and check the result.</span></div></i></font></div><div><font color="#000000" face="times new roman, serif" size="1"><i><div>
<span style="line-height:16.7999992370605px;white-space:pre">* if you got timeout error, then check the generated script timeout ( "<osm-script output="json" timeout="25">" ) and set to 200 - and rerun </span></div>
</i></font></div><div><font color="#000000" face="times new roman, serif" size="1"><i><div><span style="line-height:16.7999992370605px;white-space:pre">* you can "load data into an OSM editor: JOSM," - see "Export" menu</span></div>
</i></font></div></blockquote><div><div><br></div><br><br>From the OSM OPL history - very easy to grep the first contributor </div><div><br></div><div><pre class="" style="margin-top:0px;margin-bottom:0px;width:2449px">
<div class="" id="file-bridge_swing-sh-LC58" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px">
<span class="" style="color:rgb(153,153,136);font-style:italic"># convert the osm history file to OPL ( </span><span class="" style="font-style:italic"><font color="#20124d"><b>osmium cat w11323607.osh -f opl</b></font></span><span class="" style="color:rgb(153,153,136);font-style:italic"> )</span></div>
<div class="" id="file-bridge_swing-sh-LC59" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px"><span class="" style="color:rgb(153,153,136);font-style:italic"># sample OSM History OPL file:</span></div>
<div class="" id="file-bridge_swing-sh-LC60" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px"><span class="" style="color:rgb(153,153,136);font-style:italic"># w100646626 v1 dV c7343540 t2011-02-20T15:08:57Z i37137 uDerick%0020Rethans Tbridge=yes,highway=footway Nn309461645,n1163494643</span></div>
<div class="" id="file-bridge_swing-sh-LC61" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px"><span class="" style="color:rgb(153,153,136);font-style:italic"># w100646626 v2 dV c12447614 t2012-07-23T09:52:38Z i404175 urickogden Tbridge=swing,highway=footway Nn309461645,n1163494643</span></div>
<div class="" id="file-bridge_swing-sh-LC62" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px"><span class="" style="color:rgb(153,153,136);font-style:italic"># w100646626 v3 dV c18538313 t2013-10-25T16:16:57Z i24119 uMauls Tbridge=swing,highway=footway Nn309461645,n2508499967</span></div>
<div class="" id="file-bridge_swing-sh-LC63" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px"><span class="" style="color:rgb(153,153,136);font-style:italic"># w100646626 v4 dV c25024407 t2014-08-26T10:51:45Z i66391 ugeozeisig Tbridge=movable,bridge:movable=swing,highway=footway Nn309461645,n2508499967</span></div>
<div class="" id="file-bridge_swing-sh-LC64" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px"><span class="" style="color:rgb(153,153,136);font-style:italic"># w100646626 v5 dV c25050883 t2014-08-27T12:42:02Z i66391 ugeozeisig Tbridge=swing,highway=footway Nn309461645,n2508499967</span></div>
<div class="" id="file-bridge_swing-sh-LC65" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px"><span class="" style="color:rgb(153,153,136);font-style:italic">#</span></div>
<div class="" id="file-bridge_swing-sh-LC66" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px"><span class="" style="color:rgb(153,153,136);font-style:italic"># filter the results by the first contributor who added bridge=swing to the way </span></div>
<div class="" id="file-bridge_swing-sh-LC66" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px"><span class="" style="color:rgb(153,153,136);font-style:italic"># ( </span><span class="" style="font-style:italic"><font color="#20124d"><b>egrep -m 1 '( T|,)bridge=swing'</b></font></span><span class="" style="color:rgb(153,153,136);font-style:italic"> )</span></div>
<div class="" id="file-bridge_swing-sh-LC67" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px"><span class="" style="color:rgb(153,153,136);font-style:italic">#result: v2</span></div>
<div class="" id="file-bridge_swing-sh-LC68" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px"><span class="" style="color:rgb(153,153,136);font-style:italic"># w100646626 v2 dV c12447614 t2012-07-23T09:52:38Z i404175 urickogden Tbridge=swing,highway=footway Nn309461645,n1163494643</span></div>
<div class="" id="file-bridge_swing-sh-LC69" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px"><span class="" style="color:rgb(153,153,136);font-style:italic">#</span></div>
<div class="" id="file-bridge_swing-sh-LC70" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px"><br></div><div class="" id="file-bridge_swing-sh-LC70" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px">
The OPL format - from the OSMIUM manual:</div></pre></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><pre class="" style="margin-top:0px;margin-bottom:0px;width:2449px"><div class="" id="file-bridge_swing-sh-LC70" style>
<font color="#333333" face="arial narrow, sans-serif"><span style="line-height:16.7999992370605px">v - Version</span></font></div></pre></div><div><pre class="" style="margin-top:0px;margin-bottom:0px;width:2449px"><div class="" id="file-bridge_swing-sh-LC70" style>
<font color="#333333" face="arial narrow, sans-serif"><span style="line-height:16.7999992370605px">d - Deleted flag ('V' - visible or 'D' - deleted)</span></font></div></pre></div><div><pre class="" style="margin-top:0px;margin-bottom:0px;width:2449px">
<div class="" id="file-bridge_swing-sh-LC70" style><font color="#333333" face="arial narrow, sans-serif"><span style="line-height:16.7999992370605px">c - Changeset ID</span></font></div></pre></div><div><pre class="" style="margin-top:0px;margin-bottom:0px;width:2449px">
<div class="" id="file-bridge_swing-sh-LC70" style><font color="#333333" face="arial narrow, sans-serif"><span style="line-height:16.7999992370605px">t - Timestamp (ISO Format)</span></font></div></pre></div><div><pre class="" style="margin-top:0px;margin-bottom:0px;width:2449px">
<div class="" id="file-bridge_swing-sh-LC70" style><font color="#333333" face="arial narrow, sans-serif"><span style="line-height:16.7999992370605px">i - User ID</span></font></div></pre></div><div><pre class="" style="margin-top:0px;margin-bottom:0px;width:2449px">
<div class="" id="file-bridge_swing-sh-LC70" style><font color="#333333" face="arial narrow, sans-serif"><span style="line-height:16.7999992370605px">u - Username</span></font></div></pre></div><div><pre class="" style="margin-top:0px;margin-bottom:0px;width:2449px">
<div class="" id="file-bridge_swing-sh-LC70" style><font color="#333333" face="arial narrow, sans-serif"><span style="line-height:16.7999992370605px">T - Tags</span></font></div></pre></div><div><pre class="" style="margin-top:0px;margin-bottom:0px;width:2449px">
<div class="" id="file-bridge_swing-sh-LC70" style><font color="#333333" face="arial narrow, sans-serif"><span style="line-height:16.7999992370605px">x - Longitude (nodes only)</span></font></div></pre></div><div><pre class="" style="margin-top:0px;margin-bottom:0px;width:2449px">
<div class="" id="file-bridge_swing-sh-LC70" style><font color="#333333" face="arial narrow, sans-serif"><span style="line-height:16.7999992370605px">y - Latitude (nodes only)</span></font></div></pre></div><div><pre class="" style="margin-top:0px;margin-bottom:0px;width:2449px">
<div class="" id="file-bridge_swing-sh-LC70" style><font color="#333333" face="arial narrow, sans-serif"><span style="line-height:16.7999992370605px">N - Nodes (ways only)</span></font></div></pre></div><div><pre class="" style="margin-top:0px;margin-bottom:0px;width:2449px">
<div class="" id="file-bridge_swing-sh-LC70" style><font color="#333333" face="arial narrow, sans-serif"><span style="line-height:16.7999992370605px">M - Members (relations only)</span></font></div></pre></div></blockquote>
<div><pre class="" style="margin-top:0px;margin-bottom:0px;width:2449px"><div class="" id="file-bridge_swing-sh-LC70" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px">
<br></div><div class="" id="file-bridge_swing-sh-LC70" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px">you can find other interesting examples in the OSMIUM manual</div>
</pre></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><pre class="" style="margin-top:0px;margin-bottom:0px;width:2449px"><div class="" id="file-bridge_swing-sh-LC70" style><font color="#333333"><span style="line-height:16.7999992370605px"><font face="Consolas, Liberation Mono, Menlo, Courier, monospace">"Find all users who have created post boxes:"</font></span></font></div>
</pre></div><div><pre class="" style="margin-top:0px;margin-bottom:0px;width:2449px"><div class="" id="file-bridge_swing-sh-LC70" style><font color="#333333"><span style="line-height:16.7999992370605px"><font face="times new roman, serif">egrep ' v1 ' data.osm.opl | egrep 'amenity=post_box' | cut -d' ' -f7 | cut -c2- | sort -u</font></span></font></div>
</pre></div><div><pre class="" style="margin-top:0px;margin-bottom:0px;width:2449px"><div class="" id="file-bridge_swing-sh-LC70" style><span class="" style="color:rgb(153,153,136);font-size:12px;line-height:16.7999992370605px;font-style:italic"><font face="times new roman, serif"> </font></span></div>
</pre></div></blockquote><div><pre class="" style="margin-top:0px;margin-bottom:0px;width:2449px"><div class="" id="file-bridge_swing-sh-LC70" style><span class="" style="white-space:normal"><font face="arial">
</font></span></div><div class="" id="file-bridge_swing-sh-LC70" style><span class="" style="color:rgb(153,153,136);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;font-style:italic"><br>
</span></div></pre><div>OSMIUM tool - and more examples :</div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><a href="http://osmcode.org/libosmium/manual/libosmium-manual.html#output-formats">http://osmcode.org/libosmium/manual/libosmium-manual.html#output-formats</a></div>
</div><div><div><a href="https://www.sotm-eu.org/en/slots/36">https://www.sotm-eu.org/en/slots/36</a></div></div><div><div><a href="https://www.sotm-eu.org/slides/44.pdf">https://www.sotm-eu.org/slides/44.pdf</a></div></div>
<div><br></div></blockquote><div><br></div><div><br></div><div>Imre</div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-08-28 12:39 GMT+02:00 Richard Z. <span dir="ltr"><<a href="mailto:ricoz.osm@gmail.com" target="_blank">ricoz.osm@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
trying to clean up bridge=swing as far as possible. There was at least<br>
user in the past who used the combination systematically wrong, so I want<br>
to split the result by user who introduced the bridge=swing.<br>
<br>
To make things complicated - a few days ago one contributor did a well<br>
meant effort to convert all<br>
bridge=swing -> bridge=movable+bridge:movable=swing<br>
and reverted that edit because there were too many errors in it. Hence<br>
doing a naive search for user doesn't work.<br>
<br>
So I want to :<br>
* find all bridge=swing<br>
* split results by the first contributor who added bridge=swing<br>
to the way<br>
* get the results into JOSM for examination and editing<br>
<br>
Tia for any hints,<br>
Richard<br>
<br>
_______________________________________________<br>
talk mailing list<br>
<a href="mailto:talk@openstreetmap.org">talk@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/talk" target="_blank">https://lists.openstreetmap.org/listinfo/talk</a><br>
</blockquote></div><br></div>