com.vividsolutions.jump.util.io
Class SimpleGMLReader
java.lang.Object
com.vividsolutions.jump.util.io.SimpleGMLReader
public class SimpleGMLReader
- extends java.lang.Object
Provides an easy way to read spatial data from a GML document. Attributes
are not read. Simply pass in a Reader on the GML, and the names of the
various tags. A List of Geometries will be returned.
|
Method Summary |
FeatureCollection |
readFMEFile(java.io.File file)
Reads a GML file that is in FME format. |
java.util.List |
toGeometries(java.io.Reader gml,
java.lang.String collectionElement,
java.lang.String featureElement,
java.lang.String geometryElement)
|
java.util.List |
toGeometries(java.lang.String gml,
java.lang.String collectionElement,
java.lang.String featureElement,
java.lang.String geometryElement)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleGMLReader
public SimpleGMLReader()
toGeometries
public java.util.List toGeometries(java.io.Reader gml,
java.lang.String collectionElement,
java.lang.String featureElement,
java.lang.String geometryElement)
throws java.lang.Exception
- Parameters:
gml - a Reader on an XML document containing GMLcollectionElement - the name of the feature-collection tagfeatureElement - the name of the feature taggeometryElement - the name of the geometry tag
- Returns:
- a List of Geometries
- Throws:
java.lang.Exception
toGeometries
public java.util.List toGeometries(java.lang.String gml,
java.lang.String collectionElement,
java.lang.String featureElement,
java.lang.String geometryElement)
throws java.lang.Exception
- Parameters:
gml -
- Throws:
java.lang.Exception- See Also:
toGeometries(Reader, String, String, String)
readFMEFile
public FeatureCollection readFMEFile(java.io.File file)
throws java.lang.Exception
- Reads a GML file that is in FME format.
- Returns:
- the contents of the file, including both spatial and attribute data
- Throws:
java.lang.Exception