bif:st_intersects在virtuoso sparql中的奇怪行为

时间:2016-01-13 18:44:42

标签: sparql rdf geospatial virtuoso

使用最新的稳定版本:Linux上的Virtuoso版本07.20.3215(x86_64-unknown-linux-gnu)。

我对自定义N3序列化RDF数据集的初始SPARQL查询是:

select (?s as ?addr), 
       ?geo, 
       (bif:st_distance (?geo, bif:st_point(51.3, 12.3)) as ?dist)
where 
{
  ?s <http://www.opengis.net/ont/geosparql#asWKT> ?geo .
  ?s <http://location/class> "place" .
  ?s <http://location/type> "house" . 
}

并且它给出了期望的结果:

&#13;
&#13;
<table class="sparql" border="1">
  <tr>
    <th>addr</th>
    <th>geo</th>
    <th>dist</th>
  </tr>
  <tr>
    <td><a href="addr1">addr1</a></td>
    <td>"POINT(51.345624 12.3918959)"^^&lt;http://www.openlinksw.com/schemas/virtrdf#Geometry&gt;</td>
    <td>11.3504</td>
  </tr>
</table>
&#13;
&#13;
&#13;

虽然当我为FILTER添加bif:st_intersects语句时,使用以下查询:

select (?s as ?addr), 
       ?geo, 
       (bif:st_distance (?geo, bif:st_point(51.3, 12.3)) as ?dist)
where 
{
  ?s <http://www.opengis.net/ont/geosparql#asWKT> ?geo .
  ?s <http://location/class> "place" .
  ?s <http://location/type> "house" .
  FILTER (bif:st_intersects (?geo, bif:st_point (51.3, 12.3), 100)) 
}

它给出了一条错误消息No table rdf_obj

Virtuoso S0002 Error SQ200: No table rdf_obj

SPARQL query:
define sql:big-data-const 0 
#output-format:text/html
define sql:signal-void-variables 1 define input:default-graph-uri <http://localhost:8890/custom1> select (?s as ?addr), ?geo, (bif:st_distance (?geo, bif:st_point(51.3, 12.3)) as ?dist)
where 
{
  ?s <http://www.opengis.net/ont/geosparql#asWKT> ?geo .
  ?s <http://location/class> "place" .
  ?s <http://location/type> "house" .
  FILTER (bif:st_intersects (?geo, bif:st_point (51.3, 12.3), 100)) 
}

为什么会发生这种情况,是否有解决方法?

0 个答案:

没有答案