// Checked vs. Jan 11, 2011
 /// <summary>Sets the envelope of the Geometry.</summary>
 /// <remarks>
 /// Sets the envelope of the Geometry. The Envelope description must match
 /// that of the Geometry.
 /// </remarks>
 public virtual void SetEnvelope(com.epl.geometry.Envelope env)
 {
     if (!m_description.Equals(env.GetDescription()))
     {
         throw new System.ArgumentException();
     }
     // m_envelope = (Envelope) env.clone();
     m_envelope = (com.epl.geometry.Envelope)env.CreateInstance();
     env.CopyTo(m_envelope);
     _setDirtyFlag(com.epl.geometry.MultiVertexGeometryImpl.DirtyFlags.DirtyIntervals, false);
 }
        //Does not check geometry type. Used to copy Polygon to Polyline
        internal virtual void _copyToUnsafe(com.epl.geometry.MultiVertexGeometryImpl dst)
        {
            _verifyAllStreams();
            dst.m_description      = m_description;
            dst.m_vertexAttributes = null;
            int nattrib = m_description.GetAttributeCount();

            com.epl.geometry.AttributeStreamBase[] cloneAttributes = null;
            if (m_vertexAttributes != null)
            {
                cloneAttributes = new com.epl.geometry.AttributeStreamBase[nattrib];
                for (int i = 0; i < nattrib; i++)
                {
                    if (m_vertexAttributes[i] != null)
                    {
                        int ncomps = com.epl.geometry.VertexDescription.GetComponentCount(m_description._getSemanticsImpl(i));
                        cloneAttributes[i] = m_vertexAttributes[i].RestrictedClone(GetPointCount() * ncomps);
                    }
                }
            }
            if (m_envelope != null)
            {
                dst.m_envelope = (com.epl.geometry.Envelope)m_envelope.CreateInstance();
                m_envelope.CopyTo(dst.m_envelope);
            }
            else
            {
                // dst.m_envelope = (Envelope) m_envelope.clone();
                dst.m_envelope = null;
            }
            dst.m_pointCount       = m_pointCount;
            dst.m_flagsMask        = m_flagsMask;
            dst.m_vertexAttributes = cloneAttributes;
            try
            {
                _copyToImpl(dst);
            }
            catch (System.Exception ex)
            {
                // copy child props
                dst.SetEmpty();
                throw new System.Exception("", ex);
            }
        }