我安装了Virtuoso Open Source Edition 07.20.3217。
但是 GeoSPARQL 并没有像我预期的那样工作。
我插入了 10 个三元组——
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix geo: <http://www.opengis.net/ont/geosparql#>
prefix ex: <http://www.example.org/POI#>
prefix sf: <http://www.opengis.net/ont/sf#>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
ex:WashingtonMonument
rdf:type ex:Monument
rdfs:label "Washington Monument" ;
geo:hasGeometry ex:WMPoint .
ex:WMPoint
rdf:type sf:Point ;
geo:asWKT "POINT(-77.03524 38.889468)"^^geo:wktLiteral .
ex:NationalMall
a ex:Park ;
rdfs:label "National Mall" ;
geo:hasGeometry ex:NMPoly .
ex:NMPoly
a sf:Polygon ;
geo:asWKT "POLYGON((-77.050125 38.892086, -77.039482 38.892036, -77.039482 38.895393, -77.033669 38.895508, -77.033585 38.892052, -77.031906 38.892086, -77.031883 38.887474, -77.050232 38.887142, -77.050125 38.892086 ))"^^geo:wktLiteral .
然后我尝试了这个 GeoSPARQL 查询——
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
SELECT *
WHERE {
?m geo:hasGeometry ?mgeo .
?p geo:hasGeometry ?pgeo .
FILTER (bif:st_within(?mgeo, ?pgeo))
}
但是没有结果。
我做错了什么?
感谢您的任何回复。