User:CitySketcher/Project Waimate
Background
This page, and Project Waimate, are a work in progress!
I'm staying in Waimate for a few weeks over new year 2021-2022. I noticed that there was very little infrastructure on the map, so I decided I'd spend some time mapping as much as possible. This is Project Waimate.
Previously missing features
- Almost all building outlines.
- Almost all POIs like shops, especially on Queen Street, though churches are already mapped well.
- Green area details.
- Pedestrian features like footpaths, benches, picnic tables, drinking fountains, playground equipment.
- All car parks.
Strategy
- Draw building outlines using aerial imagery and RapiD based on the LINZ building outlines dataset.
- If I cannot align existing address nodes to the outlines based on imagery, visit the houses.
- Survey green areas, pedestrian features, and POIs on foot, noting elements using GeoNotes and then entering data at the computer.
- Add road details through StreetComplete surveys.
- Record my trips using OsmAnd, then use the GPX data to add any footways and paths that aren't already plotted. The aerial imagery is aligned, but it may be obscured by buildings or trees, so being able to refer to a map trace is very helpful as an alternative.
- TODO: Upload the traces to help other editors?
Reports
Generating reports to see statistics about what I've done.
I will use the bounding box -44.7523,171.0214,-44.7217,171.0629
for all queries to keep things consistent. This area extends to include Knottlingly Park in the south, the whole of Mill Road in the west, Cashel Street in the north, and the residential area along Timaru Road in the east.
Most active users
This counts how many objects each user has created or edited. I don't know how to do this in Overpass only so I'm using fish shell to count changes and generate wikitable syntax.
Shortcomings of counting edits
Counting edits is useful for getting a general overview of which people have spent the most time on the map, but it is never going to be an accurate assessment of any kind of "value" of their edits.
- This counter only counts the last editor of each object. If somebody draws a road, and somebody else adds tags for whether the road has pavements, the whole road is worth 1 credit for the second person and 0 credits for the first person.
- Depending on the counting method, a 4-sided house might be worth 5 credits, 1 for each of the 4 nodes and 1 for the closed way. However, in this count, I have only considered elements that have tags, so each way is 1 credit no matter its size.
- Some edits may be graffiti. The counters don't know whether you've just created a major highway or a pictogram of a middle finger made of highways.
- Some edits may be more accurate than others. An on-the-ground survey of a building is more likely to discover the correct opening hours than if the opening hours were added by an armchair mapper referencing an out-of-date website. (I still love you, armchair mappers <3)
- Some objects are much more complex than others. For example, a
amenity=place_of_worship
building has complex outlines and may have many attribute tags compared to ahighway=crossing
which is a single node at the intersection of two existing ways with no other tags. Adding the church is worth 1 credit, and adding the crossing is worth 3 credits. - Some objects are more practically useful than others. Adding an
natural=tree
has very little impact to almost everybody. Joining existing bus stops with a bus route relation will likely help many pedestrians travel a city quickly and easily. Adding anamenity=hospital
oramenity=vetinary
could save lives.
Query code
printf '{| class="wikitable"\n|-\n! Username !! Objects edited\n'; curl -Ss https://overpass-api.de/api/interpreter -d '[bbox:-44.7523,171.0214,-44.7217,171.0629][out:csv(::user; false)]; nwr(if:count_tags() > 0); out meta;' | string replace -ir '.*linz.*' '[linz data importers]' | sort | uniq -c | sort -nr | while read count user; printf '|-\n| %s || %s\n' $user $count; end; printf '|}\n'
Results
Username | Objects edited |
---|---|
cityofgod | 4437 |
[linz data importers] | 928 |
Robert Ancell | 245 |
Rudy355 | 127 |
Aleksandar Matejevic | 33 |
aleksaJov | 7 |
SteveFish | 6 |
Friendly_Ghost | 6 |
lcmortensen | 5 |
kylenz | 5 |
TaraV | 4 |
DoubleA | 3 |
AndjelaS | 2 |
Wallip | 1 |
Shengnan Song | 1 |
pizzaiolo | 1 |
locke | 1 |
gunnar1m | 1 |
b-jazz-bot | 1 |
Though the results aren't visible on a map, you can also open the query in overpass turbo. https://overpass-turbo.eu/s/1ePn
Types of features edited by me
Background
OpenStreetMap tagging is famously freeform, so first I need to figure out which tags I want to analyse as features. I did this by querying everything, and then gradually iterating on the query by removing features. I ended up with this:
[bbox:-44.7523,171.0214,-44.7217,171.0629];
nw(if:count_tags()>0)[!highway][!building][!"addr:housenumber"][!landuse][!amenity][!leisure][!natural][!barrier][!tourism][!playground][!disc_golf][!historic][!attraction][!man_made][!shop];
out tags center;
This means that I care about features with these keys: highway, building, address, landuse, amenity, leisure, natural, barrier, tourism, playground, disc_golf, historic, attraction, man_made, shop.
After separating those keys, the remaining few features were not important to me, so that is my final list of keys to analyse.
For some of the keys, like amenity
, the value is also important since the value of the amenity key says what type of amenity it is. For other features, like addresses which are represented by addr:housenumber
, the type of feature is already known and it would be silly to try to separate the values from each other.
I decided to render my results as a table, and to only include table rows where there were at least 2 objects edited.
Now that I know what I am looking for, I can write a query.
Note that some keys may be counted twice in the table, due to the aggregate count first and then the individual value counts afterwards. Some keys are only in the first section, some keys are only in the second section, and some are in both.
Query code
printf '{| class="wikitable sortable"\n|-\n! Key !! Value !! Count\n'; curl -Ss https://overpass-api.de/api/interpreter -d '
[bbox:-44.7523,171.0214,-44.7217,171.0629]
[out:csv(count, key, value; false)];
(
make x key="addr:housenumber", type="node";
make x key="attraction", type="node;way";
make x key="barrier", type="node;way";
make x key="building", type="way";
make x key="disc_golf", type="node;way";
make x key="highway", type="way";
make x key="historic", type="node;way";
make x key="landuse", type="way";
make x key="playground", type="node;way";
make x key="shop", type="node;way";
make x key="tourism", type="node;way";
);
foreach->.feature_key {
nwr(user:cityofgod)(if: t[feature_key.u(t["key"])] && lrs_in(type(), feature_key.u(t["type"])));
make x key=feature_key.u(t["key"]), count=count(nwr);
out;
};
(
make x key="building", type="way";
make x key="amenity", type="node;way";
make x key="highway", type="way";
make x key="leisure", type="node;way";
make x key="man_made", type="node;way";
make x key="natural", type="node;way";
make x key="shop", type="node;way";
);
foreach->.feature_key {
nwr(user:cityofgod)(if: t[feature_key.u(t["key"])] && lrs_in(type(), feature_key.u(t["type"])));
for (t[feature_key.u(t["key"])]) (
make x key=feature_key.u(t["key"]), value=_.val, count=count(nwr);
out;
);
};
' | while read count key value; test $count -ge 2; and printf '|-\n| %s || %s || %s\n' $key $value $count; end; printf '|}\n'
Results
Key | Value | Count |
---|---|---|
addr:housenumber | 1188 | |
attraction | 4 | |
barrier | 57 | |
building | 2550 | |
disc_golf | 27 | |
highway | 246 | |
historic | 2 | |
landuse | 80 | |
playground | 41 | |
shop | 32 | |
tourism | 8 | |
building | church | 3 |
building | commercial | 2 |
building | detached | 1080 |
building | garage | 651 |
building | garages | 2 |
building | house | 8 |
building | kindergarten | 3 |
building | residential | 9 |
building | roof | 14 |
building | school | 11 |
building | semidetached_house | 26 |
building | shed | 7 |
building | terrace | 8 |
building | yes | 720 |
amenity | bench | 115 |
amenity | bicycle_parking | 12 |
amenity | cafe | 2 |
amenity | clock | 2 |
amenity | community_centre | 2 |
amenity | drinking_water | 15 |
amenity | fast_food | 3 |
amenity | fuel | 2 |
amenity | kindergarten | 2 |
amenity | parking | 35 |
amenity | place_of_worship | 6 |
amenity | public_bookcase | 3 |
amenity | school | 3 |
amenity | shelter | 8 |
amenity | toilets | 4 |
amenity | waste_basket | 42 |
highway | footway | 71 |
highway | path | 7 |
highway | primary | 5 |
highway | residential | 83 |
highway | service | 50 |
highway | steps | 7 |
highway | tertiary | 11 |
highway | track | 2 |
highway | unclassified | 10 |
leisure | fitness_station | 4 |
leisure | garden | 8 |
leisure | park | 4 |
leisure | picnic_table | 20 |
leisure | pitch | 36 |
leisure | playground | 8 |
leisure | swimming_pool | 4 |
leisure | track | 3 |
man_made | drinking_fountain | 14 |
man_made | mast | 2 |
man_made | silo | 4 |
man_made | tower | 2 |
natural | tree | 122 |
natural | tree_row | 4 |
natural | water | 2 |
shop | agrarian | 2 |
shop | clothes | 6 |
shop | collector | 2 |
shop | hairdresser | 2 |
shop | vacant | 3 |
Conclusions
- Buildings and addresses were my most edited feature. Of buildings, detached and garage were the most common values. This makes sense since Waimate is primarily a low density residential town, and most of the town's area is taken up by detached houses.
- After this, the element counts drop significantly. The next largest is natural=tree with 122 uses. I added trees based on aerial imagery and scattered them around in parks where I felt like it. Trees are commonly planted physically close to each other and they are very quick to add based on imagery, making them my second most added feature.
- My third most added feature was benches with the tag amenity=bench. I was expecting benches to feature high on the list since they are one of the things I was paying the most attention to while journeying through the town. They are also quick to survey, even though I take the time to add the backrest, armrest, material, and sleepable status for each bench. I either add them by photographing them with GeoNotes, or writing a short text description of their features.
GPS tracks and distance travelled
TODO
Ideas for the future
I want software which takes spoken audio from me, notes my current location, processes my words into text, creates a point of interest based on my commands, and adds it to a GeoJson file with the correct tags which I can very quickly bulk review and import using JOSM later when I get home. This would also make it much easier to survey while riding in a vehicle, because buses and cars move so fast that I would miss features if I looked down at my phone to write a note, and using a phone while riding a bicycle would be dangerous unless I stopped and dismounted each time I had something to take a note of.