Making the core open street map site + data more useful with structured data

Posted by CloCkWeRX on 21 December 2013 in English (English)

I decided to search for my local pizza place on google. I got a fairly good hit via their google+ listing, but their actual website was missing.

The node that I’d tagged myself is fairly well described, and I ended up updating both Google mapmaker and OSM.

It occurs to me that even if we’re not trying to compete with google in the local business listings, it would be interesting if we could build on it. If I’ve mapped an area, I want others to benefit from the data I’ve created.

Take for example, amenity=restaurant.

We know about 350,000+ of them:

325 659 have names. 150 598 have cusines. 44 900 have websites. 36 416 have phones.

Imagine if we were to change

to render

… when we had enough authoritive data.

Google Rich Snippets ( are just one of the benefits -, with RDFa would enable OSM to very quickly join the linkeddata ( web, and possibly provide a real world application or two in doing so (as compared to which is great, but I’ve never used as an end consumer for example).

Comment from mcld on 22 December 2013 at 15:31

Basic idea sounds OK to me. It’s one of those things that the core website maintainers might consider out of scope, especially if there’s loads of logic needed in the rendering (e.g. a special code-path just to render restaurant pages, simply in order to add the extra markup for restaurants - that would be horrible for maintenance, let alone efficiency).

Note that this schema stuff isn’t the same as RDFa. Personally I think an approach I’d prefer (and one which is more likely to get accepted) would be to mark up the current OSM details pages with RDFa using an ontology specifically for representing OSM as Linked Data; then, it’s possible for services outside of the main OSM website to declare “sameAs” relationships and add joined-up thinking without imposing complications on the core server.

Comment from CloCkWeRX on 22 December 2013 at 22:11

With the RDFa vs question, I was aiming at using the vocabularies expressed as RDFa lite -

I’m not as sure about an OSM specific vocabulary. already does a translation of our schema, which is in flux at any given time; and while based triples are arguably more authoritative, is there value in simply repeating the same assertations?

My gut feel is “maybe not” - for the semwebbers that want to use the data, linkedgeodata is likely good enough; providing SPARQL endpoints, browsing services and more.

Mappings at:

My main argument for using to add value would be to: * Mint mostly stable URIs for POI ( looks like a resource) * Focus on the core enrichment of records where we know an end user will actually benefit. * Make it really easy to go from “rich record presented in a search” to “update information”

An alternative might be to enhance nominatim with similar details ( ) - that’s pretty much a structured data browser page right now.

Comment from mcld on 22 December 2013 at 22:52

Oh, I guess I hadn’t really realised that linkedgeodata was already pretty much osm in rdf! So that means that osm has already “joined the linkeddata web” as you put it.

So then, the separate question of whether to use - looks fine, but as I say, there’s probably a fair amount of logic needed before the HTML will pop out in format (since schema/Restaurant needs different properties than schema/Park etc.)

Here’s a thought: what about simply using the fairly generic Place schema? That would be a first step, and it could be something we could add to pretty much all osm objects, so it needs no extra logic in the web server. Mmm well maybe a bit of extra logic.

I’ve no idea if it would be sufficient for Google Rich Snippets and other nice things - do you think it would be worth it? (I don’t honestly know what kinds of benefits come from using tagging.)

Comment from CloCkWeRX on 22 December 2013 at 23:10

Yeah, Place ftw. - turns out to be fairly straight forward to do very simple mappings.

The logic required is most likely going to be for things like - Where there is a wikipedia key, translate to full URI - Opening hours, if valid, should translate differently - Where there are multiple valid mappings (building=foo, amenity=bar, parking=yes) returning an array of valid properties.

Login to leave a comment