class GmlWriter extends java.lang.Object
Write a Feature to GML.
geoscript.feature.Schema schema = new geoscript.feature.Schema("houses", [new geoscript.feature.Field("geom","Point"), new geoscript.feature.Field("name","string"), new geoscript.feature.Field("price","float")])
geoscript.feature.Feature feature = new geoscript.feature.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
() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
java.lang.String |
write(Feature feature)Write a Feature to a GML String
|
|
java.lang.String |
write(Feature feature, double version, boolean format, boolean bounds, boolean xmldecl, java.lang.String nsprefix)Write the Feature to a GML String
|
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), 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