### Example of a DGGS literal instance Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html A concrete example of a DGGS literal using the AusPIX implementation. ```Turtle " CELL (R3234)"^^geo:dggsLiteral ``` -------------------------------- ### Define a basic SpatialObject instance Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Example of creating an instance of the geo:SpatialObject class. ```turtle eg:x a geo:SpatialObject ; skos:prefLabel "Object X"; . ``` -------------------------------- ### Model spatial object size properties Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Example demonstrating the use of size properties like geo:hasPerimeterLength and geo:hasMetricPerimeterLength with QUDT units. ```turtle @prefix qudt: . @prefix unit: . eg:moreton-island a geo:SpatialObject ; skos:prefLabel "Moreton Island" ; rdfs:seeAlso "https://en.wikipedia.org/wiki/Moreton_Island"^^xsd:anyURI ; geo:hasPerimeterLength [ qudt:numericValue "92.367"^^xsd:float ; qudt:unit unit:KiloM ; ]; geo:hasMetricPerimeterLength "92367"^^xsd:double ; . ``` -------------------------------- ### Represent Geometry with Default SRS Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Example of a WKT literal representing a point using the default WGS84 spatial reference system. ```Turtle "Point(-83.38 33.95)"^^ ``` -------------------------------- ### Example Usage of geo:SpatialObject in SPARQL Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Demonstrates how to use the geo:SpatialObject class in a SPARQL graph pattern. Implementations must support its use. ```turtle eg:x     a geo:SpatialObject ;      skos:prefLabel "Object X"; . ``` -------------------------------- ### Define Feature Collection Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Example of a FeatureCollection instance containing multiple Feature instances. Collections are unordered by default. ```turtle ex:fc-x     a geo:FeatureCollection ;     dcterms:title "Feature Collection X" ;     rdfs:member         ex:feature-something ,         ex:feature-other ,         ex:feature-another ; . ``` -------------------------------- ### Example KML Literal for a Point Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html An example of a KML Literal encoding a Point Geometry. It uses the default WGS84 geodetic longitude-latitude spatial reference system. ```turtle """ -83.38,33.95 """^^ ``` -------------------------------- ### Define Geometry Collection Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Example of a GeometryCollection instance containing multiple Geometry instances. Like FeatureCollection, it is unordered. ```turtle ex:gc-x     a geo:GeometryCollection ;     dcterms:title "Geometry Collection X" ;     rdfs:member         ex:geometry-shape ,         ex:geometry-othershape ,         ex:geometry-anothershape ; . ``` -------------------------------- ### Representing Feature Geometry in GeoSPARQL Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html This example demonstrates a single Feature instance with its geometry defined in multiple serialization formats. Note that the DGGS serialization is provided for illustrative purposes and is not formally defined in the GeoSPARQL standard. ```turtle eg:x     a geo:Feature ;     geo:hasGeometry [         geo:asWKT """             POLYGON ((                 -27.0621757 153.3610112,                 -27.1990606 153.3658177,                 -27.3406573 153.421436,                 -27.3607835 153.4269292,                 -27.3315078 153.4434087,                 -27.2913403 153.4183848,                 -27.2039578 153.4189391,                 -27.0267166 153.4673476,                 -27.0621757 153.3610112             ))"""^^geo:wktLiteral ;         geo:asGML """                                                                                         -27.0621757 153.3610112                             -27.1990606 153.3658177                             -27.3406573 153.421436                             -27.3607835 153.4269292                             -27.3315078 153.4434087                             -27.2913403 153.4183848                             -27.2039578 153.4189391                             -27.0267166 153.4673476                             -27.0621757 153.3610112                                                                         """^^go:gmlLiteral ;         geo:asKML """                                                                                     153.3610112,-27.0621757                         153.3658177,-27.1990606                         153.421436,-27.3406573                         153.4269292,-27.3607835                         153.4434087,-27.3315078                         153.4183848,-27.2913403                         153.4189391,-27.2039578                         153.4673476,-27.0267166                         153.3610112,-27.0621757                                                                         """^^go:kmlLiteral ;         geo:asGeoJSON """{                 "type": "Polygon",                 "coordinates": [[                     [153.3610112, -27.0621757],                     [153.3658177, -27.1990606],                     [153.421436, -27.3406573],                     [153.4269292, -27.3607835],                     [153.4434087, -27.3315078],                     [153.4183848, -27.2913403],                     [153.4189391, -27.2039578],                     [153.4673476, -27.0267166],                     [153.3610112, -27.0621757]                 ]]             }"""^^geo:geoJSONLiteral ;         geo:asDGGS """ CELLLIST ((R8346031 R8346034 R8346037             R83460058 R83460065 R83460068 R83460072 R83460073 R83460074 R83460075 R83460076             R83460077 R83460078 R83460080 R83460081 R83460082 R83460083 R83460084 R83460085             R83460086 R83460087 R83460088 R83460302 R83460305 R83460308 R83460320 R83460321             R83460323 R83460324 R83460326 R83460327 R83460332 R83460335 R83460338 R83460350             R83460353 R83460356 R83460362 R83460365 R83460380 R83460610 R83460611 R83460612             R83460613 R83460614 R83460615 R83460617 R83460618 R83460641 R83460642 R83460644             R83460645 R83460648 R83460672 R83460686 R83463020 R83463021 R834600487 R834600488             R834600557 R834600558 R834600564 R834600565 R834600566 R834600567 R834600568             R834600571 R834600572 R834600573 R834600574 R834600575 R834600576 R834600577             R834600578 R834600628 R834600705 R834600706 R834600707 R834600708 R834600712             R834600713 R834600714 R834600715 R834600716 R834600717 R834600718 R834601334             R834601335 R834601336 R834601337 R834601338 R834601360 R834601361 R834601363             R834601364 R834601366 R834601367 R834601600 R834601601 R834601603 R834601606             R834601630 R834601633 R834603220 R834603221 R834603223 R834603224 R834603226             R834603227 R834603250 R834603251 R834603253 R834603256 R834603280 R834603283             R834603510 R834603511 R834603512 R834603513 R834603514 R834603515 R834603516             R834603517 R834603540 R834603541 R834603543 R834603544 R834603546 R834603547             R834603570 R834603573 R834603576 R834603681 R834603682 R834603684 R834603685 ``` -------------------------------- ### Simple Features Geometry Class Hierarchy Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html A representation of the geometry class hierarchy starting from geo:Geometry. ```text geo:Geometry     sf:Geometry         sf:Curve             sf:LineString                 sf:Line                 sf:LinearRing         sf:GeometryCollection             sf:MultiCurve                 sf:MultiLineString             sf:MultiPoint             sf:MultiSurface                 sf:MultiPolygon         sf:Point         sf:Surface             sf:Polygon                 sf:Envelope                 sf:Triangle             sf:PolyhedralSurface                 sf:TIN ``` -------------------------------- ### Represent Geometry with Explicit SRS Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Example of a WKT literal representing a point with an explicit EPSG:4326 spatial reference system, which dictates a specific axis order. ```Turtle " Point(33.95 -83.38)"^^ ``` -------------------------------- ### Example GeoJSON Literal for a Point Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html An example of a GeoJSON Literal encoding a Point Geometry. It uses the default WGS84 geodetic longitude-latitude spatial reference system. ```turtle """ {"type": "Point", "coordinates": [-83.38,33.95]} """^^ ``` -------------------------------- ### Define Feature with Area and Volume Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Example of a Feature instance with declared metric area and volume. Used to represent physical entities like lakes. ```turtle ex:lake-x     a geo:Feature ;     skos:prefLabel "Lake X" ;     eg:hasFeatureCategory ;     geo:hasMetricArea "9.26E4"^^xsd:double ;     geo:hasMetricVolume "6E5"^^xsd:double ; . ``` -------------------------------- ### RDF Data for Spatial Features (Turtle) Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html This Turtle RDF data defines a feature class 'my:PlaceOfInterest' and properties for associating geometries. It includes examples of Point, Polygon, and LineString geometries with WKT literals. ```turtle @prefix geo: . @prefix my: . @prefix rdf: . @prefix rdfs: . @prefix sf: . my:PlaceOfInterest a rdfs:Class ; rdfs:subClassOf geo:Feature . my:A a my:PlaceOfInterest ; my:hasExactGeometry my:AExactGeom ; my:hasPointGeometry my:APointGeom . my:B a my:PlaceOfInterest ; my:hasExactGeometry my:BExactGeom ; my:hasPointGeometry my:BPointGeom . my:C a my:PlaceOfInterest ; my:hasExactGeometry my:CExactGeom ; my:hasPointGeometry my:CPointGeom . my:D a my:PlaceOfInterest ; my:hasExactGeometry my:DExactGeom ; my:hasPointGeometry my:DPointGeom . my:E a my:PlaceOfInterest ; my:hasExactGeometry my:EExactGeom . my:F a my:PlaceOfInterest ; my:hasExactGeometry my:FExactGeom . my:hasExactGeometry a rdf:Property ; rdfs:subPropertyOf geo:hasDefaultGeometry, geo:hasGeometry . my:hasPointGeometry a rdf:Property ; rdfs:subPropertyOf geo:hasGeometry . my:AExactGeom a sf:Polygon ; geo:asWKT """ Polygon((-83.6 34.1, -83.2 34.1, -83.2 34.5, -83.6 34.5, -83.6 34.1))"""^^geo:wktLiteral. my:APointGeom a sf:Point ; geo:asWKT """ Point(-83.4 34.3)"""^^geo:wktLiteral. my:BExactGeom a sf:Polygon ; geo:asWKT """ Polygon((-83.6 34.1, -83.4 34.1, -83.4 34.3, -83.6 34.3, -83.6 34.1))"""^^geo:wktLiteral. my:BPointGeom a sf:Point ; geo:asWKT """ Point(-83.5 34.2)"""^^geo:wktLiteral. my:CExactGeom a sf:Polygon ; geo:asWKT """ Polygon((-83.2 34.3, -83.0 34.3, -83.0 34.5, -83.2 34.5, -83.2 34.3))"""^^geo:wktLiteral. my:CPointGeom a sf:Point ; geo:asWKT """ Point(-83.1 34.4)"""^^geo:wktLiteral. my:DExactGeom a sf:Polygon ; geo:asWKT """ Polygon((-83.3 34.0, -83.1 34.0, -83.1 34.2, -83.3 34.2, -83.3 34.0))"""^^geo:wktLiteral. my:DPointGeom a sf:Point ; geo:asWKT """ Point(-83.2 34.1)"""^^geo:wktLiteral. my:EExactGeom a sf:LineString ; geo:asWKT """ LineString(-83.4 34.0, -83.3 34.3)"""^^geo:wktLiteral. my:FExactGeom a sf:Point ; geo:asWKT """ Point(-83.4 34.4)"""^^geo:wktLiteral. ``` -------------------------------- ### Example GML Literal Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html An example of a GML Literal encoding a point Geometry in the WGS 84 coordinate system using GML version 3.2. The literal is explicitly typed as `geo:gmlLiteral`. ```turtle """ -83.38 33.95 """^^ ``` -------------------------------- ### Representing Spatio-Temporal Features with OWL TIME and GeoSPARQL Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Use this pattern to define a feature that has both spatial and temporal projections. The `time:hasTime` property can be applied to a `geo:Feature` to link it with temporal information, such as a `time:ProperInterval` with start and end dates. ```turtle :flooded-area-x a geo:Feature ; geo:hasGeometry [ a geo:Geometry ; geo:asWKT "POLYGON (((...)))"^^geo:wktLiteral ; ] ; time:hasTime [ a time:ProperInterval ; time:hasBeginning [ time:inXSDDate "..."^^xsd:date ; ] ; time:hasEnd [ time:inXSDDate "..."^^xsd:date ; ] ; ] ; . ``` -------------------------------- ### Calculate min/max coordinates of a geometry Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Demonstrates the use of `geof:minX`, `geof:maxX`, `geof:minY`, `geof:maxY`, `geof:minZ`, and `geof:maxZ` functions to find the bounding box coordinates of a 3D polygon. ```sparql PREFIX geo: PREFIX geof: SELECT ?minX ?minY ?minZ ?maxX ?maxY ?maxZ WHERE { BIND (" Polygon Z((-83.4 34.0 0, -83.1 34.0 1, -83.1 34.2 1, -83.4 34.2 1, -83.4 34.0 0))"^^geo:wktLiteral) AS ?testgeom) BIND(geof:minX(?testgeom) AS ?minX) BIND(geof:maxX(?testgeom) AS ?maxX) BIND(geof:minY(?testgeom) AS ?minY) BIND(geof:maxY(?testgeom) AS ?maxY) BIND(geof:maxZ(?testgeom) AS ?maxZ) BIND(geof:minZ(?testgeom) AS ?minZ) } ``` -------------------------------- ### Define Feature with GeoSPARQL Properties Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Demonstrates the usage of various GeoSPARQL properties for defining feature geometry, metrics, and spatial resolution. ```Turtle @prefix qudt: . eg:x     a geo:Feature ;     skos:preferredLabel "Feature X" ;     geo:hasGeometry [         geo:asWKT " POLYGON ((-35.23610 149.06016, ... , -35.23610 149.06016)))"^^geo:wktLiteral ;     ] ;     geo:hasDefaultGeometry [         geo:asWKT " POLYGON ((-35.2361 149.0601, ... , -35.2361 149.0601)))"^^geo:wktLiteral ;     ] ;     geo:hasMetricLength "355"^^xsd:double ;     geo:hasLength [         qudt:numericValue 355 ;         qudt:unit ;  # meter     ] ;     geo:hasMetricArea "8.7E4"^^xsd:double ;     geo:hasArea [         qudt:numericValue 8.7 ;         qudt:unit ;  # hectare     ] ;     geo:hasMetricVolume "624432"^^xsd:double ;     geo:hasVolume [         qudt:numericValue 624432 ;         qudt:unit ;  # cubic meter     ] ;     geo:hasCentroid [         geo:asWKT "POINT (149.06017 -35.23612)"^^geo:wktLiteral ;     ] ;     geo:hasBoundingBox [         geo:asWKT " POLYGON ((-35.236 149.060, ... , -35.236  149.060)))"^^geo:wktLiteral ;     ] ;     geo:hasMetricSpatialResolution "5"^^xsd:double ;     geo:hasSpatialResolution [         qudt:numericValue 5 ;         qudt:unit ;  # meter     ] ; . ``` -------------------------------- ### CQL2 Comparison Predicates to SPARQL Triple Patterns Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Illustrates the conversion of CQL2 comparison predicates into SPARQL triple patterns and FILTER expressions. Assumes '?item' represents the Feature Collection. ```sparql ?item my:name "OGC"^^xsd:string ``` ```sparql ?item my:number "5"^^xsd:integer ``` ```sparql ?item my:number ?number . FILTER(?number>5) ``` ```sparql ?item my:number ?number . FILTER(?number>=5 && ?number<=10) ``` ```sparql ?item my:name IN ("OGC", "W3C") ``` ```sparql EXISTS {?item my:name ?name } ``` ```sparql ?item my:name ?name . FILTER(regex(?name, "OGC.", "i" )) ``` ```sparql FILTER(geof:sfIntersects(?geometry1,?geometry2)) ``` -------------------------------- ### CQL2 Property Reference to SPARQL Triple Pattern Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Demonstrates how CQL2 property references are converted into SPARQL triple patterns. Assumes '?item' represents the Feature Collection. ```sparql ?item my:name "OGC"^^xsd:string ``` ```sparql ?item my:number "5"^^xsd:integer ``` ```sparql ?item my:number ?number . FILTER(?number>5) ``` -------------------------------- ### Query Feature Disjointness Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Example SPARQL query to check for disjointness using the GeoSPARQL Query Rewrite Extension. ```SPARQL PREFIX geo: SELECT (COUNT(*) AS ?cnt) WHERE { :f1 geo:sfDisjoint :f1 } ``` -------------------------------- ### GeoSPARQL Function Mappings Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html A reference mapping of Simple Features for SQL methods to GeoSPARQL equivalents. ```APIDOC ## GeoSPARQL Function Mappings ### Description This table maps functions and properties from Simple Features for SQL to GeoSPARQL equivalents. It covers basic geometry methods, spatial relations, and spatial analysis functions. ### Mapping Summary | Simple Features for SQL | GeoSPARQL Equivalent | Related Property | | :--- | :--- | :--- | | Dimension() | geof:dimension | geo:dimension | | SRID() | geof:getSRID | N/A | | Envelope() | geof:envelope | geo:hasBoundingBox | | AsText() | geof:asWKT | geo:asWKT | | IsEmpty() | geof:isEmpty | geo:isEmpty | | IsSimple() | N/A | geo:isSimple | | Boundary() | geof:boundary | N/A | | Equals() | geof:sfEquals | geo:sfEquals | | Disjoint() | geof:sfDisjoint | geo:sfDisjoint | | Intersects() | geof:sfIntersects | geo:sfIntersects | | Touches() | geof:sfTouches | geo:sfTouches | | Crosses() | geof:sfCrosses | geo:sfCrosses | | Within() | geof:sfWithin | geo:sfWithin | | Contains() | geof:sfContains | geo:sfContains | | Overlaps() | geof:sfOverlaps | geo:sfOverlaps | | Relate() | geof:relate | N/A | | Buffer() | geof:buffer | N/A | | ConvexHull() | geof:convexHull | N/A | | Intersection() | geof:intersection | N/A | | Union() | geof:union | N/A | | Difference() | geof:difference | N/A | | SymDifference() | geof:symDifference | N/A | | Length() | geof:length | geo:hasLength | | Area() | geof:area | geo:hasArea | | Centroid() | geof:centroid | geo:hasCentroid | ``` -------------------------------- ### Define a Geometry instance with GeoSPARQL properties Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Uses a Blank Node to define a Geometry instance linked to a Feature, including dimension, accuracy, and serialization properties. ```Turtle @prefix qudt: . @prefix unit: . eg:x     a geo:Feature ;     geo:hasGeometry [         skos:prefLabel "Geometry Y" ;         geo:dimension 2 ;         geo:coordinateDimension 2 ;         geo:spatialDimension 2 ;         geo:isEmpty false ;         geo:isSimple true ;         geo:hasSerialization " POLYGON ((-35.236 149.060, ... , -35.236 149.060)))"^^geo:wktLiteral ;         geo:hasSpatialAccuracy [             qudt:numericValue "30"^^xsd:float ;             qudt:unit unit:CentiM ; # centimetres         ] ;         geo:hasMetricSpatialAccuracy "0.3"^^xsd:double ;     ] ; . ``` -------------------------------- ### Buffer Function Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/functions.ttl Creates a buffer zone around a specified geometry. ```APIDOC ## Buffer Function ### Description A query function that returns a buffer around the input geometry. ### Method Not applicable (SPARQL function) ### Endpoint Not applicable (SPARQL function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **output** (geo:wktLiteral, geo:gmlLiteral, geo:geoJSONLiteral, geo:kmlLiteral, geo:dggsLiteral) - The resulting buffer geometry. #### Response Example None ### Parameters Details - **geom** (geo:wktLiteral, geo:gmlLiteral, geo:geoJSONLiteral, geo:kmlLiteral, geo:dggsLiteral) - Required - The input geometry. - **radius** (xsd:double) - Required - The radius of the buffer. - **units** (xsd:anyURI) - Required - The units for the radius (e.g., a URI representing meters or kilometers). - **output** (geo:wktLiteral, geo:gmlLiteral, geo:geoJSONLiteral, geo:kmlLiteral, geo:dggsLiteral) - Required - The resulting buffer geometry. ``` -------------------------------- ### Declare a GeoSPARQL Feature Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Declares a feature and assigns it a preferred label using skos:prefLabel. ```turtle eg:x a geo:Feature ; skos:prefLabel "Feature X" ; . ``` -------------------------------- ### Geometry Measurement Functions Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Functions for calculating lengths, perimeters, and coordinate bounds. ```APIDOC ## geof:metricLength ### Description Returns the length of the geometry in meters. ### Parameters - **geom** (ogc:geomLiteral) - Required - The geometry to measure. ### Response - **result** (xsd:double) - Length in meters. ## geof:maxX ### Description Returns the maximum X coordinate for the geometry. ### Parameters - **geom** (ogc:geomLiteral) - Required - The geometry to evaluate. ### Response - **result** (xsd:double) - Maximum X coordinate. ``` -------------------------------- ### Model PROV Derivation Relation Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Shows how to express a derivation relationship between two GeoSPARQL objects using the PROV ontology. ```turtle :bounding-box-y prov:wasDerivedFrom :polygon-x . ``` -------------------------------- ### Calculate Bounding Circle Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Returns the minimum bounding circle around the provided geometry. ```SPARQL geof:boundingCircle (geom: ogc:geomLiteral): ogc:geomLiteral ``` -------------------------------- ### Declare Geometry with WKT Serialization Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Declares a Geometry instance with an absolute URI and its spatial data in Well-Known Text (WKT) format. WGS84 is the default CRS if none is declared. ```turtle     a geo:Geometry ;     skos:prefLabel "Geometry Y";     geo:asWKT "MULTIPOLYGON (((149.06016 -35.23610, 149.060620 -35.236043, ... , 149.06016 -35.23610)))"^^geo:wktLiteral ; . ``` -------------------------------- ### GeoSPARQL Simple Features Topological Functions Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/functions.ttl Functions based on the OGC Simple Features for SQL specification. ```APIDOC ## GeoSPARQL Simple Features Topological Functions ### Description Implements topological spatial relations based on the OGC Simple Features specification. ### Method Not applicable (these are functions used within SPARQL queries). ### Endpoint Not applicable (these are functions used within SPARQL queries). ### Parameters This section is not applicable as these are functions used within SPARQL queries. ### Request Example ```sparql SELECT ?result WHERE { ?geom1 geo:sfIntersects ?geom2 . BIND(geof:sfIntersects(?geom1, ?geom2) AS ?result) } ``` ### Response Boolean results indicating the spatial relationship between geometries based on Simple Features. ``` -------------------------------- ### asWKT Function Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/functions.ttl Converts a given geometry to an equivalent WKT representation. ```APIDOC ## asWKT ### Description Converts a given geometry to an equivalent WKT representation preserving the coordinate reference system and geometry type, if possible. ### Parameters #### Request Body - **geom** (geo:wktLiteral, geo:gmlLiteral, geo:geoJSONLiteral, geo:kmlLiteral, geo:dggsLiteral) - Required - The input geometry to convert. ### Response #### Success Response (200) - **output** (geo:wktLiteral) - The WKT representation of the geometry. ``` -------------------------------- ### Original query for sfOverlaps Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html The initial, simpler query to find features or geometries that overlap with `my:A`. ```sparql PREFIX geo: SELECT ?f WHERE { ?f geo:sfOverlaps my:A } ``` -------------------------------- ### Transformed query for sfOverlaps with rule application Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html The transformed query after applying the `geor:sfOverlaps` rule, demonstrating various cases (feature-feature, feature-geometry, geometry-feature, geometry-geometry) and using `geof:sfOverlaps`. ```sparql PREFIX my: PREFIX geo: PREFIX geof: SELECT ?f WHERE { { # check for asserted statement ?f geo:sfOverlaps my:A } UNION { # feature – feature ?f geo:hasDefaultGeometry ?fGeom . ?fGeom geo:asWKT ?fSerial . my:A geo:hasDefaultGeometry ?aGeom . ?aGeom geo:asWKT ?aSerial . FILTER (geof:sfOverlaps(?fSerial, ?aSerial)) } UNION { # feature – geometry ?f geo:hasDefaultGeometry ?fGeom . ?fGeom geo:asWKT ?fSerial . my:A geo:asWKT ?aSerial . FILTER (geof:sfOverlaps(?fSerial, ?aSerial)) } UNION { # geometry – feature ?f geo:asWKT ?fSerial . my:A geo:hasDefaultGeometry ?aGeom . ?aGeom geo:asWKT ?aSerial . FILTER (geof:sfOverlaps(?fSerial, ?aSerial)) } UNION { # geometry – geometry ?f geo:asWKT ?fSerial . my:A geo:asWKT ?aSerial . FILTER (geof:sfOverlaps(?fSerial, ?aSerial)) } } ``` -------------------------------- ### GeoSPARQL Function Definitions Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Summary of available GeoSPARQL functions categorized by their functional domain. ```APIDOC ## GeoSPARQL Functions Summary ### Simple Features Functions - sfContains: 2x ogc:geomLiteral -> xsd:boolean - sfCrosses: 2x ogc:geomLiteral -> xsd:boolean - sfDisjoint: 2x ogc:geomLiteral -> xsd:boolean - sfEquals: 2x ogc:geomLiteral -> xsd:boolean - sfIntersects: 2x ogc:geomLiteral -> xsd:boolean - sfOverlaps: 2x ogc:geomLiteral -> xsd:boolean - sfTouches: 2x ogc:geomLiteral -> xsd:boolean - sfWithin: 2x ogc:geomLiteral -> xsd:boolean ### Egenhofer Functions - ehContains, ehCoveredBy, ehCovers, ehDisjoint, ehEquals, ehMeet, ehOverlap, ehInside: 2x ogc:geomLiteral -> xsd:boolean ### Region Connection Calculus (RCC8) - rcc8dcc, rcc8ecc, rcc8eq, rcc8ntpp, rcc8ntppi, rcc8po, rcc8tpp, rcc8tppi: 2x ogc:geomLiteral -> xsd:boolean ### Spatial Aggregate Functions - aggBoundingBox, aggBoundingCircle, aggCentroid, aggConcaveHull, aggConvexHull, aggUnion: 1+ ogc:geomLiteral -> ogc:geomLiteral ### Non-topological Query Functions - metricArea, area: 1x ogc:geomLiteral -> xsd:double - boundary: 1x ogc:geomLiteral -> ogc:geomLiteral - buffer: 1x ogc:geomLiteral, 1x xsd:double, 1x xsd:anyURI -> ogc:geomLiteral - distance: 2x ogc:geomLiteral, 1x xsd:anyURI -> rdfs:Resource - transform: 1x ogc:geomLiteral, 1x xsd:anyURI -> ogc:geomLiteral ``` -------------------------------- ### Feature with Multiple Geometries and Annotations Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Declares a feature with two different geometry instances, each with descriptive labels and comments. ```turtle eg:x a geo:Feature ; skos:prefLabel "Feature X"; geo:hasGeometry [ rdfs:label "Official boundary" ; rdfs:comment "Official boundary from the Department of Xxx" ; geo:asWKT "MULTIPOLYGON (((149.06016 -35.23610, 149.06062 -35.23604, ... , 149.06016 -35.23610))"^^geo:wktLiteral ; ] , [ rdfs:label "Unofficial boundary" ; rdfs:comment "Unofficial boundary as actually used by everyone" ; geo:asWKT "MULTIPOLYGON (((149.06016 -35.23610, 149.06062 -35.23604, ... , 149.06016 -35.23610))"^^geo:wktLiteral ; ] ; . ``` -------------------------------- ### Encode DCMI Point as GeoSPARQL Geometry Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Demonstrates how to represent a DCMI Point Encoding Scheme value as a GeoSPARQL geometry literal using a custom datatype. ```turtle :mt-kosciusko     a geo:Feature ;     geo:hasGeometry [         a geo:Geometry ;         geo:hasSerialization "east=148.26218; north=-36.45746; elevation=2228; name=Mt. Kosciusko"^^ex:dcmiPoint ;     ] ; . ``` -------------------------------- ### Define GeoSPARQL 1.1 Function Concept Scheme Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/functions.ttl Defines the primary concept scheme for GeoSPARQL 1.1 functions, listing all available spatial functions as top concepts. ```turtle PREFIX cs: PREFIX dcterms: PREFIX geof: PREFIX geofp: PREFIX geofo: PREFIX owl: PREFIX policy: PREFIX rdfs: PREFIX ogc: PREFIX sd: PREFIX schema: PREFIX geo: PREFIX skos: PREFIX spec11: PREFIX status: PREFIX fno: PREFIX xsd: cs: a skos:ConceptScheme ; schema:dateCreated "2021-06-16"^^xsd:date ; schema:license "https://www.ogc.org/license"^^xsd:anyURI ; schema:dateModified "2023-11-30"^^xsd:date ; schema:coyrightNotice "(c) 2023 Open Geospatial Consortium" ; dcterms:source ; schema:creator ; schema:publisher ; owl:versionIRI geof:1.1 ; rdfs:seeAlso ; skos:definition "All the GeoSPARQL Functions defined within the GeoSPARQL 1.1 specification"@en ; skos:hasTopConcept geof:area , geof:asDGGS , geof:asGML , geof:asGeoJSON , geof:asKML , geof:asWKT , geof:boundary , geof:boundingCircle , geof:buffer , geof:concaveHull , geof:convexHull , geof:difference , geof:dimension , geof:distance , geof:ehContains , geof:ehCoveredBy , geof:ehCovers , geof:ehDisjoint , geof:ehEquals , geof:ehInside , geof:ehMeet , geof:ehOverlap , geof:envelope , geof:getSRID , geof:intersection , geof:isEmpty , geof:isSimple , geof:length , geof:maxX , geof:maxY , geof:maxZ , geof:metricArea , geof:metricBuffer , geof:metricDistance , geof:metricLength , geof:metricPerimeter , geof:minX , geof:minY , geof:minZ , geof:perimeter , geof:rcc8dc , geof:rcc8ec , geof:rcc8eq , geof:rcc8ntpp , geof:rcc8ntppi , geof:rcc8po , geof:rcc8tpp , geof:rcc8tppi , geof:relate , geof:sfContains , geof:sfCrosses , geof:sfDisjoint , geof:sfEquals , geof:sfIntersects , geof:sfOverlaps , geof:sfTouches , geof:sfWithin , geof:symDifference , geof:union ; skos:historyNote """2025-11: Made OntPub valid 2022: This vocabulary was generated for GeoSPARQL 1.1 using some content that was already specified for GeoSPARQL 1.0""" ; skos:prefLabel "GeoSPARQL 1.1 Functions"@en ; . ``` -------------------------------- ### CQL2 Spatial Operators to GeoSPARQL Filter Functions Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/document.html Shows the mapping of CQL2 spatial filter expressions to their equivalent GeoSPARQL FILTER functions. ```sparql FILTER(geof:sfContains(?geometry1,?geometry2)) ``` ```sparql FILTER(geof:sfCrosses(?geometry1,?geometry2)) ``` ```sparql FILTER(geof:sfDisjoint(?geometry1,?geometry2)) ``` ```sparql FILTER(geof:sfEquals(?geometry1,?geometry2)) ``` ```sparql FILTER(geof:sfIntersects(?geometry1,?geometry2)) ``` ```sparql FILTER(geof:sfOverlaps(?geometry1,?geometry2)) ``` ```sparql FILTER(geof:sfTouches(?geometry1,?geometry2)) ``` ```sparql FILTER(geof:sfWithin(?geometry1,?geometry2)) ``` -------------------------------- ### geof:getSRID Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/functions.ttl Retrieves the Spatial Reference System URI. ```APIDOC ## geof:getSRID ### Description A query function that returns the spatial reference system URI of the input geometry. ### Parameters #### Query Parameters - **geom1** (geo:wktLiteral, geo:gmlLiteral, geo:geoJSONLiteral, geo:kmlLiteral, geo:dggsLiteral) - Required - The input geometry. ### Response #### Success Response (200) - **output** (xsd:anyURI) - The spatial reference system URI. ``` -------------------------------- ### geof:boundary Source: https://opengeospatial.github.io/ogc-geosparql/geosparql11/functions.ttl Returns the boundary of the input geometry. ```APIDOC ## geof:boundary ### Description A query function that returns the boundary of the input geometry. ### Parameters #### Path Parameters - **geom** (geo:wktLiteral, geo:gmlLiteral, geo:geoJSONLiteral, geo:kmlLiteral, geo:dggsLiteral) - Required - The input geometry. ### Response #### Success Response (200) - **output** (geo:wktLiteral, geo:gmlLiteral, geo:geoJSONLiteral, geo:kmlLiteral, geo:dggsLiteral) - The boundary geometry. ```