Example #1
0
 /// <summary>
 /// Writes a WKB representation of a given point.
 /// </summary>
 /// <param name="geometry"></param>
 /// <param name="stream"></param>
 /// <returns></returns>
 public virtual void Write(IGeometry geometry, Stream stream)
 {
     BinaryWriter writer = null;
     try
     {
         if (encodingType == ByteOrder.LittleEndian)
              writer = new BinaryWriter(stream);
         else writer = new BEBinaryWriter(stream);
         Write(geometry, writer);
     }
     finally
     {
         if (writer != null)
             writer.Close();
     }
 }
Example #2
0
        /// <summary>
        /// Writes a WKB representation of a given point.
        /// </summary>
        /// <param name="geometry"></param>
        /// <param name="stream"></param>
        /// <returns></returns>
        public virtual void Write(IGeometry geometry, Stream stream)
        {
            BinaryWriter writer = null;

            try
            {
                if (encodingType == ByteOrder.LittleEndian)
                {
                    writer = new BinaryWriter(stream);
                }
                else
                {
                    writer = new BEBinaryWriter(stream);
                }
                Write(geometry, writer);
            }
            finally
            {
                if (writer != null)
                {
                    writer.Close();
                }
            }
        }