2

I have a point vector layer with approximately 2.5 million points, many of which share the same or a very similar geometry (within 1 m of each other).

I would like to know if I can bulk amend the geometry of these points so they are exactly the same if they are within that 1 meter threshold in the X-Y plane?

The majority of 'overlapping' points do share the exact same geometry so ideally I would want to amend those points that fall outside the majority to have the same geometry.

I am familiar with PyQGIS but not confident in it's use.

AWGIS
  • 3,220
  • 1
  • 21
  • 36

2 Answers2

4

The tool "Snap geometries" in the processing toolbox can help you.

Give two times your layer (input and reference layer), set the tolerance to 1 meter and select the best snapping behavior for your case (i.e. align nodes, don't add new).

romainbh
  • 1,045
  • 7
  • 13
  • thanks, unfortunately I receive a crash report whenever I run this which seems to be because of the size of my data set which I will have to raise. – AWGIS Jan 07 '19 at 11:04
  • Monitor your system while running it, if it runs out of RAM it should be visible. – bugmenot123 Jan 07 '19 at 12:54
  • 1
    Thanks @bugmenot123, it would appear that RAM is the issue. I will have to segment my data set – AWGIS Jan 08 '19 at 10:27
0

this might be of help - try using the calculator and referencing the field and updating the X & Y to specific locations

geom_from_wkt('POINT('||'31.797788'||' '||'30.729471'||')')

further info at -

QGIS update feature geometry from attribute fields

hillibilli
  • 11
  • 1