W3C home > Mailing lists > Public > www-archive@w3.org > April 2006

Re: SPARQL & SemWeb

From: Christopher Schmidt <crschmidt@crschmidt.net>
Date: Sun, 16 Apr 2006 01:03:03 -0400
To: Luk Vloemans <luk.vloemans@student.uhasselt.be>
Cc: semantic-web@w3.org, www-archive@w3.org
Message-ID: <20060416050303.GC29471@crschmidt.net>

On Fri, Apr 14, 2006 at 10:22:53AM +0200, Luk Vloemans wrote:
> Hey Christopher,
> 
> I was just searching the web for using SemWeb and SparQL to retrieve spatial
> information. The first hit I got was your blog, so I thought you might be
> able to hint me as to a solution?

The quick answer is that there is no simple solution to your problem.
Answering a question using the semantic web is very similar to answering
a question using the regular web: The answer may be out there, but you
may have a hard time finding it on your own, and instead have to go to
some source for a search through collections of documents.

What you would need to answer this question is a Google-like crawler and
database, against which you could perform some sort of queries -- most
likely SPARQL. I built one of these myself on top of redland -- you can
see some of my crawling and other utilities under
http://crschmidt.net/semweb/. However, I don't think that running
queries like the one you're asking about would have gotten you a useful
response in the limited dataset I collected - and it was no small feat
to collect the multi-million triple database to begin with.

> Let's presume you have a RDF dataset
> X  latitude    123.123
> X longitude   465.456
> Y latitude     234.234
> Y longitude   567.567
> I would like to query SemWeb to get : all objects within a radius of N
> kilometers of a specified lat/lon.

> How would one get such results? Is it even possible? I would appreciate your
> insight!

With a large enough search database, you could do a couple things:

 1. Find all documents which have a lat/long, and populate a seperate,
    GIS or similar database with the data from these documents. This
    would allow you to perform a geographic query of the type you're
    looking for.
 2. Accept an approximation, and search for a bounding box, rather than
    a point. This would still be non-trivial, but it is possible in
    SPARQL: something along the lines of:

      SELECT ?place 
       WHERE { 
         ?place geo:lat ?lat; geo:long ?long.
         xlat < ?lat < ylat.
         xlong < ?long < ylong.
       }

     Note that this is psuedo-code, and will also not exactly match
     "within 100 km", because a circle is not a rectangle, but you
     should be able to work out the general mechanism for querying for
     such a place from this example.

However, both of these solutions are based on the existence of a
queryable crawler that will tell you either what documents contain a
certain term (geo:Point) or allows you to execute queries against it,
and I'm not sure if either exists.

The best place to follow up on this question is with the Semantic Web
Interest Group. Their homepage is at http://www.w3.org/2001/sw/interest/
, and their mailing list is at semantic-web@w3.org (Archives at
http://lists.w3.org/Archives/Public/semantic-web/). This is the
collection of people who are working to build the semantic web -- I gave
up on it almost a year ago now, and I'm not really that interested in
going back.

I've CCed that list here, but I'm not sure if it will go through, as I'm
not a member of the list. If not, you can feel free to forward my
response to you to the list as a conversation starter: it is certainly
possible that a crawler as I describe does exist, and I'm simply not
aware of it, but the semantic-web w3c folk would be. 

-- 
Christopher Schmidt
Web Developer
Received on Sunday, 16 April 2006 05:03:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 7 November 2012 14:17:56 GMT