[rdfweb-dev] Re: Photo database ontology decisions

Cameron McCormack cam-rdfweb-dev at aka.mcc.id.au
Tue Oct 12 01:58:16 UTC 2004


Jim Ley:
> Mortenf models that with a foaf:orginal, a foaf:image and a foaf:thumbnail - 
> foaf:original isn't legit, but I think the idea is a good one - the original 
> is rarely something a person would want to use as an a image, we want the 
> scaled down one.  So I like the model, and we should talk to Morten to find 
> out what's going on with foaf:original.

Sounds good.  Over the weekend I made some decisions, based on the
SimplePhotoAnnotation page and some other advice, which I'll detail
below.

> >  - For each photo and video I want to specify:
> >      - a name and an XHTML description
> 
> Easy dc:title and foaf:page can link both those of things.

I was thinking actually of having the description in the RDF, using an
rdf:XMLLiteral.

> >      - who is in it
> 
> foaf:depicts  (lots of stuff on codepiction)

Yup.

> >      - where it was taken
> 
> Mortenf uses dc:spatial to link the image to the geo:point - I'm not so sure 
> about this, but it's what's being used now, and it's good enough certainly.

Yeah, I was thinking that when I get a GPS unit, I could just attach
geo:lat nad geo:lon to the place.  I sort of also need to give some idea
of scale, though.  For example for cyc:Australia I don't want to just
give a single point.  An associated radius seems far too simplistic, yet
anything else (like specifying a path) seems quite complicated.

> >      - at what event it was taken
> 
> Morten does this aswell with cyc:event IIRC - not sure though, hopefully 
> he'll pop up and explain.

I've taken the idea of using cyc:Event from that SimplePhotoAnnotation
page and slightly adapted it, since in my mind there is a difference
between the event that this photo was from (e.g. SVG Open 2004) and the
event in the organisation of my photos it is from (my attending SVG Open
2004).  I would then use dc:coverage to specify the event proper, such
as the conference, and foaf:topic for my idea of event.  (Maybe I should
have a different name to avoid confusion.)

  <http://photoweb.mcc.id.au/photos/2004/09/p12.jpg> a foaf:Image ;
    dc:coverage [ a cyc:Event ; foaf:homepage <http://www.svgopen.org/2004/> ] ;
    foaf:topic <http://photoweb.mcc.id.au/events/2004/09/SVGOpen> ;
    ...

> >  - In the future I may get some GPS equipment and want to tag my photos
> >    and videos with coordinates, but for the moment I just want to
> >    specify a place name.  These place names could be something like
> >    "China" or "Melbourne" or "my kitchen".  I want it so that I can
> >    search for photos taken in Melborne and that will also come up with
> >    those taken in my house (since it is in Melbourne).
> 
> Yep, here you need to start defining the places, and a heirachy of places - 
> we developed some geo properties for this at the workshop last week - I'm 
> not sure what chaals did with them though, so we need to wait for him to 
> come back to life!  - for now though you'll want to give your places a URI, 
> (for melbourne, your kitchen etc.  then you'll later need to say that your 
> kitchen is within the region of melbourne etc.)

I've tried to reuse existing place URIs from cyc, and ended up with
something like this:

  cyc:Japan a photo:Place ;
    rdfs:label "Japan" ;
    photo:spatiallyEncompasses <http://photoweb.mcc.id.au/places/Tokyo> .
  
  <http://photoweb.mcc.id.au/places/Tokyo> a photo:Place ;
    rdfs:label "Tokyo" ;
    photo:spatiallyEncompasses
      <http://photoweb.mcc.id.au/places/HotelAmistaOhi>,
      <http://photoweb.mcc.id.au/places/KeioMita> .
  
  <http://photoweb.mcc.id.au/places/HotelAmistaOhi> a photo:Place ;
    a wn:Hotel ;
    rdfs:label "Hotel Amista Ohi" .
  
  <http://photoweb.mcc.id.au/places/KeioMita> a photo:Place ;
    a wn:University ;
    rdfs:label "Keio University, Mita Campus" .


> >  1. Does it really matter if my cyc:Event and foaf:Person resources
> >     don't have any inverse functional properties associated with them?
> 
> Probably - especially for www2004 events say - where other people will also 
> have marked up photos, and we can then know they were taken at the same 
> event - the same with foaf:Person.

Splitting into foaf:topic and dc:coverage as above seems to solve that
problem then.  Do you think my followup post (about using URIs and IFPs
for foaf:Persons) is a reasonable idea?

> >  2. How should I label my cyc:Event resources?  dc:title or rdfs:label
> >     or something else?  What if I have
> >
> >       [ a cyc:Event ;
> >         rdfs:label "SVG Open 2004" ;
> > foaf:homepage <http://www.svgopen.org/2004/> ] .
> 
> I would hope either would be fine (it'll depend on the tools, and I think 
> tools are likely to look for both of those on unknown things)

I'll stick with rdfs:label then, as dc:title seems to imply the title of
some created work.

> >  3. Is there some existing RDF data that has continents/countries/
> >     states/cities/suburbs arranged hierarchically for me to use
> 
> Not that I know of, but I want to put one together.

I wouldn't mind contributing to such a data source.  My housemate's a
bit of a geography nut, I'm sure he'd love to gather that sort of info.
:)

> >     If I do create my own place resources, would it be bad to give them
> >     URIs?
> 
> No, but if you can create a single ontology for places like Melbourne, it'd 
> be good - your kitchen, I don't see a problem (although is it the concept of 
> your kitchen, or is it a particular kitchen in a particular house?)

