Пример #1
0
        /// <summary>
        /// Writes a Geometry as KML to a string, using
        /// a specified Z value.
        /// </summary>
        /// <param name="geometry">the geometry to write</param>
        /// <param name="z">the Z value to use</param>
        /// <returns>a string containing the KML geometry representation</returns>
        public static string WriteGeometry(IGeometry geometry, double z)
        {
            KMLWriter writer = new KMLWriter {
                Z = z
            };

            return(writer.Write(geometry));
        }
Пример #2
0
        /// <summary>
        /// Writes a Geometry as KML to a string, using
        /// a specified Z value, precision, extrude flag,
        /// and altitude mode code.
        /// </summary>
        /// <param name="geometry">the geometry to write</param>
        /// <param name="z">the Z value to use</param>
        /// <param name="precision">the maximum number of decimal places to write</param>
        /// <param name="extrude">the extrude flag to write</param>
        /// <param name="altitudeMode">the altitude model code to write</param>
        /// <returns>a string containing the KML geometry representation</returns>
        public static string WriteGeometry(IGeometry geometry, double z, int precision,
                                           bool extrude, string altitudeMode)
        {
            KMLWriter writer = new KMLWriter
            {
                Z            = z,
                Precision    = precision,
                Extrude      = extrude,
                AltitudeMode = altitudeMode
            };

            return(writer.Write(geometry));
        }