# Polygon from CSV ∂x-∂y values

I am trying to make a map of a property fenceline based on a survey which gives precise bearings and distances between landmarks. Following recommendations in Creating points based on distance and bearing from survey point using QGIS?, I used a CSV file to turn distance & bearing values into x- and y-offset values.

Now I want to know how to translate those offsets into actual coordinates.

My file contains X and Y shift values — that is to say, the values for any given point are not X and Y coordinates, but rather Delta-X and Delta-Y values relative to the point before it.

Given the coordinates of the initial point, one may solve for the coordinates of all other points in the polygon by evaluating their offsets from that initial coordinate point.

How can I write a script that will give me the actual coordinates of the points in my polygon?

• Scripting with what? If you only have one of these files, you should just use a spreadsheet to find the coordinates, since this will take a fraction of the time than learning and debugging a script in any language. – Mike T Sep 29 '14 at 5:32
• Thanks Mike! Sorry to not specify; I suppose I was looking for a Python solution in QGIS, though of course I will gladly go with the simplest solution. I figured there should be an easy way to do it within the spreadsheet but I haven't been able to figure it out. It would require that each individual cell equal the sum of the cell above it and the cell 3 columns to the right, which is a task that totally stumped me :3 P.S.: I am working with .CSV in Numbers for Mac. – Corvus Sep 29 '14 at 12:46

``````INDEX(E,ROW(cell),1)+INDEX(B,(ROW(cell)−1),1)
where E is the column containing x-shift, and `ROW(cell),1` is the address of the x-shift for any given row… B is the column containing x-coords, and `(ROW(cell)−1),1` returns the value immediately above the active cell