class GmlWriter extends java.lang.Object implements Writer
Write a Feature to GML.
Schema schema = new Schema("houses", [new Field("geom","Point"), new Field("name","string"), new Field("price","float")]) Feature feature = new Feature([new Point(111,-47), "House", 12.5], "house1", schema) GmlWriter writer = new GmlWriter() String gml = writer.write(feature) <gml:houses fid="house1" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink"> <gml:name>House</gml:name> <gml:geom> <gml:Point> <gml:coord> <gml:X>111.0</gml:X> <gml:Y>-47.0</gml:Y> </gml:coord> </gml:Point> </gml:geom> <gml:price>12.5</gml:price> </gml:houses>
Constructor and description |
---|
GmlWriter
() |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Write a Feature to a GML String
feature
- The FeatureWrite the Feature to a GML String
feature
- The Featureversion
- The version 2, 3, or 3.2format
- Whether to pretty print or notbounds
- Whether to include Feature Bounds or notxmldecl
- Whether to include XML declaration or notnsprefix
- The XML namespace prefix