Difference between revisions of "Geo Module"
Jump to navigation
Jump to search
Line 195:  Line 195:  
T*****T** (for L/P, A/P, and A/L situations)<br />  T*****T** (for L/P, A/P, and A/L situations)<br />  
0******** (for L/L situations).<br />  0******** (for L/L situations).<br />  
+    
+   '''Errors'''  
+  {{ErrorGEO0001#Errors}} the given element(s) is not recognized as a valid geometry (QName).<br />{{ErrorGEO0002#Errors}} the given element cannot be read by reader for some reason.<br />  
+  }  
+  
+  
+  
+  
+  ==geo:within==  
+  { width='100%'  
+    
+   width='90'  '''Signatures'''  
+  {{Funcgeo:within$geometry1 as element(*), $geometry2 as element(*)xs:boolean}}  
+    
+   '''Summary'''  
+   Returns whether geometry1 {{Code$geometry1}} is spatially within $geometry2 {{Code$geometry2}}.  
+    
+   '''Errors'''  
+  {{ErrorGEO0001#Errors}} the given element(s) is not recognized as a valid geometry (QName).<br />{{ErrorGEO0002#Errors}} the given element cannot be read by reader for some reason.<br />  
+  }  
+  
+  
+  
+  
+  ==geo:contains==  
+  { width='100%'  
+    
+   width='90'  '''Signatures'''  
+  {{Funcgeo:contains$geometry1 as element(*), $geometry2 as element(*)xs:boolean}}  
+    
+   '''Summary'''  
+   Returns whether geometry1 {{Code$geometry1}} is spatially contains $geometry2 {{Code$geometry2}}. Returns true if within function of these two geometries also returns true.  
+    
+   '''Errors'''  
+  {{ErrorGEO0001#Errors}} the given element(s) is not recognized as a valid geometry (QName).<br />{{ErrorGEO0002#Errors}} the given element cannot be read by reader for some reason.<br />  
+  }  
+  
+  
+  
+  
+  ==geo:overlaps==  
+  { width='100%'  
+    
+   width='90'  '''Signatures'''  
+  {{Funcgeo:overlaps$geometry1 as element(*), $geometry2 as element(*)xs:boolean}}  
+    
+   '''Summary'''  
+   Returns whether geometry1 {{Code$geometry1}} is spatially overlaps $geometry2 {{Code$geometry2}}.  
    
 '''Errors'''   '''Errors'''  
{{ErrorGEO0001#Errors}} the given element(s) is not recognized as a valid geometry (QName).<br />{{ErrorGEO0002#Errors}} the given element cannot be read by reader for some reason.<br />  {{ErrorGEO0001#Errors}} the given element(s) is not recognized as a valid geometry (QName).<br />{{ErrorGEO0002#Errors}} the given element cannot be read by reader for some reason.<br />  
}  } 
Revision as of 14:30, 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:envelope($geometry as element(*)) as xs:element(gml:Envelope)?

Summary  Returns the gml:Envelope of the given geometry $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.GEO0008 : the output object cannot be written as an element by writer for some reason. 
geo:asText
Signatures  geo:asText($geometry as element(*)) as xs:string

Summary  Returns the WKT (Wellknown Text) representation of the given geometry $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. 
geo:asBinary
Signatures  geo:asBinary($geometry as element(*)) as xs:base64Binary

Summary  Returns the WKB (Wellknown Binary) representation 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:isEmpty
Signatures  geo:isEmpty($geometry as element(*)) as xs:boolean

Summary  Returns whether the given geometry is empty $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:isSimple
Signatures  geo:isSimple($geometry as element(*)) as xs:boolean

Summary  Returns whether the given geometry is simple $geometry and does not have has no anomalous geometric points (ie. the geometry does not selfintersect and does not pass through the same point more than once (may be a ring)).

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:boundary
Signatures  geo:boundary($geometry as element(*)) as xs:element(*)*

Summary  Returns the boundary of the given geometry $geometry , in GML 2. The return value is a sequence of either gml:Point or gml:LinearRing elements as a GeometryCollection object. For a Point or MultiPoint, the boundary is the empty geometry, nothing is returned.

Errors  GEO0001 : the given element is not recognized as a valid geometry.GEO0002 : the given element cannot be read by reader for some reason.GEO0008 : the output object cannot be written as an element by writer for some reason. 
Spatial Predicate Functions
geo:isEqual
Signatures  geo:isEqual($geometry1 as element(*), $geometry2 as element(*)) as xs:boolean

Summary  Returns whether geometry1 $geometry1 is spatially equal to $geometry2 $geometry2 .

Errors  GEO0001 : the given element(s) is not recognized as a valid geometry (QName).GEO0002 : the given element cannot be read by reader for some reason. 
geo:disjoint
Signatures  geo:disjoint($geometry1 as element(*), $geometry2 as element(*)) as xs:boolean

Summary  Returns whether geometry1 $geometry1 is spatially disjoint from $geometry2 $geometry2 (they have no point in common, they do not intersect each other, and the DE9IM Intersection Matrix for the two geometries is FF*FF****).

Errors  GEO0001 : the given element(s) is not recognized as a valid geometry (QName).GEO0002 : the given element cannot be read by reader for some reason. 
geo:intersects
Signatures  geo:intersects($geometry1 as element(*), $geometry2 as element(*)) as xs:boolean

Summary  Returns whether geometry1 $geometry1 is spatially intersects $geometry2 $geometry2 . This is true if disjoint function of the two geometries returns false.

Errors  GEO0001 : the given element(s) is not recognized as a valid geometry (QName).GEO0002 : the given element cannot be read by reader for some reason. 
geo:touches
Signatures  geo:touches($geometry1 as element(*), $geometry2 as element(*)) as xs:boolean

Summary  Returns whether geometry1 $geometry1 is spatially touches $geometry2 $geometry2 .

Errors  GEO0001 : the given element(s) is not recognized as a valid geometry (QName).GEO0002 : the given element cannot be read by reader for some reason. 
geo:crosses
Signatures  geo:crosses($geometry1 as element(*), $geometry2 as element(*)) as xs:boolean

Summary  Returns whether geometry1 $geometry1 is spatially crosses $geometry2 $geometry2 . It means, if the geometries have some but not all interior points in common. Returns true if the DE9IM intersection matrix for the two geometries is:T*T****** (for P/L, P/A, and L/A situations) 
Errors  GEO0001 : the given element(s) is not recognized as a valid geometry (QName).GEO0002 : the given element cannot be read by reader for some reason. 
geo:within
Signatures  geo:within($geometry1 as element(*), $geometry2 as element(*)) as xs:boolean

Summary  Returns whether geometry1 $geometry1 is spatially within $geometry2 $geometry2 .

Errors  GEO0001 : the given element(s) is not recognized as a valid geometry (QName).GEO0002 : the given element cannot be read by reader for some reason. 
geo:contains
Signatures  geo:contains($geometry1 as element(*), $geometry2 as element(*)) as xs:boolean

Summary  Returns whether geometry1 $geometry1 is spatially contains $geometry2 $geometry2 . Returns true if within function of these two geometries also returns true.

Errors  GEO0001 : the given element(s) is not recognized as a valid geometry (QName).GEO0002 : the given element cannot be read by reader for some reason. 
geo:overlaps
Signatures  geo:overlaps($geometry1 as element(*), $geometry2 as element(*)) as xs:boolean

Summary  Returns whether geometry1 $geometry1 is spatially overlaps $geometry2 $geometry2 .

Errors  GEO0001 : the given element(s) is not recognized as a valid geometry (QName).GEO0002 : the given element cannot be read by reader for some reason. 