הלוגו של OpenStreetMap OpenStreetMap

היומן של RicoElectrico

רשומות יומן אחרונות

Road Watcher - a simple Python bot to monitor road class changes

פורסם על־ידי RicoElectrico ב־26 באפריל 2024 בEnglish.

There are some object categories in OSM whose exact classification is often a matter of contention and edit wars. Main highways are one of the most prominent examples. There was a small edit war in Poland which resulted in no less than 4 blocks, but I did not let that crisis go to waste:

Behold road-watcher, a quick Python project that regurarly queries Overpass API for highway=secondary and above within a specified boundary and then detects any classification changes, sending them to a Discord channel (though it’s trivial to substitute it with another means of notification).

obraz.png

When do people map in Poland?

פורסם על־ידי RicoElectrico ב־ 4 באוקטובר 2017 בEnglish.

Here’s another analysis made with ChangesetMD. I looked at average changeset count in each hour of the week for Poland. Week begins on Monday (pn).

Some trends are quite interesting. For instance, on Friday evenings people would rather party than map ;)

Also, we can see a little drop on business days around 17. I guess that people are going back from work? Does this imply they’re mapping at work shortly before? :>

graph

Which editor users are more likely to answer changeset discussions?

פורסם על־ידי RicoElectrico ב־ 9 בספטמבר 2017 בEnglish.

Much has been said about users of different OSM editor applications regarding their ability to respond to other users’ feedback about their mapping. But why not let the data speak for themselves?

Here’s a quick chart I made.

chart

I used ChangesetMD to import data into Postgres database, where I did the analysis.

A way to filter out closed notes in .osn files

פורסם על־ידי RicoElectrico ב־ 6 בפברואר 2015 בEnglish.

So the current JOSM release allows you to load and save *.osn files. There is a daily notes dump available at http://planet.osm.org/notes/

But you can’t filter them to only display those that are open. I wanted to find a solution. First, I thought about writing Python or C# app. Turns out there is much simpler solution: XPath is a syntax for XML element selection. With xml_grep from xml-twig-tools package I can apply it to an XML file like this:

xml_grep –exclude /*/note[@closed_at] planet-notes-latest.osn > open_notes.osn

You can of course extend this expression to filter by geographic area or date.