sub:assertion {
sub:get-places-in-africa dct:description "This query returns all places (geosparql:Feature) located in Africa." ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Get places in Africa" ;
<
https://w3id.org/kpxl/grlc/endpoint> <
https://w3id.org/np/l/nanopub-query-1.1/repo/full> ;
<
https://w3id.org/kpxl/grlc/sparql> """prefix np: <http://www.nanopub.org/nschema#>
prefix npa: <http://purl.org/nanopub/admin/>
prefix npx: <http://purl.org/nanopub/x/>
prefix dct: <http://purl.org/dc/terms/>
prefix geosparql: <http://www.opengis.net/ont/geosparql#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix geof: <http://www.opengis.net/def/function/geosparql/>
select distinct ?np ?location ?locationLabel ?wkt where {
graph ?assertion {
?paper dct:spatial ?location .
?location a geosparql:Feature .
?location rdfs:label ?locationLabel .
?location geosparql:hasGeometry ?geometry .
?geometry geosparql:asWKT ?wkt .
# Find locations that intersect with East Africa bounding box
filter(geof:sfIntersects(strdt(?wkt, geosparql:wktLiteral), \"POLYGON((28 -12, 40 -12, 40 5, 28 5, 28 -12))\"^^geosparql:wktLiteral))
}
graph npa:graph {
?np np:hasAssertion ?assertion .
?np npa:hasValidSignatureForPublicKey ?pubkey .
filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . }
}
}""" .
}