OpenStreetMap

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:

http://taginfo.openstreetmap.org/tags/amenity=restaurant

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

Imagine if we were to change

http://www.openstreetmap.org/node/1937862511

to render

http://schema.org/Restaurant

... when we had enough authoritive data.

Google Rich Snippets (https://support.google.com/webmasters/answer/99170?hl=en) are just one of the benefits - schema.org, with RDFa would enable OSM to very quickly join the linkeddata (http://linkeddata.org/) web, and possibly provide a real world application or two in doing so (as compared to http://linkedgeodata.org/ 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 osm.org 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.

Hide this comment

Comment from CloCkWeRX on 22 December 2013 at 22:11

With the RDFa vs schema.org question, I was aiming at using the schlema.org vocabularies expressed as RDFa lite - http://schema.org/docs/datamodel.html

I'm not as sure about an OSM specific vocabulary. Linkedgeodata.org already does a translation of our schema, which is in flux at any given time; and while openstreetmap.org 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: https://raw.github.com/GeoKnow/LinkedGeoData/master/linkedgeodata-core/src/main/resources/org/aksw/linkedgeodata/sml/LinkedGeoData-Triplify-IndividualViews.sml

My main argument for using schema.org to add value would be to: * Mint mostly stable URIs for POI (http://www.openstreetmap.org/node/1937862511 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 ( http://open.mapquestapi.com/nominatim/v1/details.php?place_id=20457411 ) - that's pretty much a structured data browser page right now.

Hide this comment

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 schema.org - looks fine, but as I say, there's probably a fair amount of logic needed before the HTML will pop out in schema.org 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 schema.org tagging.)

Hide this comment

Comment from CloCkWeRX on 22 December 2013 at 23:10

Yeah, Place ftw.

https://github.com/CloCkWeRX/openstreetmap-website/tree/add_schema_org - 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 schema.org mappings (building=foo, amenity=bar, parking=yes) returning an array of valid properties.

Hide this comment

Leave a comment

Parsed with Markdown

  • Headings

    # Heading
    ## Subheading

  • Unordered list

    * First item
    * Second item

  • Ordered list

    1. First item
    2. Second item

  • Link

    [Text](URL)
  • Image

    ![Alt text](URL)

Login to leave a comment