SoE-UC4

lock_open

By prodatamarket_publisher
Copied from SoE-UC4

Last modification over 3 years ago -  2017-03-06 09:31:34 UTC
Description

Show a map of municipalities coloured by the amount/total area of state owned properties for each owner. (Group by ministry and owner.)


Query text


PREFIX prodm-cad: <http://vocabs.datagraft.net/proDataMarket/0.1/Cadastre#>
PREFIX prodm-com: <http://vocabs.datagraft.net/proDataMarket/0.1/Common#>
PREFIX prodm-soe: <http://vocabs.datagraft.net/proDataMarket/0.1/SoE#>
PREFIX schema: <http://schema.org/>
PREFIX gsp: <http://www.opengis.net/ont/geosparql#>
PREFIX sf: <http://www.opengis.net/ont/sf#>
PREFIX cp: <http://www.w3.org/2015/03/inspire/cp#>
PREFIX dul: <http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#>
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX au: <http://www.w3.org/2015/03/inspire/au#>

SELECT DISTINCT ?name ?code ?coords ?owner ?min (count(?cp) as ?totalAmount) (sum (?area) as ?totalArea)
WHERE {
SELECT ?name ?code ?coords ?owner ?min ?cp ?area WHERE {
?cp a prodm-cad:CadastralParcel;
prodm-com:isStateOwned true ;

prodm-com:hasAreaMeasurement [a prodm-com:AreaMeasurement ;
rdf:value ?area ;];
dcterms:coverage ?au.

?rr a prodm-cad:RealRights;
dul:defines ?cp;
dul:defines ?org.

?org a prodm-cad:RightsHolderOrganization;
schema:legalName ?owner ;
schema:parentOrganization ?parent .
?parent a prodm-cad:RightsHolderOrganization;
schema:legalName ?min .
?au a au:AdministrativeUnit;
au:nationalCode ?code;
rdfs:label ?name ;
gsp:hasGeometry [ gsp:asWKT ?coords ;].
}
#LIMIT 1000
}
GROUP BY ?name ?code ?coords ?owner ?min
ORdER BY ?code