====== How to convert IMG maps to SQL ====== ---- ===== How to ===== This is one of possible working and tested methods of conversion of IMG map files to one of formats that Locus supports (within some limits). ==== What you need ==== * IMG map file you want to convert * [[http://gmeaddons.sourceforge.net/|MapEdit++]] software * MAPC2MAPC software * some free time ===== Procedure ===== ==== 1. convert IMG to image format (BMP) ==== - start MapEdit++ program (Instructions based on v1.061.496) - select **File** -> **Open** and choose your IMG map file. It will take some time till program analyzes and loads whole map file. - now it depends if you want to export whole IMG map file to Locus Map or just a part of it. * whole - easier, nothing special to prepare * part - it's necessary to find top-left and bottom-right coordinates of area you want to export. At the bottom of screen you can see current coordinates of your screen center cursor so we suggest to **write these two required locations on a piece of paper!** - now zoom to level you want to have exported (only one zoom level may be exported so choose precisely) - select **File** -> **Export** -> **Raster image** * define path where you want to export the *.bmp file * select **Create OZI map file** * define path where you want to export the *.map file * in //Rectangle to export// press **Set whole map** or **Set custom** if you want export just part of map * //Scale// cannot be changed and tilling is not needed here, so press **Finish**. - that's all here, let's go to another part! ==== 2. convert OZI map to SQLite map ==== - start MAPC2MAPC program (Instructions based on v499) - select **File** -> **Open Calibration** and choose your ** *.map** file - program will load this calibration file and print out some results - select **File** -> **Write Mobile Atlas** * in //Select atlas// choose **Locus/RMAPS/...** item * zoom levels should be left as is. MAPC2MAPC automatically creates some zoom levels for you from that one bitmap image * if you need to specify some tiles and want transparent margins, select //checkboxes// below * after the selection, press **OK** and... wait... ==== 3. Result ==== Result of this procedure should be an ** *.sqlite** map file. Simply put this map file into //Locus/maps// directory on your device and start Locus. It loads this map automatically and allows you to select it in //Map Manager// screen.