By prodatamarket_publisher
Copied from SoE-UC4

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

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: <>
PREFIX prodm-com: <>
PREFIX prodm-soe: <>
PREFIX schema: <>
PREFIX gsp: <>
PREFIX sf: <>
PREFIX cp: <>
PREFIX dul: <>
PREFIX dbo: <>
PREFIX dcterms: <>
PREFIX rdfs: <>
PREFIX rdf: <>
PREFIX au: <>

SELECT DISTINCT ?name ?code ?coords ?owner ?min (count(?cp) as ?totalAmount) (sum (?area) as ?totalArea)
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