2

Per the attached image, my vector layer of political boundaries (in Nepal) is slightly offset to the east, by 300 m. This offset doesn't change from one end of the country to the other, so it doesn't seem to be a projection issue. In reviewing posts on similar topics, they don't seem to address this simple case. There doesn't appear to be any north-south displacement. We want these layers to line up with OSM, which we are using as an underlay.

When we receive a vector layers for, say, administrative boundaries, some are offset 300m to the East, others 100m to the South. So, as Vince suggests, looks like we have a datum transformation issue. Or, rather, several. Now, reading up on the subject, it looks like there are various parameter strings that one enters in the appropriate QGIS dialogue Datum transformation in QGIS 3

My basic understanding is that these parameters tweak a given projection, possibly for a large geographic region, to a particular location.

My larger question is that we want to do this in a robust manner, and it looks like each new set of boundary layers will be slightly offset from the OSM underlay, so we'll need to do this repeatedly.

4
  • Actually, it probably is a projection issue, due to an incorrect datum transformation. If you chose to apply a uniform shift, document it, since it would need to be unshifted to be corrected.
    – Vince
    Commented May 6, 2021 at 11:02
  • Correcting the datum issues will require some investigation on our part, as we're beginners, but it will be instructive to look into this. Our maps are intended for illustration purposes, so the visual appearance is more important than quantitative accuracy (for the time being).
    – SocialEyes
    Commented May 6, 2021 at 15:23
  • We'll try out the Geometry generator solution in the morning, as it looks like the easiest one to effect, and vielen Danke for the time you took to give examples of how to do it.
    – SocialEyes
    Commented May 6, 2021 at 15:31
  • We very much appreciate the answers provided so far, which are detailed and helpful.
    – SocialEyes
    Commented May 24, 2021 at 6:04

1 Answer 1

2

You can either shift the line automatically or manually:

  1. You can use QGIS expressions with Geometry generator or Geometry by expression and the function translate( $geometry, dx, dy) to offset the line to it's correct position. You have to determine for one point the shift in x- and in y-direction and than set these values instead of dx and dy in the expression above.

    Screenshot: original line in pink, shifted line in blue, using geometry generator: enter image description here

  2. Another, manual way is to use the Move feature tool from Advanced Digitizing Toolbar: select the line and shift it with the tool.

    enter image description here

2
  • The Move Feature seems to work, but I end up with both the moved line and the old line. :) So... how does one remove the old line?
    – SocialEyes
    Commented May 7, 2021 at 10:05
  • Move feature actually moves the feature, so it should not appear twice. Are you sure you not somehow unintentionally copied the feature - or did you have two identical features? To solve the problem, select the old line and delete it.
    – Babel
    Commented May 7, 2021 at 10:10

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.