<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The problem with detecting when changesets are closed is that there is no way to determine exactly when they are closed short of an API query. You can fake it by assuming changesets are closed an hour after the last change to them and 24 hours after the first change to them. It is better to detect problems when they occur, not up to 24 hours after they’ve occurred.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> kabum [mailto:uu.kabum@gmail.com] <br><b>Sent:</b> Tuesday, April 03, 2012 2:20 AM<br><b>To:</b> Derick Rethans<br><b>Cc:</b> OpenStreetMap dev list<br><b>Subject:</b> Re: [OSM-dev] Google Summer of Code<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hi,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Am 2. April 2012 22:20 schrieb Paul Norman <<a href="mailto:penorman@mac.com">penorman@mac.com</a>>:<o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Calibri","sans-serif"'>A tool that operates on the changeset level is <a href="https://github.com/pnorman/osm-weirdness" target="_blank">https://github.com/pnorman/osm-weirdness</a></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Calibri","sans-serif"'>It detects changesets that have a high probability  of being an import or mechanical edit. The detection is pretty crude but it does find a fair number of undocumented imports, mechanical edits, and other weirdness. If you point it an old state.txt file it will start in the past and work up to the present.</span><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I've a look later this day on your script.<o:p></o:p></p></div><div><p class=MsoNormal>  <o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Calibri","sans-serif"'>When working with the minutely diffs there are some limitations:</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Calibri","sans-serif"'>Limited knowledge of changesets. In practice, if you start your detection an hour in the past you can have a list of all open changesets, but it is not possible to know the tags of the changesets.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Calibri","sans-serif"'>No knowledge of the previous state of objects. You know where deleted objects were, but you can’t tell how far an object is moved or what it’s tags were before. To tell this you need to query a service with a full history DB, and handling full history files is difficult.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Calibri","sans-serif"'>No knowledge of way geometry if using existing nodes. Iandees’ <a href="https://github.com/pnorman/osm-weirdness/tree/way_check" target="_blank">https://github.com/pnorman/osm-weirdness/tree/way_check</a> solves this by fetching nodes in a way that aren’t also in the changeset from jxapi and it can then detect bad geometry (e.g. ways that trace over themselves)</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Calibri","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Calibri","sans-serif"'>If you were to code a vandalism detection tool I think it should work on the minutely replication diffs (<a href="http://wiki.openstreetmap.org/wiki/Planet.osm/diffs" target="_blank">http://wiki.openstreetmap.org/wiki/Planet.osm/diffs</a>)</span><o:p></o:p></p></div></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I thought about analyse the data after the changeset is closed, but this diffs sounds also good. I will check this way :) Thanks!<o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div></div><div><p class=MsoNormal>Am 3. April 2012 09:38 schrieb Derick Rethans <<a href="mailto:osm@derickrethans.nl">osm@derickrethans.nl</a>>:<o:p></o:p></p><div><p class=MsoNormal style='margin-bottom:12.0pt'>On Mon, 2 Apr 2012, kabum wrote:<br><br>> Result:<br>> - each changeset has a total rating -> use a treshold value to divide them<br>> into suspicious and not suspicious<o:p></o:p></p></div><p class=MsoNormal>Instead of just using static thresholds, I think that something like SVM<br>(<a href="http://en.wikipedia.org/wiki/Support_vector_machine" target="_blank">http://en.wikipedia.org/wiki/Support_vector_machine</a>) might be highly<br>benificial here; and it's another cool technology to play with. There is<br>a cool library for this (<a href="http://www.csie.ntu.edu.tw/~cjlin/libsvm/" target="_blank">http://www.csie.ntu.edu.tw/~cjlin/libsvm/</a>) and<br>I know there is at least an extension to use it from PHP:<br><a href="http://phpir.com/support-vector-machines-in-php" target="_blank">http://phpir.com/support-vector-machines-in-php</a><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks for this method ... seems to be very suitable for our use case.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I've already some years of experience of PHP, but I wouldn't prefer it for this part of the project. I thought about Python (libsvm has native Python bindings ;)) <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal style='margin-bottom:12.0pt'><br>> Some questions came up within this preparation:<br>> - Is there a prefered language? Has this to be specified within the<br>> proposal? (language skill has to be rated, so I would decide this during<br>> the project phase)<o:p></o:p></p></div><p class=MsoNormal>Not really any preferred language. What did you have in mind? For the<br>front end I was thinking PHP, but the engine, I wouldn't know. I think<br>something high performant (so C or C++) might be benificial.<o:p></o:p></p></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><p class=MsoNormal><br>My thoughts were that it's easy to setup and it's capable to call it easy from a terminal or to include it in other python scripts (i.e. web frontend).<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>If C++ is necessary, because of it's speed, then I think I could master this. In the passed semester I participated in a software engineering partical training at university (in a team of five fellow students), where we have an extensive use of C++ (<a href="https://github.com/brainafk/Empire">https://github.com/brainafk/Empire</a>).<o:p></o:p></p></div></div><div><p class=MsoNormal> <o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><p class=MsoNormal style='margin-bottom:12.0pt'><br>> - I also would like to discuss used libraries and framework within the<br>> project phase, or should I decide this also in my proposal?<br>> - Should the frontend integrate in the current website (ruby on rails<br>> project) or should this just be an optional feature?<o:p></o:p></p></div><p class=MsoNormal>I think it can easily live as it's own website.<o:p></o:p></p></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Ok :)<o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><p class=MsoNormal style='margin-bottom:12.0pt'><br>> - How detailed should be the proposal? Is it enough to formulate this draft?<o:p></o:p></p></div><p class=MsoNormal>That's a tricky one, the more information you provide the better I<br>think, as it shows you have thought about it :-)<o:p></o:p></p></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I think it grows a lot by this discussion and I try to be as detailed as possible. :)<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks for the response :)<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Regards,<o:p></o:p></p></div><div><p class=MsoNormal>Morris<o:p></o:p></p></div></div></div></div></div></body></html>