Spatio-temporal clustering is a subfield of data mining that is increasingly gaining more scientific attention due to the advances of location-based or environmental devices that register position, time and, in some cases, other semantic attributes. This process pretends to group objects based in their spatial and temporal similarity helping to discover interesting patterns and correlations in large data sets. One of the main challenges of this area is the ability to integrate several dimensions in a general-purpose approach. In this paper, such general approach is proposed, based on an extension of the SNN (Shared Nearest Neighbor) algorithm. The 4D(+)SNN algorithm allows the integration of space, time and one or more semantic attributes in the clustering process. This algorithm is able to deal with different data sets and different discovery purposes as the user has the ability to weight the importance of each dimension in the discovery process. The results obtained are very promising as show interesting findings on data and open the possibility of integration of several dimensions of analysis in the clustering process.