Multiplans - use the best maps into your iPhone or iPod Touch

New syntax for calibrating maps

The calibration of a map can be performed by entering calibration points in file ref.txt.

The geographical coordinates of the chosen calibration points can be specified either as "projected" X, Y coordinates (read along the map grid lines), or as longitude and latitude (in WGS84 datum, i.e. as GPS coordinates).

For instance, on the following swiss map, we have measured the X and Y (swiss) coordinates of 2 points, see numbers in red:
To calibrate this map, one can write the following ref.txt file:
PROJ:projection parameter string
135,56 = 569000,193000
1136,656 = 574000,190000
Line 1 in the above file describes the projection. For a swiss map, the projection parameter string would read "+proj=somerc +lat_0=46.952405555556 +lon_0=7.4395833333333 +ellps=bessel +x_0=600000 +y_0=200000 +k_0=1.0 +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs".
Line 2 specifies the first calibration point: the point at position x=135 pixels and y=56 pixels has geographical coordinates X=569000 and Y=193000.
Line 3 specifies similarly a second calibration point.

The two calibration points can be located anywhere on the map, but they must not lie on the same horizontal or vertical line. For best results, place the two calibration points near opposite corners.

To specify the geographical coordinates as longitude and latitude (instead of "projected" X,Y coordinates), add keyword "(WGS84)" after the coordinates, as in the following example:
PROJ:projection parameter string
135,56 = 7.03191, 46.88733 (WGS84)
1136,656 = 7.09766, 46.8606 (WGS84)

Instead of giving 2 calibration points, one can give a single calibration point and specify the horizontal and vertical resolutions of the map.
The above map can for instance also be calibrated by:
PROJ:projection parameter string
135,56 = 569000,193000
resolution: 5

Bilinear interpolation

If the map's cartographic projection is unknown, Multiplans can use bilinear interpolation to locate positions on the map. To use bilinear interpolation, enter keyword "Bilinear interpolation" in the first line of file ref.txt. The next lines should then contain 4 calibration points, with geographical coordinates given as longitude,latitude (no need to specify explicitly "(WGS84)" after the Long/Lat coordinates). For best results, place a calibration point near each corner of the map. It is also possible to specify only two calibration points (they should be placed near opposite corners).
Bilinear interpolation
135,56 = 7.03191, 46.88733
1136,656 = 7.09766, 46.8606

Calibration with 2 points only will give good results if lines of constant longitude (constant latitude) are vertical (resp. horizontal) lines. If these lines are not aligned along the vertical and horizontal directions, use 4 calibrations points.

OziExplorer .map calibration file

To calibrate a map, one can also provide a .map file instead of a ref.txt file. Multilplans will then use bilinear interpolation using 4 calibration points.