0

I've been given a CSV containing X and Y points (as seen below). However, these are in metres from the origin in which the person has self-specified.

For example, in EPSG:4326 I may want to specify the origin as being 25.3457°, 56.36975° - and then from this, the first point will be plotted 11m away on the x axis and 399m on the y axis.

Is there any way in QGIS to specify an origin and then feed my CSV in to plot the points in metres away from that origin based on the x,y columns?

2
  • 1
    More information please on "specify an origin".
    – Pointdump
    Commented May 9 at 15:57
  • @Pointdump Apologies, I tried adding some additional info to the original question Commented May 10 at 8:36

1 Answer 1

1

If you have a planar projection and units in meters, it's probably safe to use the Translate tool from the toolbox. You just add your origin X and Y to your points. But this must be done with attention. If your projection is not suited for this, you can create errors by translating.

Otherwise, you can either try a script (hard option) or you can open this file in an excel or libre office calc sheet and simply add the origin to all points.

Load the file in excel, you get columns like:

 X  | Y
11  | 399
689 | 399
868 | 94 
885 | 94
950 | 94

Now just create an origin X and Y, and a new column for X and Y shifted:

 A  | B    |      C    |    D      |       E        |     F
 X  | Y    |  ORIGIN X | ORIGIN Y  |      NEW X     |   NEW Y
11  | 399  |  200000   |  7000000  |  = A2 + $C$2   |  = B2 + $D$2
689 | 399  |           |           |  <drag formula>| <drag formula>
868 | 94   |           |           |  <drag formula>| <drag formula>
885 | 94   |           |           |  <drag formula>| <drag formula>
950 | 94   |           |           |  <drag formula>| <drag formula>

Drag the formula to fill the rest of the lines automatically. Copy the result values to a new sheet and export the sheet as CSV.

3
  • I'm sorry I don't quite understand. The translate tool doesn't allow me to specify an origin location so the points are just being offset into space. Commented May 10 at 13:09
  • @guest_231213 Yes, an origin is just an offset. If you offset with "X origin" and "Y origin" you get exactly what you want. Commented May 10 at 13:19
  • Just make sure you have X origin and Y origin in "meters", using a UTM projection or another projection in meters if you have a preference for your specific location. Commented May 10 at 13:31

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.