GEOSPARQL获取了一个包含在POLYGON中的POINT

时间:2016-06-19 16:41:11

标签: gis sparql rdf virtuoso geosparql

我在Virtuoso服务器上安装了一个本体。

在这个本体论中,我有两个课程:

  1. 兴趣点称为POI
  2. 区域称为AREA
  3. 每个POI都有以下关系:

    { POI  gis:hasGeometry  ?xx            . 
      ?xx  gis:asWKT        ?WKTexpression }
    

    例如,WKTExpression可以是"POINT(11.2589271 43.8004469)"^^gis:wktLiteral

    每个AREA都有以下关系:

    { AREA  gis:hasGeometry  ?xx            . 
      ?xx   gis:asWKT        ?WKTexpression }
    

    - WKTexpression"POLYGON()"^^gis:wktLiteral

    如何使用GEOSPARQL查询提取特定区域内的所有POI?

    我可以这样做吗?

    SELECT * 
    WHERE 
      {
        ?element  gis:hasGeometry   ?point                          .
        ?point    <IS INSIDE>       "POLYGON(...)"^^gis:wktLiteral
      }
    

    ==================================

    更新1: 我在Virtuoso 7中尝试此查询:

    SELECT *
    WHERE {
    ?sensor <http://www.w3.org/2003/01/geo/wgs84_pos#geometry> ?fWKT .
    FILTER (ogcgsf:sfWithin(?fWKT, "POLYGON((11.170005798339842 43.845174931181276,11.157989501953123 43.83130720030931,11.152496337890625 43.82040886498103,11.160392761230469 43.78596696172772,11.172409057617186 43.75745685244749,11.179962158203125 43.74431283565997,11.215324401855467 43.72818887413058,11.244850158691406 43.72694838956602,11.27265930175781 43.74183250878846,11.299781799316404 43.76464763976463,11.331024169921873 43.79166735265696,11.29566192626953 43.824619821317356,11.216697692871094 43.841708300627744,11.172409057617186 43.84888895466105,11.170005798339842 43.845174931181276))"^^geo:wktLiteral))}
    

    但我回来了:

    Virtuoso 42001 Error SR185: Undefined procedure DB.DBA.http://www.opengis.net/def/function/geosparql/sfWithin.
    

0 个答案:

没有答案