Re: How can I express containment/composition?

The "contains" in GeoSPARQL holds between geometries, not geographic entities, so I don't think it would fit your needs.

You can go with GeoNames. The following query should give you the result on a triple store (try on the FactForge endpoint or on your data once you have it):

PREFIX gn:<http://www.geonames.org/ontology#>

SELECT ?country (SUM(xsd:integer(?pop)) as ?tot)
WHERE {
?province gn:featureCode gn:A.ADM1;
 gn:parentCountry ?country;
 gn:population ?pop
}
GROUP BY ?country
ORDER BY DESC(?tot)
LIMIT 1


Il giorno 21/feb/2013, alle ore 15:10, Frans Knibbe | Geodan <frans.knibbe@geodan.nl> ha scritto:

> Barry and Matteo, thank you for pointing me to the GeoNames Ontology. Geographical containment can also be found in GeoSPARQL (http://schemas.opengis.net/geosparql/1.0/geosparql_vocab_all.rdf): sfContains.
> 
> I had the feeling that what I primarily needed was the logical concept of containment/composition, because that would allow reasoning on the part of the data consumer. But I guess it would be best to specify both logical AND geographical containment. As far as I can tell, the geographical containment in GeoSPARQL and GeoNames does not imply logical containment. But perhaps I am overestimating the power of dcterms:hasPart?
> 
> I was thinking about an example. Let's say the following is known:
> 
> 1) A country consists of provinces
> 2) For each country, the complete set of provinces is available
> 3) For each province the number of inhabitants is available
> 
> Could a machine answer the question "Which country has the highest number of inhabitants?" without help from a human?
> 
> Regards,
> Frans
> 
> 
> 
> On 21-2-2013 14:10, Matteo Casu wrote:
>> You could also check the GeoNames ontology, which considers administrative subdivisions: http://www.geonames.org/ontology/documentation.html
>> E.G.: in the USA, level 1 administrative subdivisions are States. In Italy, they are Regions.
>> 
>> It is a minor change of perspective with respect to yours.
>> 
>> 
>> Il giorno 21/feb/2013, alle ore 14:01, Frans Knibbe | Geodan <frans.knibbe@geodan.nl> ha scritto:
>> 
>>> Thank you Martynas, that seems to be just what I was looking for!
>>> 
>>> Frans
>>> 
>>> On 21-2-2013 13:54, Martynas Jusevičius wrote:
>>>> Hey Frans,
>>>> 
>>>> Dublin Core Terms has some general properties for this:
>>>> dct:hasPart http://dublincore.org/documents/dcmi-terms/#terms-hasPart
>>>> dct:isPartOf http://dublincore.org/documents/dcmi-terms/#terms-isPartOf
>>>> 
>>>> Martynas
>>>> graphity.org
>>>> 
>>>> On Thu, Feb 21, 2013 at 2:47 PM, Frans Knibbe | Geodan
>>>> <frans.knibbe@geodan.nl> wrote:
>>>>> Hello,
>>>>> 
>>>>> I would like to express a composition relationship. Something like:
>>>>> A Country consist of Provinces
>>>>> A Province consists of Municipalities
>>>>> 
>>>>> I thought this should be straightforward because this is a common and
>>>>> logical kind of relationship, but I could not find a vocabulary which allows
>>>>> be to make this kind of statement. Perhaps I am bad at searching, or maybe I
>>>>> did not use the right words.
>>>>> 
>>>>> I did find this document:
>>>>> http://www.w3.org/2001/sw/BestPractices/OEP/SimplePartWhole/ ("Simple
>>>>> part-whole relations in OWL Ontologies"). It explains that OWL has no direct
>>>>> support for this kind of relationship and it goes on to give examples on how
>>>>> one can create ontologies that do support the relationship in one way or the
>>>>> other.
>>>>> 
>>>>> Is there a ready to use ontology/vocabulary out there that can help me
>>>>> express containment/composition?
>>>>> 
>>>>> Thanks in advance,
>>>>> Frans
>>>>> 
>>>>> 
>>> 
>>> 
>> 
> 
> 
> 

Received on Thursday, 21 February 2013 14:29:09 UTC