# Methods to accurately georeference geographic map?

I'm writing an application that allows the user to sample points and perform georeferencing

In order to test it I have a large scanned map (16k x 13k) pixels covering the area 31 north to 34 north and 34 east to 36 east with a geographic grid

I sampled the 4 corners of the map + 2 points on the diagonal and applied an affine transformation :

``````[x']   [A B C]   [x]
[y'] = [D E F] * [y]
[1]    [0 0 1]   [1]
``````

using the 6 points, and least squares I managed to find [A B C D E F], but applying it gave me an inaccurate transformation...

The Longitude is very accurate all along the picture (> 1 arc second), but the latitude deviates sometimes up to 15 arc seconds (~ 400-500 meters)

I assume that no matter how many points I will sample the affine transformation won't cut it...

What is the appropriate transformation here?

Trying to project the geographic coordinates

I projected the sampled points to UTM first, and then calculated the affine transform (again 6 points)

The results are pretty much the same - Accurate near the control points but, drops significantly when I get farther

Using 2nd Polynomial Transformation

I was able to get better results by using a 2nd order polynomial transform instead of an affine one, but I still get deviation of 4-5 arc seconds

The transformation I used -

``````[x']  =  [A B C D E F] * [x*x]
[y']     [G H I K L M]   [y*y]
[x*y]
[ x ]
[ y ]
[ 1 ]
``````

Where A-M are the transformation parameters {x',y'} are the geographic coordinates and {x,y} are the screen pixel coordinates.

since there are 12 parameters it requires 6 points to be sampled...

I suppose I could try to do a 3rd order transform (20 parameters - 10 control points needed) or even higher but I wonder if there isn't a better way?

• I think you need to be in a projected coordinate system for an affine transformation to make sense. Are you using any APIs relating to GIS or projections? These should have the ability to perform the reprojection for you. Mar 31 '14 at 16:27
• I'm not using any external API's, could you recommend some? By projected coordinates do you mean something like UTM grid? I have good UTM to Geographic and vice versa functions. I could transform the geographic coordinates to UTM and then calculate the affine transform... Mar 31 '14 at 17:26
• I'm not sure the right question is being asked here. If you have a map with a known graticule (lat-long network), then your map is already georeferenced, by definition. I think your first question should be: What map projection do i have? And an affine transformation is not even relevant. Can you add an image of your map? And clarify what your intended inputs and outputs are? Apr 3 '14 at 1:21
• I think your real question is "How do i convert between geographic coordinates and Mercator projected map (screen) coordinates?" Transformations are approximations, while map projections are pretty well exact. Apr 3 '14 at 21:37
• In Mercator, longitudes and latitudes are orthogonal, but latitudes are not equally spaced. It is really much easier to convert the degrees to projected meters using standard tools like GDAL with the correct target projection, and then make an affine transformation to fit the extent of your map. Apr 5 '14 at 6:46