I am looking for a way to relate two or more types of open data from the Valencia Open data portal. This portal offer data like a traffic jam, noise, and air pollution. All these data have coordinates based on the locality of real sensors. So, I am using GeoTools which is a java library, to work with these data. Now I want to create some polygon groups inside Valencia city in order to say if some coordinates are close to each other. For example, I imagine that if a coordinate XY and XY' are in the same group, it is likely that they are close to each other.
How can I create these groups? I am searching here but I don't have too many ideas on how to proceed on this.
For example, let's say I have 5 points and I want to create sets with points that are close to each other in at least 3 meters. My result would be 2 sets like below:
point A: 44, 33
point B: 44, 34
point C: 45, 34
point D: 54, 53
point E: 55, 55
set 1: points {A, B, C}
set 2: points {D, E}