Class GeoCoorValDialog

The class GeoCoorValDialog allows a user to perform georeferencing calculations on an image with sufficient geographical information. The calculations are encapsulated in the GeoConvert class, which provides a set of methods to georeference any supported image.

Description:

'Georeferencing' or geographic referencing is the name given to the process of assigning values of latitude (lat) and longitude (long) to features on a map. The process of georeferencing a digital image can vary greatly from image to image, but the end result is the ability to retrieve the lat/long coordinates for any point on the map. This is useful because a lat/long coordinate can precisely define the position of an object on the Earth.

For I2K, an interface has been developed to provide georeferencing functionality of a map while abstracting away the specific parameters of that map. This allows for the transparent addition of as yet unsupported map types as well providing assurance that if the map parameters have been defined correctly, the georeferencing will also be correct. The concept for the georeferencing system in I2K is based around transformations to and from three types of values: pixels, lat/long coordinates, and UTM values as it is shown in Figure 1. These transformations are housed in this class.



The first two are fairly obvious because one would of course like to know the lat/long values of any pixel in a georeferenced image, but the third value is unknown to most people. The Universal Transverse Mercator (UTM) coordinate system is a Cartesian coordinate system developed by the oil industry. It is useful for specifying a number of points on a map without having to refer to latitude and longitude. Because the UTM system is two-dimensional and the latitude/longitude system is inherently three-dimensional, transformation from UTM values to a latitude/longitude pair involves complex calculations. In UTM terminology, the vertical (y) coordinate is called northing and the horizontal (x) value is called easting. A UTM coordinate pair is called a northing/easting value.

The two methods in GeoConvert that accomplish UTM to and from lat/long transformations are
UTMNorthingEasting2LatLng(Point2DDouble p)
and
LatLng2UTMNorthingEasting(Point2DDouble p).

It is also useful to go from UTM northing/easting to pixel valued row/column, and vice-versa. These methods are called, respectively,
UTMNorthingEasting2ColumnRow( Point2DDouble p),
and
UTMNorthingEasting2ColumnRow( Point2DDouble p).


The most obvious need is to translate from a pixel value, that is, a row and column of the image, to a latitude/longitude pair. With a proper implemenation of the first two types of transformations, we can get these two for free. The transformations that accomplish this are:
public Point2DDouble ColumnRow2LatLng( Point2DDouble p)
and
public Point2DDouble LatLng2ColumnRow( Point2DDouble p)
The user can access this interface through the use of the GeoCoorVal dialog, shown here. If georeferencing information is detected in an image, the standard CoorVal dialog includes an extra button, labeled 'GeoConvert.' Clicking this button launches the GeoCoorVal dialog.

The two textfields at the top of the dialog box show the latitude and longitude of the current pixel. The text panel in the center of the dialog box gives the current row and column in the viewable image of the lat/long pair associated , as well as the row and column in the underlying source image (in case any subsampling has taken place).
To convert lat/long values to pixel coordinates, the user should type the desired lat/long value into the text fields and then hit 'enter.' The proper calls to the GeoConvert class will be made and, if the given lat/long pair is within the bounds of the image, several things will happen. First, the cross drawn on the image will move to indicate the pixel with the desired latitude and longitude. Secondly, the text panel information will update with the new row and column information (as well as information specific to the pixel value at that location). If the lat/long pair is outside the bounds of the image, the cross will not move and the latitude and longitude fields will revert to their previous values.
The 'Show' button has the same functionality as in CoorVal dialog. Clicking the button produces a chart of the value of a pixel for each of its bands.
When finished performing latitude/longitude to row/column transformations, clicking 'Done' will close the dialog box.