Geo Module

From EXPath Community Group

The EXPath Geo module is a proposal for geospatial functions that would be useful in an XPath context for geo-processing.

The module core should be based on the Simple Features API from the Open Geospatial Consortium. Using the OGC SF specification leverages a geometry model as well as a set of standard high-level functions for manipulating or managing interactions between geometries. The XML data model allows a deeper interaction with geometries than that enabled by the OGC SF, yet it is those functions identified by OGC SF which would be out of reach, if not impossible, for most XQuery and XSLT applications of XPath.

For example, to allow a stylesheet to create a portrayal (in SVG for example) of a set of features (in source GML), it is necessary to 'clip' the features to the neatline of the map. This is enabled through the "intersection" function of SF.

The functions are categorized by OGC SF into "query" and "analysis". A third category would be accessors, which allow conversion and introspection, which may be less important in an XPath setting because of the granularity of the XPath model.

Analysis functions: 
  distance, buffer, convexHull, intersection, union, difference and symDifference (symmetric difference).

Query functions: 
  equals, disjoint, touches, crosses, within, contains, overlaps, relate, locateAlong, locateBetween.


To speed open source development of EXPath Geo, Java Topology Suite (JTS) provides a 100% java comprehensive implementation of OGC SF for Java developers and GEOS is a C++ port of JTS. Closed source implementations may be able to negotiate appropriate licensing with those projects or others more suitable to that development model.