Skip to content

Added RDFa support for browse/node #173

Open
wants to merge 2 commits into from

6 participants

@tommorris

RDFa allows HTML to contain rich semantics. The RDFa added here allows for RDFa-aware processors to extract the latitude and longitude of points.

The vocabulary used is the W3C's Basic Geo WGS84 vocabulary. This vocabulary is in widespread use (for instance, on dbpedia.org, an RDF version of Wikipedia).

RDFa works perfectly well with the existing geo microformat.

@tommorris tommorris added RDFa to browse/node pages
RDFa allows HTML to contain rich semantics. The RDFa added here
allows for RDFa-aware processors to extract the latitude and
longitude of points.

The vocabulary used is the W3C's Basic Geo WGS84 vocabulary
available at <http://www.w3.org/2003/01/geo/>. This vocabulary
is in widespread use (for instance, on dbpedia.org, an RDF
version of Wikipedia).
00cb7b1
@tomhughes
OpenStreetMap on GitHub member

I guess my main question about this is, what benefit exactly does it bring us, or allow us to provide to other people, and how widespread is it really, or is it just another bit of pie in the sky?

I mean I was persuaded to add the current microformat stuff, which as far as I know has never been by anybody for anything. Now we have this RDFa thing (and we all know what a huge success RDF has been...) and researching it I see HTML5 has added a new microformat system in parallel to adding RDFa support (which is a WTF in itself) and somebody will no doubt be trying to add that soon...

On the technical side it mostly appears fine, having plowed through a heap of specs, although I'm still not quite clear if using xmlns to specify the prefix is correct, or if we should be using prefix instead of, or as well as, xmlns.

@tommorris

Well, the main benefit I see RDFa implementation providing is being able to link OpenStreetMap data together with other published online datasets like dbpedia. Being able to explicitly declare equivalencies (e.g. that the river Thames is the same as the river Thames).

The key benefit that adding both microformats and RDF brings is that it allows reuse of basic metadata without having to learn how to use the API. Sites like BBC Wildlife Finder show the possibilities that flow from simple merging of linked data.

Regarding microdata, both can be used simultaneously. It was added unilaterally by the editor of the HTML5 specification because he decided that RDFa was too complicated. It provides a fairly limited subset of what RDFa provides. The main use of microdata has been by Schema.org, and they allow both microdata and RDFa. RDFa was in fairly wide use on the web before the introduction of microdata.

Regarding the use of prefix, yes, that is correct: prefix is preferable to xmlns. I'll fix that.

@GWHAThistory
@woodpeck
woodpeck commented Dec 2, 2012

In that case, using OSM object IDs is not the right approach as they are not stable.

"Stable IDs" is a discussion we've been having for years, and Roland Olbricht has implemented something like that in Overpass (see http://wiki.openstreetmap.org/wiki/Overpass_API/Permanent_ID).

Simply slapping RDF on top of our database and thereby declaring our existing IDs permanent doesn't cut it. http://www.openstreetmap.org/browse/way/8125890 could be the River Thames today, and a nearby house tomorrow. It would be foolish to link to objects from the outside by their ID; a software solution like Roland's is required to make this work reliably.

@tommorris

@woodpeck: Expressing existing data as RDF doesn't mean it has to be permanent. Permanent IDs would be nice, but waiting for permanent IDs before supporting RDFa is making the perfect the enemy of the good.

@tomhughes
OpenStreetMap on GitHub member

I guess the question is, can anybody given a concrete example of a way in which this data might be used?

Bearing in mind that we generally discourage scraping of the browse pages, and expect people wanting to use our data in a mechanical fashion to use the API or a data dump designed for such purposes...

@Jonobennett

Does http://linkedgeodata.org not provide this service anyway?

@GWHAThistory
@CloCkWeRX

I'd be a quite big +1 to this - its not obvious that adding a simple geo:Point will add much value; but if you consider other vocabularies (ie: schema.org Restaurants) and google's Rich Snippets; you suddenly get for very little effort a lot more value from the tags people add to the map.

A bit more on it http://www.openstreetmap.org/user/CloCkWeRX/diary/20595

Example code:
https://github.com/CloCkWeRX/openstreetmap-website/tree/add_schema_org

@woodpeck
woodpeck commented Jan 4, 2014

Let's not encourage more load on our API - this API is for editing and not for powering third-party applications.

@CloCkWeRX
@woodpeck
woodpeck commented Jan 5, 2014

Apologies. I was under the impression that you wanted to change the structure so that more third-party applications could crawl/use our pages.

@vikasTmz vikasTmz added a commit to vikasTmz/openstreetmap-website that referenced this pull request Mar 26, 2016
@vikasTmz vikasTmz Removed whitespace @ #173 58264dc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.