Package com.vividsolutions.jump.util.io
Class SimpleGMLReader
- java.lang.Object
-
- com.vividsolutions.jump.util.io.SimpleGMLReader
-
public class SimpleGMLReader extends 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. Notice : currently, this class is only used in jumptest
-
-
Constructor Summary
Constructors Constructor Description SimpleGMLReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FeatureCollectionreadFMEFile(File file)Reads a GML file that is in FME format.ListtoGeometries(InputStream gml, String collectionElement, String featureElement, String geometryElement)ListtoGeometries(String gml, String collectionElement, String featureElement, String geometryElement)
-
-
-
Method Detail
-
toGeometries
public List toGeometries(InputStream gml, String collectionElement, String featureElement, String geometryElement) throws Exception
- Parameters:
gml- inputStream of 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:
Exception
-
toGeometries
public List toGeometries(String gml, String collectionElement, String featureElement, String geometryElement) throws Exception
- Parameters:
gml- inputStream of an XML document containing GML- Throws:
Exception- See Also:
toGeometries(InputStream, String, String, String)
-
readFMEFile
public FeatureCollection readFMEFile(File file) throws Exception
Reads a GML file that is in FME format.- Returns:
- the contents of the file, including both spatial and attribute data
- Throws:
Exception
-
-