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=6&rev2=7 || Río Jarama @es || === Touches === + Returns TRUE if the geometries have at least one point in common, but their interiors do not intersect. + + '''Syntax:''' ''geof:sfTouches(geom1, geom2)'' + + '''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 * + WHERE { + ?class a <http://geo.marmotta.es/ontology#provincia>. + ?class rdfs:label "Cuenca"@es. + ?class geoes:hasExactGeometry ?geo. + ?geo geo:asWKT ?wkt. + + ?class2 a <http://geo.marmotta.es/ontology#provincia>. + ?class2 rdfs:label "Madrid"@es. + ?class2 geoes:hasExactGeometry ?geo2. + ?geo2 geo:asWKT ?wkt2. + + FILTER (geof:sfTouches(?wkt, ?wkt2)) + } + }}} + + As result you are going to get one result, because both provinces (Madrid and Cuenca) touches between them. + === Within === + Returns true if the geometry A is completely inside geometry B + + '''Syntax:''' ''geof:sfWithin(geomA, geomB)'' + + '''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 ?labelMunicipios + WHERE { + ?class a <http://geo.marmotta.es/ontology#municipio>. + ?class rdfs:label ?labelMunicipios. + ?class geoes:hasExactGeometry ?geo. + ?geo geo:asWKT ?wkt. + + ?class2 a <http://geo.marmotta.es/ontology#provincia>. + ?class2 rdfs:label "Madrid"@es. + ?class2 geoes:hasExactGeometry ?geo2. + ?geo2 geo:asWKT ?wkt2. + + FILTER (geof:sfWithin(?wkt, ?wkt2)) + } + ORDER BY ?labelMunicipios + LIMIT 10 + }}} + + As result of this query we get the first ten towns within of Madrid province. + + || '''''labelMunicipios''''' || + || Ajalvir @es || + || Alcalá de Henares @es || + || Alcobendas @es || + || Alcorcón @es || + || Algete @es || + || Alpedrete @es || + || Anchuelo @es || + || Arganda del Rey @es || + || Arroyomolinos @es || + || Becerril de la Sierra @es || == Non-Topological Functions == === Boundary === + Returns the closure of the combinatorial boundary of this Geometry. + + '''Syntax:''' ''geof:boundary(geomA)'' + + '''Sample Query''' + {{{ + }}} + === Buffer === + This function returns a geometric object that represents all Points whose distance from geom1 is less than or equal to the radius measured in units. Calculations are in the spatial reference system of geom1. + + '''Syntax:''' ''geof:buffer(geom1, radius, units)'' + + '''Sample Query''' + {{{ + }}} + === Convex Hull === + This function returns a geometric object that represents all Points in the convex hull of geom1. Calculations are in the spatial reference system of geom1. + + '''Syntax:''' ''geof:convexHull(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:convexHull(?wkt) as ?convexHull) + WHERE { + ?class a <http://geo.marmotta.es/ontology#provincia>. + ?class rdfs:label "Barcelona"@es. + ?class geoes:hasExactGeometry ?geo. + ?geo geo:asWKT ?wkt. + } + }}} + + As result of this query we get a geometric object that represents all the points in the convex hull of Barcelona province. In graphics you can see [[ https://en.wikipedia.org/wiki/Well-known_text#Geometric_Objects| WKT (Well Known text)]] drawn in openlayers. + + || '''''?wkt'''''|| '''''?convexHull''''' || + || {{attachment:convexHull_wkt.png|?wkt|width=200}} || {{attachment:convexHull__convexHull.png|?convexHull|width=200}} || + === Difference === + This function returns a geometric object that represents all Points in the set difference of geom1 with geom2. Calculations are in the spatial reference system of geom1 + + '''Syntax:''' ''geof:difference (geom1, geom2)'' + + '''Sample Query''' + {{{ + }}} === Distance === === Envelope === === Intersection ===