Well in this case it'd be the kitchen in my house, so it is a particular
region.

Below is my sample data I've got so far.  Some issues I still have:
  - I don't like having my own begin and end time properties for my
    events.  Should I use cal:dtstart and cal:dtend?
  - Is it right to designate a place as also a university?
  - I could make photo:reduced a subproperty of foaf:image.
  - I suppose my XML literals should have an XHTML namespace inside
    them.
  - I'm not sure whether it would be better, for extensibility, to have
    a photo:spatiallyEncompasses or a photo:spatiallyEncompassedBy
    property.

  # -- People --

  <http://photoweb.mcc.id.au/people/Cameron.McCormack> a foaf:Person ;
    foaf:name "Cameron McCormack" ;
    foaf:mbox_sha1sum "44070c7b122ea40f9a4c058b0d0014902d4e6096" .
  
  <http://photoweb.mcc.id.au/people/Doug.Schepers> a foaf:Person ;
    foaf:name "Doug Schepers" ;
    foaf:mbox_sha1sum "b6105780d79523c22bd04b4eb02b473a56c2d22d" .
  
  # -- Events --

  <http://photoweb.mcc.id.au/events/2004/09/Tokyo> a cyc:Event ;
    rdfs:label "Tokyo 2004" ;
    photo:begin "2004-09-07" ;
    photo:end "2004-09-12" ;
    photo:temporallyEncompasses <http://photoweb.mcc.id.au/events/2004/09/SVGOpen> .
  
  <http://photoweb.mcc.id.au/events/2004/09/SVGOpen> a cyc:Event ;
    rdfs:label "SVG Open 2004" ;
    photo:begin "2004-09-07" ;
    photo:end "2004-09-11" .
  
  # -- Places --

  cyc:PlanetEarth a photo:Place ;
    rdfs:label "Earth" ;
    photo:spatiallyEncompasses <http://photoweb.mcc.id.au/places/Asia> .
  
  <http://photoweb.mcc.id.au/places/Asia> a photo:Place ;
    rdfs:label "Asia" ;
    photo:spatiallyEncompasses cyc:Japan .
  
  cyc:Japan a photo:Place ;
    rdfs:label "Japan" ;
    photo:spatiallyEncompasses <http://photoweb.mcc.id.au/places/Tokyo> .
  
  <http://photoweb.mcc.id.au/places/Tokyo> a photo:Place ;
    rdfs:label "Tokyo" ;
    photo:spatiallyEncompasses
      <http://photoweb.mcc.id.au/places/KeioMita> .
  
  <http://photoweb.mcc.id.au/places/KeioMita> a photo:Place ;
    a wn:University ;
    rdfs:label "Keio University, Mita Campus" .

  # -- Photos --

  # original photo
  <http://photoweb.mcc.id.au/photos/2004/09/p12.jpg> a foaf:Image ;
    foaf:thumbnail <http://photoweb.mcc.id.au/photos/2004/09/t12.jpg> ;
    photo:reduced <http://photoweb.mcc.id.au/photos/2004/09/r12.jpg> ;
    foaf:topic <http://photoweb.mcc.id.au/events/2004/09/SVGOpen> ;
    dc:coverage [ a cyc:Event ; foaf:homepage <http://www.svgopen.org/2004/> ] ;
    dc:spatial <http://photoweb.mcc.id.au/places/KeioMita> ;
    dc:title "Me presenting" ;
    dc:description "<p>Presenting my paper.</p>"^^rdf:XMLLiteral ;
    dc:creator <http://photoweb.mcc.id.au/people/Doug.Schepers> ;
    dc:date "2004-09-08T15:33:39+09:00" ;
    foaf:depicts <http://photoweb.mcc.id.au/people/Cameron.McCormack> .
    foaf:page <http://photoweb.mcc.id.au/describe?uri=http://photoweb.mcc.id.au/photos/2004/09/p12.jpg> ;

  # reduced photo
  <http://photoweb.mcc.id.au/photos/2004/09/r12.jpg> a foaf:Image ;
    foaf:original <http://photoweb.mcc.id.au/photos/2004/09/t12.jpg> ;
    dc:format "image/jpeg" ;
    exif:imageWidth "585" ;
    exif:imageHeight "780" .
  
  # thumbnail
  <http://photoweb.mcc.id.au/photos/2004/09/t12.jpg> a foaf:Image ;
    foaf:original <http://photoweb.mcc.id.au/photos/2004/09/t12.jpg> ;
    dc:format "image/jpeg" ;
    exif:imageWidth "112" ;
    exif:imageHeight "149" .

> Well, I answered what I could...

Thanks,

Cameron

-- 
Cameron McCormack
|  Web: http://mcc.id.au/
|  ICQ: 26955922



More information about the foaf-dev mailing list