OpenStreetMap

smootheFiets's Diary

Recent diary entries

Log: buildings for follow-up

Posted by smootheFiets on 8 September 2020 in English. Last updated on 11 December 2020.

This is probably not useful to anyone but myself.

Construction

List of buildings that are listed in the BAG as “bouwvergunning verleend” and that I’ve requested to be imported as building=construction. Check in due course whether construction is finished and update!

Ruins

Buildings that I’ve marked as ruins:building=*. Check in due course if they can be deleted or if anything is rebuilt!

Areas that need attention

  • Noordhorn, Moeshorn 15a and surroundings; Langestraat 18c (new?) + 2*18d
  • Leek, North of ‘de Wiecken’

I’ve stopped this project in Sep 2020, mostly because I learned that I had misunderstood the concept of a “shared lane” on Dutch roads. There aren’t nearly as many as I had thought. Another project has spun off, though: checking primary and secondary roads in my area for bike accessibility. Primaries, in particular, are not usually open for bikes: either there’s an adjacent compulsory bike path (typically G12a) or bikes are forbidden explicitly (board NL:C9 or NL:C15). I’ve learned that the hard way when Komoot (based on OSM data) sent me on one such secondary one day. That particular problem was fixed the same day, and it got me started on surveying primaries and secondaries (in person, using Mapillary, or using public data on Dutch road signs) in my area. Here’s the corresponding Overpass query: http://overpass-turbo.eu/s/YvO

Old text below:

I see a tendency to equip more and more local secondary and tertiary highways with either an adjacent bike path or an (advisory) bike lane = fietssuggestiestrook, cycleway=shared_lane in OSM speak. This isn’t always reflected in OSM, yet. I’ve fixed some that I’ve come across, but I suspect there’s many more.

Because I find that they matter for bicycle routing, I’ll try and survey those that I can access easily, in province Groningen. Mapillary will help reduce my mileage. The idea is to tag all secondary and tertiary highways outside of town (buiten de bebouwde kom) with a cycleway tag (cycleway=no if none is present), except if they’re tagged bicycle=no or bicycle=use_sidepath. While I’m at it, I’ll also set mofa and moped tags, surface, and where surveyed locally: smoothness. Things like weight limits, updated speed limits and so on will be by-catch.

Why secondary and tertiary? Primary highways and up don’t come with bike lanes in this country. They typically come with adjacent bike tracks, which are typically mapped already. “Unclassified” highways, on the other hand, are typically too small for bike lanes. This leaves us with secondary and tertiary.

Why out of town? Mostly because I prefer cycling in the nature :) But also because I have the impression that highways in town get a good amount of attention from my fellow mappers, already (which is great!). That’s less true ‘op het platteland.’ That’s where I come in.

Here’s an Overpass query to identify targets:

[out:xml][timeout:90]; 
area[admin_level=4]["name"="Groningen"][boundary=administrative]->.searchArea; // specify: within province (admin_level=4) 
( 
  way[highway ~ '^terti'][!cycleway][!bicycle][maxspeed~'[68]0'](area.searchArea); 
  way[highway ~ '^terti'][!cycleway][bicycle=yes][maxspeed~'[68]0'](area.searchArea); 
  way[highway ~ '^secon'][!cycleway][!bicycle][maxspeed~'[68]0'](area.searchArea); 
  way[highway ~ '^secon'][!cycleway][bicycle=yes][maxspeed~'[68]0'](area.searchArea); 
); 
(._;>;);
out meta;

Note that I’m relying on the maxspeed tag here to exclude highways within town. This isn’t fool-proof and notably excludes highways for which maxspeed isn’t set. You would want to craft your query much more carefully for, say, an automated edit. Since that’s not what I’m planning, I can live with a certain error margin. I’ll sort out the rest later. Low-hanging fruit comes first.

Photomapping with cheapo action cam

Posted by smootheFiets on 13 January 2020 in English.

I got myself a cheap “action cam” straight from China, for little more than 20 EUR. GoPros run easily ten times more than that. So, what can you expect from a budget cam? Turns out, it’s surprisingly useful for photo mapping, with a few gotchas.

Can do / can’t do

  • Photo quality, of course, is mediocre at best. You get what you pay for, no more, no less. Videos look useless (I’ll have to try on a bright, sunny day), sound clearly is useless. There’s a lot of good stuff you can do with daylight pics, however.

  • The cam can be mounted on the bike’s handlebar or carried on a neck strap. Both work. Pictures can be taken with gloves on. That’s surprisingly important in January :)

  • Motion blur is an issue. Shooting sideways on the bike, as good as it sounds for shop mapping and such, won’t work. Shooting forward is OK. Night-time shots are for better cameras; this one won’t cut it.

  • Text won’t be readable unless you’re really close-by. Gotta get a feeling for that.

  • Road geometry, lane number, presence/absence of sidewalks, traffic_calming are very easy to recognize. Extremely useful.

  • Cycleway signs (NL:G11, G12a, G13): easy

(this list to be continued)

Geo-tagging

Of course, the camera itself isn’t GPS aware like its more expensive brethren. It does have a clock, though. Not the most accurate one, but still. JOSM can correlate time to GPX tracks. This works.

EXIF

JOSM relies on time information from the EXIF header. Unfortunately, my particular camera model doesn’t create EXIF headers. Time information is recorded in file time stamps, only.

  • It’s crucial to preserve file time stamps when copying pictures from the cam to the computer (“cp -a” if you speak POSIX).

  • jhead (try “sudo apt-get install jhead” or “brew install jhead” if it isn’t present, already) generates an EXIF header from ctime: “jhead -mkexif -dsft *.jpg”

  • Now pix can be read into JOSM and correlated with the .gpx. For time cross-correlation between cam and GPS, it’s useful to take a pic (or many!) of GPS time. Can be adjusted manually, too. Base this, e.g., on a picture of a landmark taken while riding fast.

