Involved in biofilm formation (PubMed:26728467, PubMed:28647124). Catalyzes the conversion of GTP to c-di-GMP (PubMed:28647124). 2 GTP = cyclic di-3',5'-guanylate + 2 diphosphate Binds 1 Mg(2+) ion per monomer. The disordered N-terminal region is not required for diguanylate cyclase activity.