7 Replies Latest reply on Oct 20, 2014 6:30 PM by Matperry-Oracle

    3d coordinate support in GeoSPARQL

    user10332665

      Hello community:

       

      I use oracle 12c in Windows for the development of Geosparql Queries over RDF data.

       

      Does any of you know whether Oracle semantic and spatial supports querying over 3d data?

       

      According to 1.6.11.1 OGC GeoSPARQL Support (http://docs.oracle.com/database/121/RDFRM/sdo_rdf_concepts.htm#RDFRM187) Well Known Text (WKT) in version 1.2.0 is supported

       

      In the standard (http://portal.opengeospatial.org/files/?artifact_id=18241) Section 7.2.3 certain 3d constructs are specified, such as Point Z and Polygon Z

       

      I load the following file with two features whose geometry is based on 3d Coordinates, but the following query does not return any result

       

      SELECT aGeom, f, fGeom, aWKT

        FROM TABLE(SEM_MATCH(

         '{        my:A my:hasExactGeometry ?aGeom .

        ?aGeom geo:asWKT ?aWKT .

        ?f my:hasExactGeometry ?fGeom .

        ?fGeom geo:asWKT ?fWKT .

        FILTER (ogcf:sfContains(?aWKT, ?fWKT)     }',

          SEM_Models('model11'),

          null,

          SEM_ALIASES(SEM_ALIAS('my','http://example.org/ApplicationSchema#'),

      SEM_ALIAS('geo','http://www.opengis.net/ont/geosparql#')),

          null));

       

      The file which I load is the following:

       

       

      <?xml version="1.0" encoding="UTF-8"?>

      <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:sf="http://www.opengis.net/ont/sf#" xmlns:geo="http://www.opengis.net/ont/geosparql#" xmlns:my="http://example.org/ApplicationSchema#">

        <!-- Integration with GeoSPARQL classes and properties -->

        <rdfs:Class rdf:about="http://example.org/ApplicationSchema#PlaceOfInterest">

          <rdfs:subClassOf rdf:resource="http://www.opengis.net/ont/geosparql#Feature"/>

        </rdfs:Class>

        <rdf:Property rdf:about="http://example.org/ApplicationSchema#hasExactGeometry">

          <rdfs:subPropertyOf rdf:resource="http://www.opengis.net/ont/geosparql#hasGeometry"/>

          <rdfs:subPropertyOf rdf:resource="http://www.opengis.net/ont/geosparql#hasDefaultGeometry"/>

        </rdf:Property>

        <rdf:Property rdf:about="http://example.org/ApplicationSchema#hasPointGeometry">

          <rdfs:subPropertyOf rdf:resource="http://www.opengis.net/ont/geosparql#hasGeometry"/>

        </rdf:Property>

        <!-- Instance-level statements -->

        <!-- A -->

        <my:PlaceOfInterest rdf:about="http://example.org/ApplicationSchema#A">

          <my:hasExactGeometry rdf:resource="http://example.org/ApplicationSchema#AExactGeom"/>

          <my:hasPointGeometry rdf:resource="http://example.org/ApplicationSchema#APointGeom"/>

        </my:PlaceOfInterest>

        <sf:Polygon rdf:about="http://example.org/ApplicationSchema#AExactGeom">

          <geo:asWKT rdf:datatype="http://xmlns.oracle.com/rdf/geo/WKTLiteral"><![CDATA[<http://xmlns.oracle.com/rdf/geo/srid/31468>Polygon Z((5333958.396 4467504.578 513.9, 5333960.118 4467505.374 513.9, 5333958.101 4467509.736 513.9, 5333956.379 4467508.939 513.9, 5333958.396 4467504.578 513.9)))]]></geo:asWKT>

        </sf:Polygon>

        <!-- B -->

        <my:PlaceOfInterest rdf:about="http://example.org/ApplicationSchema#B">

          <my:hasExactGeometry rdf:resource="http://example.org/ApplicationSchema#BExactGeom"/>

          <my:hasPointGeometry rdf:resource="http://example.org/ApplicationSchema#BPointGeom"/>

        </my:PlaceOfInterest>

        <sf:Point rdf:about="http://example.org/ApplicationSchema#BPointGeom">

          <geo:asWKT rdf:datatype="http://xmlns.oracle.com/rdf/geo/WKTLiteral"><![CDATA[< http://xmlns.oracle.com/rdf/geo/srid/31468>Point Z(5333959.000 4467505.000 513.9)]]></geo:asWKT>

        </sf:Point>

      </rdf:RDF>

       

      When I load this other file, which is the same as above except that the third coordinate is removed, it returns the correct result

       

      <?xml version="1.0" encoding="UTF-8"?>

      <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:sf="http://www.opengis.net/ont/sf#" xmlns:geo="http://www.opengis.net/ont/geosparql#" xmlns:my="http://example.org/ApplicationSchema#">

        <!-- Integration with GeoSPARQL classes and properties -->

        <rdfs:Class rdf:about="http://example.org/ApplicationSchema#PlaceOfInterest">

          <rdfs:subClassOf rdf:resource="http://www.opengis.net/ont/geosparql#Feature"/>

        </rdfs:Class>

        <rdf:Property rdf:about="http://example.org/ApplicationSchema#hasExactGeometry">

          <rdfs:subPropertyOf rdf:resource="http://www.opengis.net/ont/geosparql#hasGeometry"/>

          <rdfs:subPropertyOf rdf:resource="http://www.opengis.net/ont/geosparql#hasDefaultGeometry"/>

        </rdf:Property>

        <rdf:Property rdf:about="http://example.org/ApplicationSchema#hasPointGeometry">

          <rdfs:subPropertyOf rdf:resource="http://www.opengis.net/ont/geosparql#hasGeometry"/>

        </rdf:Property>

        <!-- Instance-level stxcatemen0ts -->

        <!-- A -->

        <my:PlaceOfInterest rdf:about="http://example.org/ApplicationSchema#A">

          <my:hasExactGeometry rdf:resource="http://example.org/ApplicationSchema#AExactGeom"/>

        </my:PlaceOfInterest>

        <sf:Polygon rdf:about="http://example.org/ApplicationSchema#AExactGeom">

          <geo:asWKT rdf:datatype="http://xmlns.oracle.com/rdf/geo/WKTLiteral"><![CDATA[<http://xmlns.oracle.com/rdf/geo/srid/31468>Polygon((5333958.396 4467504.578, 5333960.118 4467505.374 , 5333958.101 4467509.736, 5333956.379 4467508.939, 5333958.396 4467504.578)))]]></geo:asWKT>

        </sf:Polygon>

        <!-- B -->

        <my:PlaceOfInterest rdf:about="http://example.org/ApplicationSchema#B">

          <my:hasPointGeometry rdf:resource="http://example.org/ApplicationSchema#BPointGeom"/>

        </my:PlaceOfInterest>

        <sf:Point rdf:about="http://example.org/ApplicationSchema#BPointGeom">

          <geo:asWKT rdf:datatype="http://xmlns.oracle.com/rdf/geo/WKTLiteral"><![CDATA[<http://xmlns.oracle.com/rdf/geo/srid/31468>Point(5333959.000 4467505.000)]]></geo:asWKT>

        </sf:Point>

      </rdf:RDF>

       

      Does any of you know for certain if Semantic and Graph support 3d Geometries? If yes, any working example would be appreciated...

       

      Regards

       

      Daniel