Javadoc :: Donwloads :: Sourceforge summary page
LGML is a GML parser under the LGPL license. It have two dependencies: XmlBeans (from Apache Software Foundation), and a GML 3.1.1 schema compiled with Xmlbeans itself.
The aim is to parse a GML document or fragment in order to get a WKT output. 2D and 3D inputs are both handled, but it is not permitted to have mixed geometries. The caller can choose if the input coordinates are parsed as X, Y, Z (if present) order, or Y, X, Z (if present) order.
The willing of the project is to be a starting point useful for developers that need to parse GML objects in order to obtain a WKT representation and/or a list of coordinates to be handled in their application code.
In my own case, the source of the project was in the need to parse GML objects in order to convert them in Postgis WKT/EWKT, in the context of OGC catalogue projects. The library is compiled using Java 1.5 or 1.6.

For now, supported inputs are:

At the following URL:

is exposed a minimal web interface in order to test it.

In the "sample" folder of the distribution, you can find a simple usage example. Following, a code snippet:

String gmlPoint = "<gml:Point xmlns:gml=\"\"><gml:pos>12.2 6.0</gml:pos></gml:Point>";

try {
	AbstractGeometry geoXY = GMLParser.parseStringXY(gmlPoint);
	AbstractGeometry geoYX = GMLParser.parseStringYX(gmlPoint);
catch(Exception e) {