PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX doap:    <http://usefulinc.com/ns/doap#>
PREFIX foaf:    <http://xmlns.com/foaf/0.1/>
PREFIX hydra:   <http://www.w3.org/ns/hydra/core#>
PREFIX ldp:     <http://www.w3.org/ns/ldp#>
PREFIX prov:    <http://www.w3.org/ns/prov#>
PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sh:      <http://www.w3.org/ns/shacl#>
PREFIX skos:    <http://www.w3.org/2004/02/skos/core#>
PREFIX void:    <http://rdfs.org/ns/void#>

<#erlangen>  a               void:Dataset;
        dcterms:identifier   "erlangen";
        dcterms:license      <https://creativecommons.org/licenses/by/4.0/>;
        dcterms:rights       "Stadt Erlangen (CC BY 4.0)";
        dcterms:title        "Baumkataster Erlangen";
        void:class           <vocab#Tree>;
        void:classPartition  [ void:class     <vocab#Tree>;
                               void:entities  23250
                             ];
        void:entities        23250;
        void:rootResource    <tree/erlangen/> .

<#wuerzburg>  a              void:Dataset;
        dcterms:identifier   "wuerzburg";
        dcterms:license      <https://www.govdata.de/dl-de/by-2-0>;
        dcterms:rights       "Stadt Würzburg (Datenlizenz Deutschland – Namensnennung – 2.0)";
        dcterms:title        "Baumkataster der Stadt Würzburg";
        void:class           <vocab#Tree>;
        void:classPartition  [ void:class     <vocab#Tree>;
                               void:entities  43311
                             ];
        void:entities        43311;
        void:rootResource    <tree/wuerzburg/> .

<#memmingen>  a              void:Dataset;
        dcterms:identifier   "memmingen";
        dcterms:license      <https://creativecommons.org/licenses/by/4.0/>;
        dcterms:rights       "Stadt Memmingen (CC BY 4.0)";
        dcterms:title        "Baumkataster Memmingen";
        void:class           <vocab#Tree>;
        void:classPartition  [ void:class     <vocab#Tree>;
                               void:entities  14689
                             ];
        void:entities        14689;
        void:rootResource    <tree/memmingen/> .

<#dataset>  a                void:Dataset;
        dcterms:description  "Trees as Linked Data, one collection per original publisher (tree/), each tree with every field its publisher gives, under the publisher's licence. Joinable by location with linked-gebaeudemodell's LoD2 buildings: within and nearby take the same parameters."@en;
        dcterms:publisher    <#baumkatasterwrap>;
        dcterms:title        "Linked Baumkataster"@en;
        void:rootResource    <tree/>;
        void:subset          <#wuerzburg> , <#hassfurt> , <#ldbv> , <#memmingen> , <#erlangen>;
        void:vocabulary      <vocab#>;
        foaf:page            <index.html> .

<#ldbv>  a                   void:Dataset;
        dcterms:identifier   "ldbv";
        dcterms:license      <https://creativecommons.org/licenses/by/4.0/>;
        dcterms:rights       "© Bayerische Vermessungsverwaltung, geodaten.bayern.de (CC BY 4.0)";
        dcterms:title        "Einzelbäume (Bayern, flächendeckend)";
        void:class           <vocab#Tree>;
        void:classPartition  [ void:class     <vocab#Tree>;
                               void:entities  349310220
                             ];
        void:entities        349310220;
        void:rootResource    <tree/ldbv/> .

