On 21-2-2013 15:28, Matteo Casu wrote:
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
Isn't the machine being helped in this example, by specifying that
provinces can be grouped into countries? Couldn't the machine find it
out for himself, making use of the knowledge that provinces are part of
countries and therefore their integer properties may be summed?
Or, in other words (sorry for not being able to express myself more
formally):
/Human:/ "Machine, which country has the highest number of inhabitants?"
/Machine:/ "Oh, that's easy. Let me see... There, I found a list of
countries.
Now I will just order those countries by the number of inhabitants....
Darn! The number of inhabitants is not known for countries. Let me look
further...
Hey, I see that a country is composed of provinces. And a province does
know its number of inhabitants. Now if I can find all provinces for each
country, I can sum the number of inhabitants and then I will have the
total for each country.
Done!"
Il giorno 21/feb/2013, alle ore 15:10, Frans Knibbe | Geodan
<[email protected]> 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
<[email protected]> 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
<[email protected]> 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