http://expath.org/ns/geo

Function library providing geo processing using Simple Features api API GMLSF format.
It uses the GEOS third party library, license LGPL. Version 3.2.2 or above is required.

The data format supported is GML SF profile 0/1.
This is a subset of GML, and covers the basic geometries of Point, Line and Surface and collections of those.
GMLSF nodes have the namespace "http://www.opengis.net/gml".

Note: When using gml:posList, it is possible to replace this element with a list of gml:pos.

Note: XLink referencing is not supported.

Note: The srsDimension optional attribute specifies the coordinate dimension. The default value is 2 (for 2D).
Another possible value is 3 (for 3D) in which case every point has to have three double values (x, y, z).
This is an extension borrowed from GML 3 spec.

The operations made on 3D objects work only on x-y coordinates, the z coordinate is not taken into account.
When returning the result, the original z-coordinates of the points are preserved.
For computed points, the z-coordinate is interpolated.

The coordinates values have to be in cartesian coordinates, not in polar coordinates.
Converting between coordinate systems and doing projections from polar to cartesian is outside the scope of this geo module.

For operations between two geometries, the DE-9IM matrix is used. The DE-9IM matrix is defined like this:

Parameters

Returns

xs:QName?

"gml:Point" for Point, "gml:LineString" for LineString, "gml:Curve" for Curve, "gml:LineString" for LinearRing, "gml:Surface" for Surface, "gml:Polygon" for Polygon and PolygonPatch, "gml:MultiPoint" for MultiPoint, "gml:MultiCurve" for MultiCurve, "gml:MultiSurface" for MultiSurface, "gml:MultiGeometry" for MultiGeometry

Returns

is-closed#1

Checks if the line is closed loop. That is, if the start Point is same with end Point.

For gml:Curve, checks if the start point of the first segment is the same with the
last point of the last segment. It also checks that all the segments are connected together,
and returns false if they aren't.

For gml:MultiCurve, checks recursively for each LineString.

For gml:Surface, checks if the exterior boundary of each patch touches completely other patches,
so the Surface encloses a solid.
For this to happen there is a need for 3D objects, and full 3D processing is not supported in GEOS library,
so the function always returns false in this case.

sym-difference#2

Returns a geometric object that represents the Point set symmetric difference of
geometry1 and geometry2. Points that are in geometry1 and are not in geometry2
and points that are in geometry2 and are not in geometry1.