<>      a                ldp:BasicContainer;
        hydra:operation  [ a                     hydra:Operation;
                           hydra:method          "GET";
                           hydra:possibleStatus  [ a                 hydra:Status;
                                                   hydra:statusCode  200
                                                 ];
                           hydra:possibleStatus  [ a                 hydra:Status;
                                                   hydra:statusCode  304
                                                 ];
                           hydra:possibleStatus  [ a                 hydra:Status;
                                                   hydra:statusCode  406
                                                 ];
                           hydra:returnsHeader   "ETag" , "Last-Modified" , "Vary"
                         ];
        hydra:search     [ a                             hydra:IriTemplate;
                           rdfs:comment                  "The trees geo:sfWithin a WGS84 box: each tree's point strictly inside it, a point on an edge excluded; tested on the point itself (the 1 km cells are a prefilter). Each member is geo:sfWithin the query <…#id>. Order: by source, 1 km UTM cell, upstream order. .json: the linkset of the members with an id, in pages of up to 10000 (count) followed by the next link's cursor; any box size, as a page reads only its cells. .geojson and RDF: pages of at most 1000 by offset, the total is hydra:totalItems. Reads whole 1 km cells; a query that would read more than 250000 trees is refused (400): ask for less, or name source=.";
                           hydra:mapping                 [ a               hydra:IriTemplateMapping;
                                                           rdfs:comment    "minLon,minLat,maxLon,maxLat (W,S,E,N) in WGS84 degrees, lon first as in CRS84. No hydra:property: the family's term for this string is not defined yet.";
                                                           skos:example    "9.9415,49.7920,9.9440,49.7940";
                                                           hydra:required  true;
                                                           hydra:variable  "bbox";
                                                           sh:pattern      "^-?[0-9]+(\\.[0-9]+)?(,-?[0-9]+(\\.[0-9]+)?){3}$"
                                                         ];
                           hydra:mapping                 [ a               hydra:IriTemplateMapping;
                                                           rdfs:comment    "Members per page; default 100, at most 1000.";
                                                           hydra:property  hydra:limit;
                                                           hydra:required  false;
                                                           hydra:variable  "count";
                                                           sh:pattern      "^[1-9][0-9]*$"
                                                         ];
                           hydra:mapping                 [ a               hydra:IriTemplateMapping;
                                                           rdfs:comment    "Representation as a suffix (.ttl, .nt, .rdf, .jsonld, .html; .json: the linkset (RFC 9264), every tree with an id, unpaged; .geojson: this page as a GeoJSON FeatureCollection that is also JSON-LD); omit it to negotiate with the Accept header.";
                                                           hydra:required  false;
                                                           hydra:variable  "format";
                                                           sh:pattern      "^(ttl|nt|rdf|jsonld|json|geojson|html)$"
                                                         ];
                           hydra:mapping                 [ a               hydra:IriTemplateMapping;
                                                           rdfs:comment    "Only these sources, comma-separated (ldbv, wuerzburg, erlangen, memmingen, hassfurt); omitted, every source.";
                                                           hydra:property  dcterms:source;
                                                           hydra:required  false;
                                                           hydra:variable  "source";
                                                           sh:pattern      "^[a-z]+(,[a-z]+)*$"
                                                         ];
                           hydra:mapping                 [ a               hydra:IriTemplateMapping;
                                                           rdfs:comment    "Only trees of these genera, comma-separated, as notated in the code list taxon (Tilia,Acer); a tree with no taxon (all of LDBV) is then left out. Omitted, every tree.";
                                                           hydra:property  <vocab#genus>;
                                                           hydra:required  false;
                                                           hydra:variable  "genus";
                                                           sh:pattern      "^[A-Z][a-z]+(,[A-Z][a-z]+)*$"
                                                         ];
                           hydra:mapping                 [ a               hydra:IriTemplateMapping;
                                                           rdfs:comment    "Members to skip; default 0.";
                                                           hydra:property  hydra:offset;
                                                           hydra:required  false;
                                                           hydra:variable  "offset";
                                                           sh:pattern      "^[0-9]+$"
                                                         ];
                           hydra:mapping                 [ a               hydra:IriTemplateMapping;
                                                           rdfs:comment    ".json only: where the page starts, as the previous page's next link gives it; omitted, the first page. Not meaningful across dump versions.";
                                                           hydra:required  false;
                                                           hydra:variable  "cursor";
                                                           sh:pattern      "^[0-9]+\\.-?[0-9]+\\.[0-9]+$"
                                                         ];
                           hydra:memberAssertion         [ rdfs:comment    "Each member is the subject, the query <…#id> the object.";
                                                           hydra:property  <http://www.opengis.net/ont/geosparql#sfWithin>
                                                         ];
                           hydra:operation               [ a                     hydra:Operation;
                                                           hydra:method          "GET";
                                                           hydra:possibleStatus  [ a                 hydra:Status;
                                                                                   hydra:statusCode  406
                                                                                 ];
                                                           hydra:possibleStatus  [ a                 hydra:Status;
                                                                                   hydra:statusCode  304
                                                                                 ];
                                                           hydra:possibleStatus  [ a                 hydra:Status;
                                                                                   hydra:statusCode  503
                                                                                 ];
                                                           hydra:possibleStatus  [ a                 hydra:Status;
                                                                                   hydra:statusCode  400
                                                                                 ];
                                                           hydra:possibleStatus  [ a                 hydra:Status;
                                                                                   hydra:statusCode  200
                                                                                 ];
                                                           hydra:returns         hydra:Collection;
                                                           hydra:returnsHeader   "Vary" , "ETag" , "Cache-Control" , "Link" , "Last-Modified"
                                                         ];
                           hydra:template                "within{.format}{?bbox,source,genus,cursor,offset,count}";
                           hydra:variableRepresentation  hydra:BasicRepresentation
                         ];
        hydra:search     [ a                             hydra:IriTemplate;
                           rdfs:comment                  "The trees within r metres of a WGS84 point (distance in UTM 32N metres, not a topological relation), nearest first; the query <…#id> is linked to each by vocab:nearby. .json: the linkset, unpaged; .geojson and RDF: pages. Reads whole 1 km cells; a query that would read more than 250000 trees is refused (400): ask for less, or name source=.";
                           hydra:mapping                 [ a               hydra:IriTemplateMapping;
                                                           rdfs:comment    "Representation as a suffix (.ttl, .nt, .rdf, .jsonld, .html; .json: the linkset (RFC 9264), every tree with an id, unpaged; .geojson: this page as a GeoJSON FeatureCollection that is also JSON-LD); omit it to negotiate with the Accept header.";
                                                           hydra:required  false;
                                                           hydra:variable  "format";
                                                           sh:pattern      "^(ttl|nt|rdf|jsonld|json|geojson|html)$"
                                                         ];
                           hydra:mapping                 [ a               hydra:IriTemplateMapping;
                                                           rdfs:comment    "Radius in metres; default 100, at most 1000.";
                                                           skos:example    "3";
                                                           hydra:property  <http://schema.org/geoRadius>;
                                                           hydra:required  false;
                                                           hydra:variable  "r";
                                                           sh:pattern      "^[0-9]+(\\.[0-9]+)?$"
                                                         ];
                           hydra:mapping                 [ a               hydra:IriTemplateMapping;
                                                           rdfs:comment    "Longitude, WGS84 degrees.";
                                                           skos:example    "9.94297";
                                                           hydra:property  <http://www.w3.org/2003/01/geo/wgs84_pos#long>;
                                                           hydra:required  true;
                                                           hydra:variable  "lon";
                                                           sh:pattern      "^-?[0-9]+(\\.[0-9]+)?$"
                                                         ];
                           hydra:mapping                 [ a               hydra:IriTemplateMapping;
                                                           rdfs:comment    "Members per page; default 100, at most 1000.";
                                                           hydra:property  hydra:limit;
                                                           hydra:required  false;
                                                           hydra:variable  "count";
                                                           sh:pattern      "^[1-9][0-9]*$"
                                                         ];
                           hydra:mapping                 [ a               hydra:IriTemplateMapping;
                                                           rdfs:comment    "Only these sources, comma-separated (ldbv, wuerzburg, erlangen, memmingen, hassfurt); omitted, every source.";
                                                           hydra:property  dcterms:source;
                                                           hydra:required  false;
                                                           hydra:variable  "source";
                                                           sh:pattern      "^[a-z]+(,[a-z]+)*$"
                                                         ];
                           hydra:mapping                 [ a               hydra:IriTemplateMapping;
                                                           rdfs:comment    "Only trees of these genera, comma-separated, as notated in the code list taxon (Tilia,Acer); a tree with no taxon (all of LDBV) is then left out. Omitted, every tree.";
                                                           hydra:property  <vocab#genus>;
                                                           hydra:required  false;
                                                           hydra:variable  "genus";
                                                           sh:pattern      "^[A-Z][a-z]+(,[A-Z][a-z]+)*$"
                                                         ];
                           hydra:mapping                 [ a               hydra:IriTemplateMapping;
                                                           rdfs:comment    "Latitude, WGS84 degrees.";
                                                           skos:example    "49.79332";
                                                           hydra:property  <http://www.w3.org/2003/01/geo/wgs84_pos#lat>;
                                                           hydra:required  true;
                                                           hydra:variable  "lat";
                                                           sh:pattern      "^-?[0-9]+(\\.[0-9]+)?$"
                                                         ];
                           hydra:mapping                 [ a               hydra:IriTemplateMapping;
                                                           rdfs:comment    "Members to skip; default 0.";
                                                           hydra:property  hydra:offset;
                                                           hydra:required  false;
                                                           hydra:variable  "offset";
                                                           sh:pattern      "^[0-9]+$"
                                                         ];
                           hydra:memberAssertion         [ rdfs:comment    "The query <…#id> is the subject, each member the object.";
                                                           hydra:property  <vocab#nearby>
                                                         ];
                           hydra:operation               [ a                     hydra:Operation;
                                                           hydra:method          "GET";
                                                           hydra:possibleStatus  [ a                 hydra:Status;
                                                                                   hydra:statusCode  200
                                                                                 ];
                                                           hydra:possibleStatus  [ a                 hydra:Status;
                                                                                   hydra:statusCode  304
                                                                                 ];
                                                           hydra:possibleStatus  [ a                 hydra:Status;
                                                                                   hydra:statusCode  503
                                                                                 ];
                                                           hydra:possibleStatus  [ a                 hydra:Status;
                                                                                   hydra:statusCode  406
                                                                                 ];
                                                           hydra:possibleStatus  [ a                 hydra:Status;
                                                                                   hydra:statusCode  400
                                                                                 ];
                                                           hydra:returns         hydra:Collection;
                                                           hydra:returnsHeader   "Vary" , "Cache-Control" , "ETag" , "Link" , "Last-Modified"
                                                         ];
                           hydra:template                "nearby{.format}{?lon,lat,r,source,genus,offset,count}";
                           hydra:variableRepresentation  hydra:BasicRepresentation
                         ];
        ldp:contains     <taxon> , <tree/> .

<#hassfurt>  a               void:Dataset;
        dcterms:identifier   "hassfurt";
        dcterms:license      <https://creativecommons.org/publicdomain/zero/1.0/>;
        dcterms:rights       "Stadt Haßfurt (CC0)";
        dcterms:title        "Baumkataster der Stadt Haßfurt";
        void:class           <vocab#Tree>;
        void:classPartition  [ void:class     <vocab#Tree>;
                               void:entities  989
                             ];
        void:entities        989;
        void:rootResource    <tree/hassfurt/> .

<#baumkatasterwrap>  a  doap:Project , prov:SoftwareAgent;
        rdfs:comment  "Linked Data wrapper over tree cadastres: Bavaria's LDBV Einzelbäume (every tree LDBV derives from aerial survey data, with ground and tree height) and the municipal Baumkataster of Würzburg, Erlangen, Memmingen and Haßfurt (species, height, crown, trunk, planting year where published)."@en;
        rdfs:label    "Linked Baumkataster (baumkatasterwrap)";
        doap:release  [ a              doap:Version;
                        doap:revision  "1.0.0-SNAPSHOT+4bf1005"
                      ];
        foaf:page     <index.html> .
