2

I have two shapefiles, one points and the other one polygons. These two layers should overlay without any points being outside of boundary. Unfortunately, there were some points that were outside and the reason was that the points had incorrect latitude and longitude. I replaced them with correct latitude and longitude, however the points are still outside of boundary. I also changed Coordinate System to have the two layers use the same one (not sure if I did in right way). Even after changing the coordinate, I still have the problem. Below is a screenshot.

QGIS Screenshot

6
  • can you post the files or show us at least the complete error-message (your screenshot only shows a part of the error-mwssage: Invalid Data source.....)
    – Kurt
    Jan 11, 2022 at 15:01
  • 2
    1. Don't ever set the CRS of a layer, unless it is really wrong. QGIS is capable of on-the-fly reprojection, overlaying layers as they should be. 2. How did you replace the faulty coordinates?
    – Erik
    Jan 11, 2022 at 15:06
  • 2
    How did you "replaced them with correct latitude and longitude"? Modifying the attribute table will not help. You need to change the location of the geometry. Jan 11, 2022 at 15:17
  • @Kurt, The error-message is for a different file that I attempted to add. For the two files that the screenshot displays, it doesn't give me any error. I successfully add them. Jan 11, 2022 at 15:18
  • @Erik, I just added the layers again and this time I DID NOT change the CRS. I changed the coordinated through attribute table. Jan 11, 2022 at 15:21

2 Answers 2

3

You can use the Vertex Tool to move a point by directly editing it's geometry values.

Put your layer in edit mode and activate the Vertex Tool:

enter image description here

You will now see the Vertex Editor panel widget docked on the left of the map canvas.

enter image description here

Now, when you right-click on a point you can edit the feature geometry's x and y values to move the point to a specific location.

enter image description here

3
  • For single part point layers, this works well. For all other types of lyers (multipart points, lines, polygons), this changes the geometry (shape). This can be tricky if you're not aware of it. Move features moves the whole feature. In case of single part points, each feature consists of just one vertex, so then it makes no difference.
    – Babel
    Jan 11, 2022 at 23:02
  • you do not have a nice profile picture anymore 😢
    – Taras
    Jan 12, 2022 at 7:34
  • @Taras, sorry! I'm just going incognito for a little while ;-)
    – Ben W
    Jan 20, 2022 at 11:21
3

To move points, toggle edit mode, then select the Move feature(s) tool.

enter image description here

Now you can manually shift the points: with the activated tool, left click on a point, release move the point and when it is in the right location once again left click. The point will be placed there.

If Move features is not visible, activate Advanced Digitizin Toolbar from Menu View / Toolbars.

3
  • Thank you @Babel. Does it allow me to move it to a specific lat/lon? Jan 11, 2022 at 16:40
  • Not exactly, but you can see at the bottom in the coordinates field the coordinates.
    – Babel
    Jan 11, 2022 at 16:41
  • @ Babel Sounds great. Thanks. Jan 11, 2022 at 16:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.