【问题标题】:subtype in Geospatial Sparql error地理空间 Sparql 错误中的子类型
【发布时间】:2014-01-07 06:00:02
【问题描述】:

我使用 SPARQL 请求:

select distinct ?place ?label ?lat ?lng where {
                    GEO OBJECT 
                    SUBTYPE "http://franz.com/ns/allegrograph/3.0/geospatial/spherical/km/-180.0/180.0/-90.0/90.0/50.0"
                    HAVERSINE (POINT(105.8522, 21.0287), 1.0 KM) {
                                            ?place vtio:hasGeoPoint ?loc. 
                                            ?place rdf:type vtio:FastFood.
                                            ?place rdfs:label ?label. 
                    ?place vtio:hasLatitude ?lat.
                                            ?place vtio:hasLongtitude ?lng.
                    } where {
                    } FILTER(lang(?label)='vn')
                                          } LIMIT  5

但是当我执行它时,出现错误:

Executing query failed:
QUERY FAILED: Geospatial subtype
"http://franz.com/ns/allegrograph/3.0/geospatial/spherical/km/-180.0/180.0/-90.0/90.0/50.0"
not found.

我使用 allegrograph 4.12.1 。那么,我应该使用什么SUBTYPE,谢谢!

【问题讨论】:

    标签: geospatial sparql allegrograph


    【解决方案1】:

    您必须先注册球形类型。我是通过 JENA API 做到的:

    URI sphericalTypeURI=conn.registerSphericalType(50,"km");
    

    其中conn 是当前连接(AGRepositoryConnection 的实例)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-09
      • 2012-06-26
      • 1970-01-01
      • 2013-11-11
      • 1970-01-01
      相关资源
      最近更新 更多