Tuesday 31 July 2012

Creating OruxMaps from South African Aviation image files

Orux Maps

I have managed to figure out how to get South African Aviation VFR maps purchased from the SA Goverment Printers converted into calibrated maps to be used on my Samsung Android device with OruxMaps.

These tiff files purchased do contain geoinfo (using something like gdal to look at the values), but for some reason, when using OruxMaps Desktop, the calibration does not work right. When confirming placemarks with actual GPS positions, it does not tie up. I am not sure wheteher its the geoinfo embedded in the files, or whether there is a small glithch with OruxMapsDesktop. Using a graphical viewer and writing the coordinates and pixels down manually and feeding them to OruxMapsDesktop, seems to work 100%

Example

Using for the Johannesburg 1:250 000 map, I prefer to run OruxMapsDesktop from the commandline(using map2.jpg as input):

java -Xmx512m -jar OruxMapsDesktop.jar 
-d="WGS 1984Global Definition" 
-q=JPEG,85 -sqlite -z=50,25,12.5,6.25
-p='LAMBERT CONFORMAL,-27.5,25.2,-25.5,-26.75,0,0' 
-n=jhb-1-0_2.5M
-r='geo,360,416,27.5,-25.25;geo,424,9576,27.5,-27;
geo,9086,416,29,3333,-25.25;geo,9021,9576,29.3333,-27' 
-o=generated -i=map2.jpg

These values can be entered manually into OruxMapsDesktop too, but I prefer not having to make screenshots...

Another Example

To create a calibrated map for OruxMaps in a similar fashion for example Nelspruit 1:500 000, these values can be used as -g parameters:

Pixel X, PixelY, Long, Lat
935, 802, 30,-25
1027,6039,30,-27
1494,801,34,-25
10402,6039,34,-27