| MAPC2MAPC This program is designed to calibrate maps and to convert between the many calibration files in use to calibrate (ie locate on the earth) digital raster maps. It is not designed for vector maps such as used by Garmin GPS[but see below]. It will use and display maps as .jpg, .png, .bmp, .tif and .gif. It runs under Windows XP and Vista and uses the Freeimage library (inluded in the distribution). The program needs the image files to calculate bounding boxes that are needed to calibrate some systems. Menu Options: File Open Calibration : Reads a calibration file that may be .map, .gux, .tfw, .jpr, .mcd, .gmi., jgw, .pgw, .cal and .imp. The file is loaded into memory and datum or grid conversions performed. A dialogue to locate an image file may be needed; also to match datum names. A .tfw file using UTM coordinates will also open a dialogue needing input of the zone and Datum. To extract a .tfw from a GEOTIFF file (.tif file with embedded georeferencing information) download FWTOOLS and run "listgeo -tfw <filename>" File Load Map For Calibration : Loads an image file (.png, .jpr, .gif, .bmp or .tif) and displays it. Click at the top left to choose the way the file is calibrated : The Map Grid (Latitude/Longitude, OS Great Britain or UTM) and the Datum of the map (see below). Click on the map for each point and input the coordinates. For UTM and OS the Northings and Eastings are in metres (5 digits each for OS), for UTM only enter the numeric part of the zone (1 to 60). For latitude and longitude either enter whole degrees and minutes and seconds, whole degrees with decimal minutes or decimal degrees : 51 degrees 30 minutes 30 seconds OR 51 degrees 30.5 minutes OR 51.508333 degrees whichever is easier. And North/South and East/West. Between 2 and 30 points may be entered. Click at the top left to finish - you can then write calibrations and/or view the calibrated map. Right clicking on a completed calibration point allows it to be 'nudged' to an accurate position. There is a tutorial here. File Calibrate map from a file of points : Loads an image file as above then opens a file of WGS84 points (rxf,txf,mxf,plt) then each click on the map is given the coordinates from that file. Particularly useful if calibrating from Google earth : draw a path, save as KML, open the KML in GPSU and save as one of the above. File Create Blank Map : Allows the creation of an empty calibrated map. This may be used to load track overlays without an image or to define the extent and scale of a map that will be built from others by the Merge function. The map created is equirectangular so merging a Mercator map (e.g from Google or OSM) onto it will reproject it. File Load Track Overlay : Loads a file (plt,rxf,mxf or txf) of track or route points. Choose whether to put these on the map as ponts or a line and their colour. Several files may be loaded in succession. When the file is written the overlays are included. File Write Calibrations : Writes a set of calibrations, every one of .map, .tfw, .cal, .jpr, .gmi, .mcd, .txt except the input type (all types are written if an image has been calibrated). Calibrations are always written as WGS84, Latitude and Longitude File Write Overlaid Map : Saves the map with overlays a a .png and all calibrations as above. File write Trekbuddy tiles : Writes a set of tiles in a format compatible with Trekbuddy : in "<mapname>_tiles" the .map and a .set file and a SET of map tiles. Tiles are 8-bit .png whatever the input image type. If the map is in the UK then the .map file may be written using British Grid Coordinates File write Garmin Custom Map : Writes a set of tiles in a format compatible with Garmin Custom Maps : in <mapname>_tiles the doc.kml and a files folder of map tiles. Tiles are written as .jpg : other image types are converted automatically.. Use 7-zip file manager to join doc.kml and the files folder into a zip-format file with file type .kmz. The map does not need to be oriented North-South. If 'Advanced Garmin Tile Control' is checked in Preferences a form showing the tiles is opened. The number of tiles can be adjusted and individual tiles deselected (if required) by clicking. There is a sample map here - thanks to the Libra Map project for the map. File Exit : Saves any settings and exits the program (settings are not saved if the close window icon is clicked) View Calibrated Map : Opens the image file in a new window and, as the cursor moves within it, shows the calibrated position as Latitide and Longitude and as UTM or (in Britain) British Grid. Note that these are always WGS84 (except for the British Grid) and if the map grid is based on a different datum then there will, of course, be a difference. The map is intitially fitted to the available screen but may be zoomed to full size ('Fit' and 'Full' buttons) and panned Up, Down, Left or Right. Calibration points are shown as red crosshairs and their position may be adjusted by right-clicking; closing the window then causes recalculation of the calibrations. A centre button click can be used to add a calibration point - close the window to recalculate. Merge Maps : see www.the-thorns.org.uk/mapping/MAPMERGE.pdf Edit Preferences : Allows a warning to be issued before an output file is overwrittten. : When creating a .tfw file from only two calibration points, the default is to rotate the map. A preference allows you to stretch the map instead. This may be needed if whatever is reading the .tfw file needs the 2nd and 3rd lines to be zero. : When reading a .map, .jpr or .tfw file that is not WGS84 will write a WGS84 version : Size of tiles when tiling maps : Whether to show a WGS84 latitude and longitude grid on calibrated maps : Set the DrawOrder and JPG quality for Garmin maps : To enable advanced tiling for Garmin : more control over tile sizes and ability to selectively remove tiles from the output KMZ file (eg a map of an island with areas of sea that are not needed) Edit Locate Datums File : Opens a dialogue box to allow an alternate datums.txt file to located and used Edit Locate 7-Zip Program : Opens a dialogue box to locate "7z.exe". If this is done, 7-Zip will be invoked by the program to create the .kmz file for Garmin Custom Maps Edit Rescale map and save : Choose a percentage (10-90) by which to rescale the map; the image is saved as a 8-bit .png and calibrations of all types are saved to match the rescaled map.The names are suffied by the scaled fatctor so 'map1' at 40% becomes 'map1_40'. Edit Crop Map and save : Choose an area to crop (left click for top left, right click for bottom right) and the map and matching calibrations are saved as above. The names are suffixed by '_cr'. After rescaling or cropping the (new) calibration file must be loaded to see the new map. Edit Write OS Datum .MAP : Write a .MAP file based on the OS Datum for use with Trekbuddy Datums From version 2.2.3 the package contains a full set of datums. This is by kind permission of Alan Murphy, author of GPSU (www.gpsu.co.uk) - a program that is recommended for managing tracks and routes and interfacing with GPS units. If the Datum has a different name to the one by which GPSU uses (e.g "NAD 27" instead of "NAD27" there is the option to match to a known datum; the latest match is remembered and re-used without prompting. Grids The program understands UTM, British and Irish grids as well as Latitude and Longitude. Also the DutchRD grid. Others will be added subject to demand. Calibration points Different systems require different numbers of points. This program never reduces the number of points but will add one or two if necessary. An exception is the TFW format which is a mathematical description of the calibration (the coordinates of the top left and four scale factors). More details here. If the map is aligned with its grid then two of these scale factors are zero. Several calibration points may be used if the map has curved grid lines or is a Mercator projection but the TFW format always assumes the map is 'square' : an Equirectangular projection. For walking maps this does not cause a major error but for large areas the TFW format will, by its nature, be innacurate. The TFW format is used internally for the 'View' function, except for maps with a Mercator projection. Input files .gux files are accepted with 2,3 or 4 calibration points in degrees, degrees/minutes, degrees/minutes/seconds, UTM or British grid .map files are accepted with calibration points in degrees and minutes or UTM .tfw files may be in latitude and longitude or UTM. Sometimes Ozi may write incorrect UTM .tfw files with a negative origin, these are rejected. File associations MAPC2MAPC does not make any file associations - to open a file run the program and use File/open or File/load map Back to the download page Please report problems to calfiles -at- the-thorns.org.uk Changelog: version 0.0.1 26 November 2008 First version version 0.0.2 3 December 2008 Correct handling of input UTM on NAD27 version 0.0.3 January 2009 Lat/long display options, TIF image file, stretch or rotate, write wgs84 version of input version 0.0.4 January 2009 Allow Southern hemisphere UTM TFW files, better zone selection, reject invalid TFW files. accurate view for Mercator projections (e.g Google or Open Street Map maps from gmapmaker) version 0.0.5 February 2009 Allow reading MCD files (OS version only ex Get-A-Map) version 0.0.6 February 2009 Allow leading spaces in TFW files (ex LISTGEO) and OS TFW files; fix locale problems version 0.0.7 February 2009 Add output .txt files for Tracky version 0.0.8 April 2009 Fixes for OSM-MAP .map format version 1.0.0 July 2009 Zoom and Pan Map; Allow calibration of images version 1.0.1 fix read non-OS MCD version 1.0.2 check invalid OS references when calibrating version 1.0.3 Replace GDI+ with Freeimage; show calibration points as red crosshairs version 1.0.4 Write Trekbuddy style tiles, too version 1.0.5 Crop and rescale maps version 1.0.6 Rebuild bitmap palette when tiling version 1.0.7 Better crop for Mercator maps, redesign crosshairs, nudge calibrations version 1.0.8 Stop memory leakage; restructure for better calibration; save inner points when cropping; parse .map version 1.0.9 Best fit calculation for tfw file from 3 or more points, 'nudge' existing calibrations version 1.1.0 Use right mouse button to scroll half a screen, crop bug fixes version 1.1.1 Optionally show grid (based on TFW) when viewing calibrated maps. version 1.1.2 Allow image to be loaded from clipboard, minor bug fixes version 1.1.3 Handle tiny .map files from gm2tb; fix errors when calibrating not WGS84 version 1.1.4 Option write in a format for Garmin Custom Maps version 1.1.5 Fix memeory leakage; OZI MAP files for Irish Grid; file name dialogues when cropping or rescaling version 1.1.6 Option to invoke 7-Zip file manager for creating KMZ files for Garmin Maps version 2.0.0 Incorporate MapMerge functionality; fix a bug with non-WGS84 UTM coordinates;JGW and PGW input version 2.0.1 Handle more .cal formats; handle files with line feeds only; adjust tiles for Mercator projection for Garmin; handle Mercator projections when merging; configure DrawOrder and JPG quality; don't pack JPG in KMZ; remind to save preferences on Exit version 2.0.2 Advanced tiling for Garmin maps - see preferences version 2.0.3 Count Garmin Tiles; read IMP files ex CompeGPS version 2.0.4 Switch for KMZ transparency version 2.0.5 Bug fixes for MAP and CAL files version 2.0.6 Bug fixes for files without CRLF and UTM MAP files version 2.0.7 Load track overlays version 2.0.8 Colour picker and allow PLT overlays version 2.2.0 Create blank map; calibrate with other grids; tile size warning; JPEG subsampling version 2.2.1 Correct OS map for Trekbuddy version 2.2.2 Allow OS Datum .MAP to be written separately version 2.2.3 Correct MM1B calculation for .MAP; include full set of Datums Garmin vector maps can be converted to raster maps with cgpsmapper which will create a .bmp file and a matching .map file. MAPC2MAPC will convert this .map file as above. ==================================================================================================== Some Vista users may receive an error : 'Component COMCTL32.OCX or one of its dependencies is not correctly registered' The following has solved it for another user : type regsvr32 -u comctl32.ocx in run then install this app http://www.ascentive.com/support/new/libraryfiles.exe ==================================================================================================== This software uses the FreeImage open source image library. See http://freeimage.sourceforge.net for details. FreeImage is used under the FIPL, version 1.0 |