Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Georeference Image Code

Posted on 2004-03-23
Medium Priority
Last Modified: 2010-10-05
I need to build a simple UI to georeference a jpg or gif image with a worldfile. Simple stuff if you are using ArcSomething or MapInfo. However, I can't seem to figure out how to do the affine transformation using more than 2 control points. Using a linear equation (top left coordinates and bottom right coordinates) seems easy enough, but what type of formula (and how) would I plug in more than 2 control points? I would hope the system could use control points that are not corners to make it easier on the user. The system is being developed in VB.net and yes, I realize applications like OziExplorer can do this and unfortunately, I need to reinvent the wheel. Any thoughts on how to get started on this?

Thanks in advance,
Question by:mhaynie

Expert Comment

ID: 10720575
As long as you build the grid up all you need is one point to work with.  Since you are inventing it, you just have to choose how you want to do it.  The deal is you have to know how you are going to reference things, I'd make a giant grid and use the lower left hand corner of the image as the reference, and snap it to the giant grid.  Another way of looking at it is you lay out a giant collage, and then put a grid on it, and label the grids.  

Quash, my ideas!
LVL 13

Expert Comment

ID: 10743473
I have developed a solution to that problem. Although it also requires the points to be as distant as possible on the image , but it still can be used with nearer points.
You may check it at as an answer from me at


I worked on another idea to Georeference Images (with as many points as available) but the results of it were not that much satisfying.
If you need it I can put it up here.

Expert Comment

ID: 10744169
It comes down to a linear regression problem.

Xnew = a + bXold + cYold
Ynew = d + eXold + fYold

Fill in at least three know coordinate pairs and you can calculate the coefficients. Use more and you can calcuate the RMS which gices you an estimation of the accuracy.

Let me know if you need the exact formula's to calculate the coefficients.

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.


Accepted Solution

f_rodriguez earned 375 total points
ID: 10842446
I developed a program to calibrate raster images using 2 points (which can be anywhere on the image) that conforms to the WorldFile format, which is the standard used for calibrating raster maps. If you're interested, I can e-mail you this program. Let me know...


Author Comment

ID: 10842750
The formulas would be helpful for calculating the coefficients. If you have them please email or post them in this forum. My email is mhaynie(AT)caddistech(DOT)com. I've seen bits and pieces of the affine transformation, but can't seem to find how to solve for each part programatically. Thanks in advance, I really appreciate it.


Expert Comment

ID: 11019919
I think f rodriguez answered your question.  Please award points to the experts that help you.  Who knows maybe he can help you figure out the programmimg.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I feel like more and more people want to know how to programmatically convert addresses into geospatial locations. So in this article, I will show you how you can do it with Bing Maps. I'm going to use PowerShell, which is a nice scripting language,…
Introduction This article is designed to assist GIS (Geographic Information System) and GPS (Global Positioning System) developers using ESRI ArcGIS and other spatial information management systems.   For the uninitiated the concept of projectio…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question