Difference between revisions of "Geo Module"

From BaseX Documentation
Jump to navigation Jump to search
Line 1: Line 1:
Geo Module adds the support of [http://expath.org/spec/geo ExPath Geo Module] to BaseX. Based on [http://www.vividsolutions.com/jts/jtshome.htm JTS], GML 2 queris are parsed and evaluated to show in the BaseX frontend.  
+
Geo Module adds the support of [http://expath.org/spec/geo ExPath Geo Module] for GML 2 to BaseX. Based on [http://www.vividsolutions.com/jts/jtshome.htm JTS], GML 2 queris are parsed and evaluated to show in the BaseX frontend.  
  
=Functions=
+
=General Functions=
  
 
==geo:dimension==
 
==geo:dimension==
Line 7: Line 7:
 
|-
 
|-
 
| width='90' | '''Signatures'''
 
| width='90' | '''Signatures'''
|{{Func|geo:dimension|$geometry as node()|xs:integer()*}}
+
|{{Func|geo:dimension|$geometry as element(*)|xs:integer()*}}
 
|-
 
|-
 
| '''Summary'''
 
| '''Summary'''
| Returns the dimension of given geometry  {{Code|$geometry}}.
+
| Returns the dimension of the given geometry  {{Code|$geometry}}.
 
|-
 
|-
 
| '''Errors'''
 
| '''Errors'''
|-
+
|{{Error|GEO0001|#Errors}} the given element is not recognized as a valid geometry.<br />{{Error|GEO0002|#Errors}} the given element cannot be read by reader for some reason.<br />
| '''Examples'''
 
 
|}
 
|}
 +
  
  
Line 22: Line 22:
 
|-
 
|-
 
| width='90' | '''Signatures'''
 
| width='90' | '''Signatures'''
|{{Func|geo:geometryType|$geometry as node()|xs:QName()?}}
+
|{{Func|geo:geometryType|$geometry as element(*)|xs:QName()?}}
 
|-
 
|-
 
| '''Summary'''
 
| '''Summary'''
| Returns the name of the geometry type of given geometry  {{Code|$geometry}}.
+
| Returns the name of the geometry type of given geometry  {{Code|$geometry}} or an empty sequence, if the geometry is not recognized with an error massage .
 
|-
 
|-
 
| '''Errors'''
 
| '''Errors'''
 +
|{{Error|GEO0001|#Errors}} the given element is not recognized as a valid geometry.<br />{{Error|GEO0002|#Errors}} the given element cannot be read by reader for some reason.<br />
 +
|}
 +
 +
 +
 +
==geo:envelope==
 +
{| width='100%'
 +
|-
 +
| width='90' | '''Signatures'''
 +
|{{Func|geo:geometryType|$geometry as element(*)|xs:QName()?}}
 +
|-
 +
| '''Summary'''
 +
| Returns the gml:Envelope of the giv engeometry  {{Code|$geometry}}. The envelope is the minimum bounding box of this geometry
 
|-
 
|-
| '''Examples'''
+
| '''Errors'''
 +
|{{Error|GEO0001|#Errors}} the given element is not recognized as a valid geometry.<br />{{Error|GEO0002|#Errors}} the given element cannot be read by reader for some reason.<br />
 
|}
 
|}

Revision as of 12:27, 4 January 2013

Geo Module adds the support of ExPath Geo Module for GML 2 to BaseX. Based on JTS, GML 2 queris are parsed and evaluated to show in the BaseX frontend.

General Functions

geo:dimension

Signatures geo:dimension($geometry as element(*)) as xs:integer()*
Summary Returns the dimension of the given geometry $geometry.
Errors GEO0001: the given element is not recognized as a valid geometry.
GEO0002: the given element cannot be read by reader for some reason.


geo:geometryType

Signatures geo:geometryType($geometry as element(*)) as xs:QName()?
Summary Returns the name of the geometry type of given geometry $geometry or an empty sequence, if the geometry is not recognized with an error massage .
Errors GEO0001: the given element is not recognized as a valid geometry.
GEO0002: the given element cannot be read by reader for some reason.


geo:envelope

Signatures geo:geometryType($geometry as element(*)) as xs:QName()?
Summary Returns the gml:Envelope of the giv engeometry $geometry. The envelope is the minimum bounding box of this geometry
Errors GEO0001: the given element is not recognized as a valid geometry.
GEO0002: the given element cannot be read by reader for some reason.