Class SimpleGMLReader
- java.lang.Object
-
- org.locationtech.jts.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.
-
-
Constructor Summary
Constructors Constructor Description SimpleGMLReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FeatureCollection
readFMEFile(File file)
Reads a GML file that is in FME format.List
toGeometries(Reader gml, String collectionElement, String featureElement, String geometryElement)
List
toGeometries(String gml, String collectionElement, String featureElement, String geometryElement)
-
-
-
Method Detail
-
toGeometries
public List toGeometries(Reader gml, String collectionElement, String featureElement, String geometryElement) throws 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:
Exception
-
toGeometries
public List toGeometries(String gml, String collectionElement, String featureElement, String geometryElement) throws Exception
- Parameters:
gml
-- Throws:
Exception
- See Also:
toGeometries(Reader, 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
-
-