Relational data can be studied using network analytic techniques which define the network as a set of actors and a set of edges connecting these actors. One important facet of network analysis that receives significant attention is community detection. However, while most community detection algorithms focus on clustering the actors of the network, it is very intuitive to cluster the edges. Connections exist because they were formed within some latent environment such as, in the case of a social network, a workplace or religious group, and hence by clustering the edges of a network we may gain some insight into these latent environments. We propose a model-based approach to clustering the edges of a network using a latent space model describing the features of both actors and latent environments. We derive a generalized EM algorithm for estimation and gradient-based Monte Carlo algorithms, and we demonstrate that the computational cost grows linearly in the number of actors for sparse networks rather than quadratically. We demonstrate the potential impact of our proposed approach on a patient transfer network, verifying these results by running simple epidemic simulations, and on a real friendship network amongst faculty members at a university in the United Kingdom.