Online Access

Online access is provided via a SPARQL-Endpoint and a LinkedData-Interface. Downloads are available here.
These online accessible datasets are based on an OSM plant dump from April 2010.
There are plans to synchronize the Linked Geo Data datasets with the OSM minutely replicates in the near future, however this feature is currently not available.

NEW! Public SPARQL Endpoint

We now have a SPARQL Endpoint powered by OpenLink's Virtuoso database system.
Currently the reduced Node Tags and Way Tags datasets are loaded.


In this section example queries will be gathered.


Find all schools within a 5km radius around a specific location, and for each school find coffeeshops that are closer than 1km.


PREFIX lgdo: <http://linkedgeodata.org/ontology/>
SELECT ?schoolname ?schoolgeo ?coffeeshopname ?coffeeshopgeo
FROM <http://linkedgeodata.org>
WHERE {
    ?school     a            lgdo:amenity_school .
    ?school     geo:geometry ?schoolgeo .
    ?school     rdfs:label   ?schoolname .

    ?coffeeshop a            lgdo:coffeeshop .
    ?coffeeshop geo:geometry ?coffeeshopgeo .
    ?coffeeshop rdfs:label   ?coffeeshopname .

    FILTER(
        bif:st_intersects (?schoolgeo, bif:st_point (4.89222252.373056), 5) &&
        bif:st_intersects (?coffeeshopgeo, ?schoolgeo, 1)
    ) .
}

click here for query results

The REST interface and the URIs were changed

http://linkedgeodata.org/triplify/node/<id>
was changed to 
http://linkedgeodata.org/triplify/node<id>
(note the missing slash before <id>)
Same pertains to ways.


Also, the distinction between information and non-information resources (the distinction between an entity of osm and what it represents in the real world) is no longer made with hash-URIs, instead 303 redirects are used. This means that

http://linkedgeodata.org/triplify/node2
will redirect to 
http://linkedgeodata/data/node2

Your advantage of this change is, that the new URI format allows for convenient use of namespace prefixes (e.g. SPARQL queries).
The problem with the old format was, that if a URI is represented as <prefix>:<name>, then name may not contain (among others?) the characters '/', '#' and '%', therefore most of the old URIs could not be abbreviated. Also RDF/XML does not allow abbreviation when name starts with a numerical character.


Example of a simple SPARQL query using the new URI format: (SPARQL Endpoint will be loaded at the beginning of July).

Prefix lgd:<http://linkedgeodata.org/triplify/>
Select * {lgd:node264695865 ?p ?o . }


Linked Data

The following REST/Linked Data services are provided:


Obtain information about a particular way (identified by its OSM id):


http://linkedgeodata.org/triplify/way<OSMid>

An example obtaining information about the Alte Mensa at TU Dresden is:



Obtain information about a particular point of interest (identified by its OSM id):


http://linkedgeodata.org/triplify/node<OSMid>

An example obtaining information about the Cafe B'liebig in Dresden is:



Different return formats are supported via content negotiation. Some examples for querying different return formats:


curl -LH "Accept: application/rdf+xml" http://linkedgeodata.org/triplify/way27743320
curl -LH "Accept: text/turtle" http://linkedgeodata.org/triplify/way27743320
curl -LH "Accept: text/plain" http://linkedgeodata.org/triplify/way27743320

Note: 'L' tells curl to follow redirects, 'H' is required to specify the accept header.

REST Interface


Obtain information about points of interest in a circular area:


http://linkedgeodata.org/triplify/near/%latitude%,%longitude%/%radius%

An example obtaining points of interest in a 1000m radius around the center of Dresden is:



Obtain information about points of interest in a circular area having a certain property:


http://linkedgeodata.org/triplify/near/%latitude%,%longitude%/%radius%/%category%

An example obtaining amenities in a 1000m radius around the center of Dresden is:



Obtain information about points of interest in a circular area having a certain property value:


http://linkedgeodata.org/triplify/near/%latitude%,%longitude%/%radius%/%property%=%value%

An example obtaining pubs in a 1000m radius around the center of Dresden is:



Obtain information about points of interest in a circular area belonging to a certain class:


http://linkedgeodata.org/triplify/near/%latitude%,%longitude%/%radius%/class/%class%

An example obtaining places of worship in a 1000m radius around the center of Dresden is:



Obtain information about points of interest in a rectangular area:

(Currently only implemented for points)
http://linkedgeodata.org/triplify/near/<latmin>-<latmax>,<lonmin>-<lonmax>
http://linkedgeodata.org/triplify/near/51.02-51.04,13.72-13.74

Notes

  • latitude and longitude are WGS84 coordinates (do not use scientific notation e.g. 6.0221418E-23)
  • radius is in metres
  • classes are defined in the LGD vocabulary

 
Files [Hide files/form]
Comments [Hide comments/form]

Information

Last Modification: 2010-07-16 16:52:15 by Jens Lehmann