Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Marmotta Wiki" for 
change notification.

The "MARMOTTA-584/UserDocumentation" page has been changed by Francisco Sumba:
https://wiki.apache.org/marmotta/MARMOTTA-584/UserDocumentation?action=diff&rev1=8&rev2=9

  To import a new file you could go to '''''Core Services >> Import''''' and 
import your RDF file. Once loaded your RDF file you could execute queries in 
'''''SPARQL >> Query'''''.
  }}}
  
- == Boolean Functions ==
+ == SF Boolean Functions ==
  
  === Contains ===
  Returns true if and only if no points of B lie in the exterior of A, and at 
least one point of the interior of B lies in the interior of A.
@@ -29, +29 @@

  
  SELECT DISTINCT ?labelMunicipios 
  WHERE {  
-   ?class a <http://geo.marmotta.es/ontology#provincia>.
+   ?subject a <http://geo.marmotta.es/ontology#provincia>.
-   ?class rdfs:label "Madrid"@es.
+   ?subject rdfs:label "Madrid"@es.
-   ?class geoes:hasExactGeometry ?geo.
+   ?subject geoes:hasExactGeometry ?geo.
    ?geo geo:asWKT ?wkt.
    
-   ?class2 a <http://geo.marmotta.es/ontology#municipio>.
+   ?subject2 a <http://geo.marmotta.es/ontology#municipio>.
-   ?class2 rdfs:label ?labelMunicipios.
+   ?subject2 rdfs:label ?labelMunicipios.
-   ?class2 geoes:hasExactGeometry ?geo2.
+   ?subject2 geoes:hasExactGeometry ?geo2.
    ?geo2 geo:asWKT ?wkt2.
    
    FILTER (geof:sfContains(?wkt, ?wkt2))
@@ -72, +72 @@

  
  SELECT DISTINCT ?labelRios 
  WHERE {  
-   ?class a <http://geo.marmotta.es/ontology#provincia>.
+   ?subject a <http://geo.marmotta.es/ontology#provincia>.
-   ?class rdfs:label "Madrid"@es.
+   ?subject rdfs:label "Madrid"@es.
-   ?class geoes:hasExactGeometry ?geo.
+   ?subject geoes:hasExactGeometry ?geo.
    ?geo geo:asWKT ?wkt.
    
-   ?class2 a <http://geo.marmotta.es/ontology#rio>.
+   ?subject2 a <http://geo.marmotta.es/ontology#rio>.
-   ?class2 rdfs:label ?labelRios.
+   ?subject2 rdfs:label ?labelRios.
-   ?class2 geoes:hasExactGeometry ?geo2.
+   ?subject2 geoes:hasExactGeometry ?geo2.
    ?geo2 geo:asWKT ?wkt2.
    
    FILTER (geof:sfCrosses(?wkt, ?wkt2))      
@@ -110, +110 @@

  
  SELECT DISTINCT ?labelRios 
  WHERE {  
-   ?class a <http://geo.marmotta.es/ontology#provincia>.
+   ?subject a <http://geo.marmotta.es/ontology#provincia>.
-   ?class rdfs:label "Barcelona"@es.
+   ?subject rdfs:label "Barcelona"@es.
-   ?class geoes:hasExactGeometry ?geo.
+   ?subject geoes:hasExactGeometry ?geo.
    ?geo geo:asWKT ?wkt.
    
-   ?class2 a <http://geo.marmotta.es/ontology#rio>.
+   ?subject2 a <http://geo.marmotta.es/ontology#rio>.
-   ?class2 rdfs:label ?labelRios.
+   ?subject2 rdfs:label ?labelRios.
-   ?class2 geoes:hasExactGeometry ?geo2.
+   ?subject2 geoes:hasExactGeometry ?geo2.
    ?geo2 geo:asWKT ?wkt2.
    
    FILTER (geof:sfDisjoint(?wkt, ?wkt2))      
@@ -181, +181 @@

  
  SELECT DISTINCT ?labelRios 
  WHERE {  
-   ?class a <http://geo.marmotta.es/ontology#rio>.
+   ?subject a <http://geo.marmotta.es/ontology#rio>.
-   ?class rdfs:label ?labelRios.
+   ?subject rdfs:label ?labelRios.
-   ?class geoes:hasExactGeometry ?geo.
+   ?subject geoes:hasExactGeometry ?geo.
    ?geo geo:asWKT ?wkt.
    
-   ?class2 a <http://geo.marmotta.es/ontology#provincia>.
+   ?subject2 a <http://geo.marmotta.es/ontology#provincia>.
-   ?class2 rdfs:label "Madrid"@es.
+   ?subject2 rdfs:label "Madrid"@es.
-   ?class2 geoes:hasExactGeometry ?geo2.
+   ?subject2 geoes:hasExactGeometry ?geo2.
    ?geo2 geo:asWKT ?wkt2.
  
    FILTER (geof:sfIntersects(?wkt, ?wkt2))      
@@ -220, +220 @@

  
  SELECT DISTINCT ?labelMunicipios 
  WHERE {  
-   ?class a <http://geo.marmotta.es/ontology#provincia>.
+   ?subject a <http://geo.marmotta.es/ontology#provincia>.
-   ?class rdfs:label "Madrid"@es.
+   ?subject rdfs:label "Madrid"@es.
-   ?class geoes:hasExactGeometry ?geo.
+   ?subject geoes:hasExactGeometry ?geo.
    ?geo geo:asWKT ?wkt.
    
-   ?class2 a <http://geo.marmotta.es/ontology#municipio>.
+   ?subject2 a <http://geo.marmotta.es/ontology#municipio>.
-   ?class2 rdfs:label ?labelMunicipios.
+   ?subject2 rdfs:label ?labelMunicipios.
-   ?class2 geoes:hasExactGeometry ?geo2.
+   ?subject2 geoes:hasExactGeometry ?geo2.
    ?geo2 geo:asWKT ?wkt2.
    
    FILTER (geof:sfOverlaps(?wkt, ?wkt2))      
@@ -263, +263 @@

  
  SELECT DISTINCT ?labelRios 
  WHERE {  
-   ?class a <http://geo.marmotta.es/ontology#provincia>.
+   ?subject a <http://geo.marmotta.es/ontology#provincia>.
-   ?class rdfs:label "Madrid"@es.
+   ?subject rdfs:label "Madrid"@es.
-   ?class geoes:hasExactGeometry ?geo.
+   ?subject geoes:hasExactGeometry ?geo.
    ?geo geo:asWKT ?wkt.
    
-   ?class2 a <http://geo.marmotta.es/ontology#rio>.
+   ?subject2 a <http://geo.marmotta.es/ontology#rio>.
-   ?class2 rdfs:label ?labelRios.
+   ?subject2 rdfs:label ?labelRios.
-   ?class2 geoes:hasExactGeometry ?geo2.
+   ?subject2 geoes:hasExactGeometry ?geo2.
    ?geo2 geo:asWKT ?wkt2.
    
    FILTER (geof:relate(?wkt, ?wkt2, 'T********'))      
@@ -302, +302 @@

  
  SELECT DISTINCT *
  WHERE {  
-   ?class a <http://geo.marmotta.es/ontology#provincia>.
+   ?subject a <http://geo.marmotta.es/ontology#provincia>.
-   ?class rdfs:label "Cuenca"@es.
+   ?subject rdfs:label "Cuenca"@es.
-   ?class geoes:hasExactGeometry ?geo.
+   ?subject geoes:hasExactGeometry ?geo.
    ?geo geo:asWKT ?wkt.
  
-   ?class2 a <http://geo.marmotta.es/ontology#provincia>.
+   ?subject2 a <http://geo.marmotta.es/ontology#provincia>.
-   ?class2 rdfs:label "Madrid"@es.
+   ?subject2 rdfs:label "Madrid"@es.
-   ?class2 geoes:hasExactGeometry ?geo2.
+   ?subject2 geoes:hasExactGeometry ?geo2.
    ?geo2 geo:asWKT ?wkt2.
     
    FILTER (geof:sfTouches(?wkt, ?wkt2))  
@@ -331, +331 @@

  
  SELECT DISTINCT ?labelMunicipios
  WHERE {  
-   ?class a <http://geo.marmotta.es/ontology#municipio>.
+   ?subject a <http://geo.marmotta.es/ontology#municipio>.
-   ?class rdfs:label ?labelMunicipios.
+   ?subject rdfs:label ?labelMunicipios.
-   ?class geoes:hasExactGeometry ?geo.
+   ?subject geoes:hasExactGeometry ?geo.
    ?geo geo:asWKT ?wkt.
    
-   ?class2 a <http://geo.marmotta.es/ontology#provincia>.
+   ?subject2 a <http://geo.marmotta.es/ontology#provincia>.
-   ?class2 rdfs:label "Madrid"@es.
+   ?subject2 rdfs:label "Madrid"@es.
-   ?class2 geoes:hasExactGeometry ?geo2.
+   ?subject2 geoes:hasExactGeometry ?geo2.
    ?geo2 geo:asWKT ?wkt2.
  
    FILTER (geof:sfWithin(?wkt, ?wkt2))  
@@ -394, +394 @@

  
  SELECT DISTINCT ?wkt (geof:convexHull(?wkt) as ?convexHull)
  WHERE {  
-   ?class a <http://geo.marmotta.es/ontology#provincia>.
+   ?subject a <http://geo.marmotta.es/ontology#provincia>.
-   ?class rdfs:label "Barcelona"@es.
+   ?subject rdfs:label "Barcelona"@es.
-   ?class geoes:hasExactGeometry ?geo.
+   ?subject geoes:hasExactGeometry ?geo.
    ?geo geo:asWKT ?wkt.
  }
  }}}
@@ -419, +419 @@

  
  SELECT DISTINCT ?wkt ?wkt2 (geof:difference(?wkt,?wkt2) as ?difference)
  WHERE {  
-   ?class a <http://geo.marmotta.es/ontology#rio>.
+   ?subject a <http://geo.marmotta.es/ontology#rio>.
-   ?class rdfs:label "Río Ebro" @es.
+   ?subject rdfs:label "Río Ebro" @es.
-   ?class geoes:hasExactGeometry ?geo.
+   ?subject geoes:hasExactGeometry ?geo.
    ?geo geo:asWKT ?wkt.
    
-   ?class2 a <http://geo.marmotta.es/ontology#rio>.
+   ?subject2 a <http://geo.marmotta.es/ontology#rio>.
-   ?class2 rdfs:label "Río Matarraña" @es.
+   ?subject2 rdfs:label "Río Matarraña" @es.
-   ?class2 geoes:hasExactGeometry ?geo2.
+   ?subject2 geoes:hasExactGeometry ?geo2.
    ?geo2 geo:asWKT ?wkt2.
  } 
  }}}
@@ -436, +436 @@

  || '''''?wkt'''''|| '''''?wkt2''''' || '''''?difference''''' ||
  || {{attachment:difference_wkt.png|?wkt|width=200}} || 
{{attachment:difference_wkt2.png|?convexHull|width=200}} || 
{{attachment:difference_difference.png|?convexHull|width=200}} ||
  === Distance ===
+ Returns the shortest distance in units between any two Points in the two 
geometric objects as calculated in the spatial reference system of geom1.
+ 
+ '''Syntax:''' ''geof:distance (geom1, geom2, units)''
+ 
+ '''Sample Query'''
+ {{{
+ PREFIX geoes: <http://geo.marmotta.es/ontology#>
+ PREFIX geo: <http://www.opengis.net/ont/geosparql#>
+ PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
+ PREFIX units: <http://www.opengis.net/def/uom/OGC/1.0/>
+ 
+ SELECT DISTINCT ?provinceA ?provinceB (geof:distance(?wktA, ?wktB, 
units:meter) as ?distance)
+ WHERE {  
+   ?subject a <http://geo.marmotta.es/ontology#provincia>.
+   ?subject rdfs:label ?provinceA.
+   ?subject rdfs:label "Barcelona" @es.
+   ?subject geoes:hasExactGeometry ?geo.
+   ?geo geo:asWKT ?wktA.
+   
+   ?subject2 a <http://geo.marmotta.es/ontology#provincia>.
+   ?subject2 rdfs:label ?provinceB.
+   ?subject2 rdfs:label "Madrid" @es.
+   ?subject2 geoes:hasExactGeometry ?geo2.
+   ?geo2 geo:asWKT ?wktB.
+ } 
+ }}}
+ 
+ As result of this query we get the distance in meters among Barcelona and 
Madrid province.
+ 
+ || '''''provinceA''''' || '''''provinceB''''' || '''''distance''''' ||
+ || Barcelona @es || Madrid @es || 400521.0709950822 ^^xsd:double ||
+ 
  === Envelope ===
+ This function returns the minimum bounding box of geom1. Calculations are in 
the spatial reference system of geom1.
+ 
+ '''Syntax:''' ''geof:envelope (geom1)''
+ 
+ '''Sample Query'''
+ {{{
+ PREFIX geoes: <http://geo.marmotta.es/ontology#>
+ PREFIX geo: <http://www.opengis.net/ont/geosparql#>
+ PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
+ 
+ SELECT DISTINCT ?wkt (geof:envelope(?wkt) as ?envelope)
+ WHERE {  
+   ?subject a <http://geo.marmotta.es/ontology#provincia>.
+   ?subject rdfs:label "Madrid" @es.
+   ?subject geoes:hasExactGeometry ?geo.
+   ?geo geo:asWKT ?wkt.
+ } 
+ }}}
+ 
+ As result of this query we get a bounding box of Madrid. In graphics you can 
see [[ https://en.wikipedia.org/wiki/Well-known_text#Geometric_Objects| WKT 
(Well Known text)]] drawn in open layers.
+ 
+ || '''''?wkt'''''|| '''''?envelope''''' ||
+ || {{attachment:evelope_wkt.png|?wkt|width=200}} || 
{{attachment:envelope_envelope.png|?convexHull|width=200}} ||
+ 
  === Intersection ===
+ This function returns a geometric object that represents all Points in the 
intersection of geom1 with geom2. Calculations are in the spatial reference 
system of geom1.
+ 
+ '''Syntax:''' ''geof:intersection(geom1,geom2)''
+ 
+ '''Sample Query'''
+ {{{
+ }}}
  === Sym Difference ===
+ This function returns a geometric object that represents all Points in the 
set symmetric difference of geom1 with geom2. Calculations are in the spatial 
reference system of geom1.
+ 
+ '''Syntax:''' ''geof:symDifference(geom1, geom2)''
+ 
+ '''Sample Query'''
+ {{{
+ }}}
+ 
  === Union ===
+ This function returns a geometric object that represents all Points in the 
union of geom1 with geom2. Calculations are in the spatial reference system of 
geom1.
  
+ '''Syntax:''' ''geof:union(geom1, geom2)''
+ 
+ '''Sample Query'''
+ {{{
+ }}}
+ 

Reply via email to