2

I have a table conatining a set of points. I would like to make a query that checks the distance between the points and if the distance is small er than the tolerance it would set the points to just one.

Any suggestions how I can accomplish such task?

The following is a graphical issue of what I have. Now I want that only one point will exist where three distinct roads meet

enter image description here

IT_info
  • 707
  • 4
  • 16
  • 36

2 Answers2

1

This is a tricky issue with more than one way to fix it.

One obvious strategy is to try and find unique points snapped to a virtual grid, using ST_SnapToGrid. This technique works best with projected units (e.g., metres with UTM), but not as good with geographic coordinates (with degrees of latitude/longitude), which have variable physical distances.

Mike T
  • 41,085
  • 18
  • 152
  • 203
0

If I understandd you right:

1)Read about ST_Distance

2)Write your own function, wich will use ST_Distance and maybe one of theese algorythms(a little simplified for your task)

Skiv_mag
  • 284
  • 1
  • 4
  • 13