In my line of work, fieldworkers measure specific drilling points and give us x,y coordinates from easily identifiable reference points (the corner of a house for example).

Is it possible to plot their reference point on a map (say a satellite image), define an axis and then insert the x,y coordinates they provided (in meters) to find the point they plotted on the map?

I'm using QGIS.

  • This is pretty similar to archeology digs I've done GIS work for. Did they align their grid to a particular azimuth, or is it arbitrary? Does their grid include more than one reference point or just the one? With it in meters, it may be pretty straightforward getting it into a UTM system, but a lot will depend on what their grid looks like.
    – jcarlson
    Commented Feb 23, 2018 at 11:47

2 Answers 2


You need to know the coordinate reference system (CRS) in which they're providing x,y coordinates. This could be an EPSG code. Then add your x,y points in QGIS; here's some guidance on that. Finally, you can use "Reproject Layer" in the Processing Toolbox to project your x,y coordinates to EPSG:4326 (most common lat/lon spheroid).

Personally, I would use Python:

import ogr, osr
import numpy as np
def transform_coordinates(xs, ys, inputEPSG, outputEPSG):

    if inputEPSG == outputEPSG:
        return xs, ys

    # Create an ogr object of multipoints
    points = ogr.Geometry(ogr.wkbMultiPoint)
    for i in range(len(xs)):
        point = ogr.Geometry(ogr.wkbPoint)
        point.AddPoint(float(xs[i]), float(ys[i]))

    # Create coordinate transformation
    inSpatialRef = osr.SpatialReference()

    outSpatialRef = osr.SpatialReference()

    coordTransform = osr.CoordinateTransformation(inSpatialRef, outSpatialRef)

    # transform point

    xyout = np.array([0,0,0])
    for i in range(len(xs)):
        xyout = np.vstack((xyout, points.GetGeometryRef(i).GetPoints()))
    xyout = xyout[1:,0:2]

    return xyout[:,0], xyout[:,1]
  1. Find the given reference point using satellite imagery and find its coordinates in the appropriate UTM zone. UTM is based on meters, and makes this process a little tidier. We'll refer to this point as ( x' , y' ).
  2. Make sure you know the azimuth of the positive direction of the y axis of the field grid, which we'll refer to as α. If your field workers were nice, this is should hopefully line up with true north. Whatever the bearing, cross your fingers that they were accounting for declination.

enter image description here

  1. Open your site coordinates table in QGIS (assuming X and Y values are in their own fields) and perform the following in the Field Calculator. This will assign coordinates that correspond to the reference point, as well as apply a rotational matrix to account for any rotation of the grid.

    1. Create new field "Eastings" with the expression
      "Field_X" * cos(radians(-α)) - "Field_Y" * sin(radians(-α)) + x'

    2. Create new field "Northings" with the expression
      "Field_X" * sin(radians(-α)) + "Field_Y" * cos(radians(-α)) + y'

  2. Your new fields will be virtual ones, so save the table as a new CSV to make them permanent.

  3. In the Processing toolbox, select QGIS geoalgorithms > Vector creation tools > Points layer from table.

  4. Use your new CSV as the input, select Eastings as X field, Northings as Y field, and match the Target CRS to the coordinates of your reference point.

You should now have your points properly georeferenced. Below is an example of this process, using a random reference point, a 5m x 20m grid, rotated at sixty degrees. Any points from within this grid, run through the same process, will now have a proper coordinate reference.

rotated grid system

  • Hi Josh! Thanks for the very detailed answer. To be honest, it's a little too complicated for my limited understanding, also, we don't always know the angle and have to visualle trace the outlines of the buildings. I was wondering if you know of another way to define an axis, and than type the coordinates to result in a single point. There are tools like CAD that supposedly support this way of work, but I have no experience with those (yet), do you have any other suggestions?
    – user115035
    Commented May 3, 2018 at 19:36

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.