Time offset list

This section really won’t matter for anyone but me :) * 2020/01/13: best offset -14 s

Overpass: note to self

Posted by smootheFiets on 5 January 2020 in English. Last updated on 30 March 2020.

I finally figured out how to filter for thingies within, say, the province of Groningen, and to load everything into JOSM:
(this example extracts everything with operator starting in Biblionet; turns out that’s the public libraries operated by Biblionet Groningen)

[out:xml][timeout:90]; 
//{{geocodeArea:Netherlands}}->.searchArea;  // search within entity called Groningen (city) 
area[admin_level=4]["name"="Groningen"][boundary=administrative]->.searchArea; // specify: within province (admin_level=4) 
( 
  node[operator ~ '^Biblionet'](area.searchArea); 
); 
out meta;

Unclassified and residential highways within a place, say Ezinge, plus recursions up and down (partly from this link ):
(One lesson I learned the hard way: it’s dangerous to merge and/or split ways in that type of sparse editing. Do make sure to “download parent ways / relations” in JOSM, and still be careful! It’s very easy to break relations such as bus lines / routes)

[out:xml][timeout:90];
{{geocodeArea:Ezinge}}->.searchArea;  
(
  way[highway~"unclassified||residential"](area.searchArea);
  >;
);
(._;rel(bn););
(._;rel(bw););
(._;rel(br););
out meta;

Equivalently, but specifying that Ezinge is a ‘woonplaats’ rather than any random entity:

[out:xml][timeout:90];
area[admin_level=10]["name"="Ezinge"][boundary=administrative]->.searchArea; 
(
  way[highway~"unclassified||residential"](area.searchArea);
  >;
);
(._;rel(bn););
(._;rel(bw););
(._;rel(br););
out meta;

Useful (for me) admin levels within (ref):

  • NL:
    • 3: country (European part)
    • 4: provincie
    • 8: gemeente
    • 10: woonplaats
  • DE:
    • 2: country
    • 4: Bundesland
    • 5: Regierungsbezirk
    • 6: Kreis / Landkreis / kreisfreie Stadt
    • 7: Verbandsgemeinde / Samtgemeinde o.ä.
    • 8: Gemeinde
    • 9: Bezirk / Gemeindeteil mit Selbstverwaltung
    • 10: … ohne Selbstverwaltung
  • FR:
    • 3: France métropolitaine
    • 4: regions (7 new ones)
    • 6: départements
    • 8: communes

And a query for sparse downloads of things I’m normally interested in while surveying (won’t download “parent relations” of ways, so need to download those manually before splitting/merging ways):

[out:xml][timeout:25][bbox:{{bbox}}];
(
  node[highway];
  way[highway];
  node[amenity=bench];
  node[amenity=bicycle_parking];
  way[amenity=bicycle_parking);
  node[amenity=waste_basket];
  node[amenity=post_box];
  node[leisure=picnic_table];
  node[tourism=picnic_site];
  node[amenity=recycling];
);
// recurse down
( ._; >; )
out meta;

Human-readable output (not for import into JOSM)

Here’s a bit of Overpass goodness I learned while preparing changeset https://www.openstreetmap.org/changeset/79665597:

[out:csv(::id,"duration", "interval","name")];
area[admin_level=6]["name"="Pyrénées-Atlantiques"][boundary=administrative]->.searchArea; 
(
  //relation[duration](area.searchArea);
  relation[interval](area.searchArea);
);
out;

Finds all relations with tag ‘interval’ in département Pyrénées-Atlantiques (64); turns out, that’s for bus lines.

The interesting part, though, is the first line: instead of outputting everything and the kitchen sink as XML (for direct import into JOSM), I only output the specified information: relation ID (so I can load the relation into JOSM if needed), and the specified tags duration, interval, and name.

Another use case for this: usage statistics using regex. I found houses with addr:street tag starting in lower-case (“de Kalverweide”), inconsistent with the street name tagged as “De Kalverweide” (upper case). Lower-case street names seemed obviously wrong to me, so I optimistically changed the addresses in changeset 80142765 and alerted the ‘kadaster’ office. They replied quickly (!) and said I was wrong. The lower-case letter was right, and it’ll stay. That surprised me more than a little. Overpass to the rescue!

[out:csv (::id, "addr:street") ][timeout:125];
{{geocodeArea:Nederland}}->.searchArea;
(
  node["addr:street"~"^de .+"](area.searchArea);
  //node["addr:street"~"^De .+"](area.searchArea);
);
out;

The first query finds all nodes (typically: house addresses) with addr:street starting in “de “ in “Nederland”, the second query finds the upper-case variant. ‘^’ means: start of string, ‘.+’ means: one or more occurrence of “any letter” (so hypothetical streetnames ‘de ‘ of ‘De ‘ are not matched).

There are > 250,000 addresses starting in upper case De, much more than the ~35,000 addresses starting in lower case. The ratio is similar for ‘het ‘ vs. ‘Het ‘. Lower-case street names are exotic in this country but not unheard of. I still find them bizarre, but hey, OSM is about facts, not about my feelings about them. I’ve reverted my first changeset (80199834).

(Note: if I remember correctly, Overpass output can be restricted to just the number of occurrences, not the occurrences themselves. For large numbers of occurrences, that’s the way to go, otherwise output becomes unwieldy. I don’t recall how this works. Also, I prefer seeing the street names matched, so I can visually check that the regex does what it should be doing.)