The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Declaration: [1] function AddCalibPoint (GratLineKind: TGratLineKind; LineValue: double; PixPosX, PixPosY: integer): boolean;
[2] function AddCalibPoint (Northing, Easting: double; Zone: integer; Hemisphere: THemisphere; PixPosX, PixPosY: integer): boolean;
[3] function AddCalibPoint (Latit, Longit: double; PixPosX, PixPosY: integer): boolean;

The method AddCalibPoint adds a calibration point to the calibration data (accessible by the property CalibData). There are three overloaded versions available which have to be used in correspondence to the currently selected calibration model:

Version [1] has to be used if CalibModel is set to cmParabolicIp: The parameter GratLineKind defines the type of the graticule line (parallel or meridian) the point belongs to. The corresponding value of the graticule line (i.e. the latitude or the longitude) has to be passed in the parameter LineValue. PixPosX and PixPosY specify the pixel coordinates on the map image.

Version [2] is used for the calibration of UTM maps (CalibModel is set to cmUTM): The parameters Northing and Easting define the corresponding UTM coordinates, the parameter Zone has to contain the zone number, the parameter Hemisphere the hemisphere (north/south). Please note that AddCalibPoint raises an exception if the Zone code and/or the Hemisphere do not match the properties UTMZone and UTMHemisphere. It is therefore indispensable to set these properties immediately after switching to the UTM calibration model and before calling the method AddCalibPoint the first time.

Version [3] has to be called if the calibration model is set to any other model type not covered by versions [1] and [2]. The parameters Latit and Longit define the latitude and longitude of the calibration point, the parameters PixPosX and PixPosY specify the pixel coordinates on the map image.

Hint 1: Please note that the parameter LineValue has to be exactly the same for all points on the same graticule line. This is especially important when entering points along a non-integer parallel or meridian. For example, if you add two points belonging to a parallel of 3620' (= 36.333333....) you have to be careful to use always the same precision (e.g. 6 decimal places) for entering the LineValue. If you enter the two points using the first time 36.3333 and the second time 36.333333 then the two points will not be recognized as points which are meant to be located on the same parallel.

Hint 2: All methods of TGeoMap which need to calculate (either implicitly or explicitly) the coordinates on a map work properly only if a minimum number of calibration points have been specified. The minimum required number of data points depends on the kind of calibration model used: the parabolic interpolation model requires that at least two parallels and two meridians have been entered into the calibration data. Each parallel or meridian has to be specified by at least three points on the line. The biquadratic polynomial model requires at least 6 quadruples (15 recommended).

Hint 3: The pixel coordinates are in the reference frame of the scanned map image, use the method MapImageToControl to transform the coordinates to the screen reference frame.

Example: This method is used in the following example program (see for downloading the code): simplegeomap

Last Update: 2013-Oct-26