Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

TGN spatial relations

55 views
Skip to first unread message

Vladimir Alexiev

unread,
May 30, 2016, 6:06:16 AM5/30/16
to Getty Vocabularies as Linked Open Data, Massimiliano Condotta, Joan Cobb

Massimiliano Condotta: in my research group we are talking about our ideas regarding metadata and spatial information.

TGN records (place names) has relations with other record of the Thesaurus. These relations are for example because two cities are part of the same country 8rome is related to venice because they are in Italy).

My question is: does exist a relation that consider the distance between places (Venezia is related to Padova because they are far less than 50km and is not related to Rome) or other spatial features?


Hi Massimiliano!

Computing distances with GraphDB is quite simple, you can see an example at http://vocab.getty.edu/queries#Places_Nearby_Each_Other.

The following naive query tries to compute the distance between the two places that you mention:

select * {
  ?x skos:inScheme tgn:;
    rdfs:label "Venezia";
    foaf:focus [wgs:lat ?x_lat; wgs:long ?x_long];
    gvp:parentString ?x_parents.
  ?y skos:inScheme tgn:;
    rdfs:label "Padova";
    foaf:focus [wgs:lat ?y_lat; wgs:long ?y_long];
    gvp:parentString ?y_parents.
  bind (ontogeo:distance(?x_lat, ?x_long, ?y_lat, ?y_long) as ?dist)
}

While "Padova" is a single match (the right set of columns: tgn:7002994), "Venezia" returns 4 places, including a place in the US, and the "Gulf of Venice": so you'll probably want to filter by place hierarchy and/or place type. If you want to compute the distance between numerous pairs of places, then it's essential to filter by these criteria.

In addition to place distance, often having common parent places is an indication of closeness. In the above case, both are in the province of Veneto. It may be faster / less expensive to explore pairs by this administrative hierarchy.
A warning: since TGN is not (yet) a GIS, some coordinates may be missing or imprecise.

If you specify a bit more precisely what you want, I can help you write a query for it.
Reply all
Reply to author
Forward
0 new messages