# How are satellite images mapped to terrain coordinates so precisely?

Many geoinformation systems have both satellite images and terrain features (houses, roads, etc) with coordinates. So they can show terrain features drawn over the satellite image or they can display an "it's here" mark on a satellite image given certain coordinates.

How does mapping happen (in layman terms)? A satellite flies around Earth and makes a gazillion satellite images, these shots are then sent to map producer. How does the map producer know which point on a satellite image correspond to which coordinate?

You need to know four sets of information in order to precisely locate a pixel from the image to the ground.

1) The position of the camera (three coordinates : X,Y,Z)

2) The angle of view of the camera (three angles: omega, phi, kappa)

3) The distance between the camera and the soil (or the scale of the picture)

4) the geometry of the camera (e.g. the focal distance)

The first two sets of parameters can be obtained from instrument onboard for a first approximation. For instance, a DGPS receiver provides precise X,Y,Z position, and for the angles there are inertial systems (INS). On satellites, there are also star trackers: the best satellites have a location accuracy of less than 5 meters only based on their instruments and the distance to the soil. For a more precise location, the parameters can be estimated based on a model and a set of points with known coordinates on the ground that can be precisely located on the image (called Ground Control Points). When you know the orientation of the sensor, you can build a line segment that goes from the focal point of the sensor and through the pixel location on the image toward the ground.

The ground-sensor distance can be computed if you have a digital surface model (DSM, which is like a Digital Elevation Model + height of the objects). Then you compute the intersection between the ray from the sensor (you know the origin and the angles) and the surface on the ground. If you don't have an accurate and uptodate DSM, you can use a second image to solve the problem (like our brain does to see in 3D thanks to our 2 eyes).

When you have the above mentioned infomations, you can compute the position of each pixel. For the sake of comleteness, you should also take into account some sources of errors including lens(or mirror) distortions (solved by calibration of the lens), Earth curvature and curved path through the atmosphere (there are also models for that), etc.

Raw satellite imagery is by no means spatially accurate, so a lot of work is being done to georeference the imagery correctly.
Let us start with a smaller example - the aerial imagery business, which is similar to satellites, but somewhat closer to the ground. In order to get aerial imagery to "be in the right location", a series of 'ground control points' (GCPs) are established - in some cases these GCPs are old triangulation points from the traditional mapping days. Establishing a GCP is based around accurately determining the location (latitude, longitude and elevation) of a given object, using differential GPS, and making sure that the object can be seen in the acquired imagery.
Once you have a bunch of such GCPs, it is possible to combine the accurate location information from that them and the fact that you can find the measures object in the imagery to accurately determine the georeference of the acquired image.
With a basis in the above, images can be stitched together and a accurate map can be made. A similar approach is usable for satellite imagery, however, at times it is not required to establish a new set of physical GCPs, as you can rely on other people's work by simply georeferencing your satellite image to an accurate aerial dataset.

Additional challenges lie in varying elevations across the imagery and getting GCPs in areas that are not easily accessible. Both of which can be dealt with by bringing in more data.