Search Results for

    Show / Hide Table of Contents

    Class KMLWriter

    Writes a formatted string containing the KML representation of a JTS Geometry. The output is KML fragments which can be substituted wherever the KML Geometry abstract element can be used.

    Inheritance
    object
    KMLWriter
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.IO.KML
    Assembly: NetTopologySuite.dll
    Syntax
    public class KMLWriter
    Remarks

    Output elements are indented to provide a nicely-formatted representation. An output line prefix and maximum number of coordinates per line can be specified.

    Constructors

    | Edit this page View Source

    KMLWriter()

    Declaration
    public KMLWriter()

    Fields

    | Edit this page View Source

    AltitudeModeAbsolute

    The KML standard value absolute for use in AltitudeMode.

    Declaration
    public const string AltitudeModeAbsolute = "absolute"
    Field Value
    Type Description
    string
    | Edit this page View Source

    AltitudeModeClampToGround

    The KML standard value clampToGround for use in AltitudeMode.

    Declaration
    public const string AltitudeModeClampToGround = "clampToGround "
    Field Value
    Type Description
    string
    | Edit this page View Source

    AltitudeModeRelativeToGround

    The KML standard value relativeToGround for use in AltitudeMode.

    Declaration
    public const string AltitudeModeRelativeToGround = "relativeToGround  "
    Field Value
    Type Description
    string

    Properties

    | Edit this page View Source

    AltitudeMode

    The value output in the altitudeMode element.

    Declaration
    public string AltitudeMode { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Extrude

    The flag to be output in the extrude element.

    Declaration
    public bool Extrude { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    LinePrefix

    A tag string which is prefixed to every emitted text line. This can be used to indent the geometry text in a containing document.

    Declaration
    public string LinePrefix { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    MaxCoordinatesPerLine

    The maximum number of coordinates to output per line.

    Declaration
    public int MaxCoordinatesPerLine { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Precision

    The maximum number of decimal places to output in ordinate values. Useful for limiting output size.

    Declaration
    public int Precision { get; set; }
    Property Value
    Type Description
    int
    Remarks

    negative values set the precision to Floating, like standard behavior.

    | Edit this page View Source

    Tesselate

    The flag to be output in the tesselate element.

    Declaration
    public bool Tesselate { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    Z

    The Z value to be output for all coordinates. This overrides any Z value present in the Geometry coordinates.

    Declaration
    public double Z { get; set; }
    Property Value
    Type Description
    double

    Methods

    | Edit this page View Source

    Write(Geometry)

    Writes a Geometry in KML format as a string.

    Declaration
    public string Write(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    the geometry to write

    Returns
    Type Description
    string

    a string containing the KML geometry representation

    | Edit this page View Source

    Write(Geometry, TextWriter)

    Writes the KML representation of a Geometry to a TextWriter.

    Declaration
    public void Write(Geometry geom, TextWriter writer)
    Parameters
    Type Name Description
    Geometry geom

    the geometry to write

    TextWriter writer

    the writer to write to

    | Edit this page View Source

    Write(Geometry, StringBuilder)

    Appends the KML representation of a Geometry to a StringBuilder.

    Declaration
    public void Write(Geometry geom, StringBuilder sb)
    Parameters
    Type Name Description
    Geometry geom

    the geometry to write

    StringBuilder sb

    the buffer to write into

    | Edit this page View Source

    WriteGeometry(Geometry, double)

    Writes a Geometry as KML to a string, using a specified Z value.

    Declaration
    public static string WriteGeometry(Geometry geometry, double z)
    Parameters
    Type Name Description
    Geometry geometry

    the geometry to write

    double z

    the Z value to use

    Returns
    Type Description
    string

    a string containing the KML geometry representation

    | Edit this page View Source

    WriteGeometry(Geometry, double, int, bool, string)

    Writes a Geometry as KML to a string, using a specified Z value, precision, extrude flag, and altitude mode code.

    Declaration
    public static string WriteGeometry(Geometry geometry, double z, int precision, bool extrude, string altitudeMode)
    Parameters
    Type Name Description
    Geometry geometry

    the geometry to write

    double z

    the Z value to use

    int precision

    the maximum number of decimal places to write

    bool extrude

    the extrude flag to write

    string altitudeMode

    the altitude model code to write

    Returns
    Type Description
    string

    a string containing the KML geometry representation

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX