private static DSMultiLineString FromMultiLineString(IMultiLineString geometry, DSGeometryFactory factory, bool setUserData)
        {
            var dsLineStrings = new DotSpatial.Topology.IBasicLineString[geometry.NumGeometries];

            for (var i = 0; i < dsLineStrings.Length; i++)
            {
                dsLineStrings[i] = FromLineString((ILineString)geometry.GetGeometryN(i), factory, setUserData);
            }

            var result = factory.CreateMultiLineString(dsLineStrings);

            if (setUserData)
            {
                result.UserData = geometry.UserData;
            }
            return(result);
        }
        private static DSMultiLineString FromMultiLineString(IMultiLineString geometry, DSGeometryFactory factory, bool setUserData)
        {
            var dsLineStrings = new DotSpatial.Topology.IBasicLineString[geometry.NumGeometries];

            for (var i = 0; i < dsLineStrings.Length; i++)
                dsLineStrings[i] = FromLineString((ILineString)geometry.GetGeometryN(i), factory, setUserData);

            var result = factory.CreateMultiLineString(dsLineStrings);
            if (setUserData)
                result.UserData = geometry.UserData;
            return result;
        }