Mobile GMaps Home Page
 FAQFAQ    SearchSearch    MemberlistMemberlist    UsergroupsUsergroups   RegisterRegister  
 ProfileProfile    Log in to check your private messagesLog in to check your private messages    Log inLog in 

Convert Ozi Map files to Mobile maps

 
Post new topic   Reply to topic   printer-friendly view    MGMaps Forum Index -> Stored Maps
View previous topic :: View next topic  
Author Message
Pyrpolizer
Power User


Joined: 09 Nov 2008
Posts: 34

Phone Type: Nokia N95 8GB

PostPosted: Sun Nov 09, 2008 5:45 pm    Post subject: Convert Ozi Map files to Mobile maps Reply with quote

Hi,

This is my first post here, and here’s my 2 cents contribution.
I have written some Windows based macros for converting Ozi Explorer map files (*.map format) to MGMaps format.You can use your own *.map files with as few as only 2 calibration points, or the *.map files created by gMapMaker with as many as 30 calibration points. Notice my Ozi explorer makes *.map files according to "OziExplorer Map Data File Version 2.2". gMapMaker uses the same format too. Open one of your *.map files in Notepad and check the format-it’s written in the very first line.

What you need:
a)Microsoft’s MapCruncher installed
b)Microsoft Word installed
c)Microsoft Excel installed

Preparatory Work:
1)Download the Zip file and extract the contents somewhere on your computer.
2)Prepare your computer to show file extentions. Assuming you use Windows XP, press: My computer/tools/folder options/view. Untick "Hide extentions for known file types".
3)Prepare Word to make tables according to comma delimited texts: Assuming you use Word 2003: Open Word, then type "a,b,c,d,e". Press Edit/select all/table/convert/text to table. Tick "other", type a comma in the square box next to it, press OK. You should now see a table with 1 row 5 columns. Exit Word, it will remember your habits, so you won’t have to do this again.
4) If your are experienced enough I am sure you can load the *.dot file in your Word application and bypass it’s securities.If not then:double click the file "Macro for Word 2003.txt" press edit/select all/edit copy/ exit (x). Open Word. Tools/macro/macros/ macro name/type "OziMap"/create. Go to the line before End sub.Press CTRL+V on your keyboard. Now make a toolbar for this thing. View\toolbars\customize\toolbars\new\toolbar name "OziMap"\OK\commands\macros\then drag and drop "Normal.NewMacros.OziMap" inside your empty toolbar. Exit and re open word to check if your new toolbar is there.
5)Now we should dress up Excel for the party.Tools\macro\security\low
6)And finally dress up our computer to show up sexy numbers to Excel to get it excited. Laughing
Start\settings\control panel\regional and language options\regional otions\customize\numbers\decimal symbol "." -a dot,Number of digits… "2", digit grouping symbol "," -a comma, negative symbol "-",negative format "-1.1", display leading zeros "0.7", list separator ";" Measurement system "metric".

OK after all this preparation we are ready for some real work.
Open Word. Is your Ozi toolbar there?Click exit (x) on the inner window so that you are only left with the application running and no document in it.Leave Word running.
Open Ozi Converter.xls. Have a look to the file to get yourself aquainted. You will not have to do anything really other than press buttons.The file just shows the data I got for the city of Nicosia.As you can see I only had 3 calibration points in my original map.

Drag and drop your *.map file inside Word. Press the Ozi toolbar button. After some processing the file will exit by itself leaving you all data ready on the clipboard memory. Go to your Excel file.Press "1.Clear". All your map data should now be there.Change the zoom levels if you want.Press buttons "2.Process" then "3.Prepare Yum" then "4.Notepad" If Notepad is not on C drive this last button won’t work, so you might need to open Notepad from your start menu. Press Edit\Paste on your Notepad Window.Press file\Save as\Type MyMap.yum (or whatever other name you like as long as it has a ".yum" extention,\ENCODING chose UTF-8\Save
Rather, before saving, chose the path towards the folder where your original map file is stored.If you saved the *.yum file anywhere else just copy and paste it to the right place.

Double click your *.yum file. Microsoft’s MapCruncher will run, zoom your window until you see your map and the calibration points nicely installed, press Render and you are done. Follow the instructions elsewhere on the forum on how to proceed. (The only cache.conf file that worked on my Nokia is also included in my zip file, use that if you like, it is supposed to open maps as "Microsoft maps" but on my cell they open as "Live maps") Confused

There is a problem with Microsoft’s MapCruncher regarding its zoom levels though, as they have nothing to do with the zoom levels of your own map.I am trying to figure out a formula to overcome this problem, until then look inside the green cell M5 of your Excel file.There is a preliminary formula there, on the number of tiles you should expect for a readable zoom level.For the specific Nicosia map I needed about 311 as you notice. If you see Microsoft’s MapCruncher cutting thousands upon thousands of tiles just stop it.Open your *.yum file in Notepad. Edit\goto\line 20\OK and change the zoom levels manually. Better write the same numbers for minimum and maximum to have some control over this.

Enjoy!

NB. I have only tested the whole thing for N and E coordinates. It seems MapCruncher uses a minus sign (-) for S, and West coordinates, so I just included a minus sign too in my formulae as well. PM me if that won’t work.

NB2. Please download the tool from 5th message as the Original tool had a bug. Arrow Arrow Arrow


Last edited by Pyrpolizer on Sat Nov 29, 2008 10:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
Pyrpolizer
Power User


Joined: 09 Nov 2008
Posts: 34

Phone Type: Nokia N95 8GB

PostPosted: Mon Nov 10, 2008 7:58 am    Post subject: Reply with quote

...

Last edited by Pyrpolizer on Mon Dec 29, 2008 10:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
Pyrpolizer
Power User


Joined: 09 Nov 2008
Posts: 34

Phone Type: Nokia N95 8GB

PostPosted: Sat Nov 15, 2008 9:57 am    Post subject: Reply with quote

I discovered the code wouldn’t work with MapCruncher if the height of the original map was greater than the length. OK I fixed all that, but… as there was absolutely no feedback from anyone I concluded nobody is interested, so why should I spend my time uploading the fixed codes?
Goodbye guys, nice talking to myself in here.
Back to top
View user's profile Send private message
Cristian Streng
Founder


Joined: 28 Oct 2005
Posts: 4585

Phone Type: (many)

PostPosted: Sat Nov 15, 2008 2:40 pm    Post subject: Reply with quote

Pyrpolizer wrote:
I discovered the code wouldn’t work with MapCruncher if the height of the original map was greater than the length. OK I fixed all that, but… as there was absolutely no feedback from anyone I concluded nobody is interested, so why should I spend my time uploading the fixed codes?
Goodbye guys, nice talking to myself in here.

Hi,

Sorry for not answering and thanks for the code and instructions. I haven't tested it as I don't use OziExplorer... but maybe other users will try it and give feedback. I'll mark the topic as sticky...

br,
Cristian
Back to top
View user's profile Send private message Visit poster's website
Pyrpolizer
Power User


Joined: 09 Nov 2008
Posts: 34

Phone Type: Nokia N95 8GB

PostPosted: Sat Nov 15, 2008 9:11 pm    Post subject: Reply with quote

Thanks for the encouragement Cristian.
It’s not necessary to have Ozi Explorer to test or use it. gMapMaker can make you an Ozi explorer (image + *.map file) to test. Operating mode:"build image & Ozi Explorer .map file".
I don’t know what to think, maybe people got terrified (of catching a virus or something) by the so many warnings in Excel about setting their macro security to low …
Maybe you as the Admin could ease their fears after testing it.

Here’s the updated tool.



Updated Ozi Map converter.zip
 Description:

Download
 Filename:  Updated Ozi Map converter.zip
 Filesize:  71.13 KB
 Downloaded:  1914 Time(s)

Back to top
View user's profile Send private message
omontero
Junior


Joined: 01 Dec 2008
Posts: 6

Phone Type: Unknown

PostPosted: Mon Dec 01, 2008 6:34 pm    Post subject: Reply with quote

Could I use your tool to convert an map in pdf format to use it with mgmap?
Back to top
View user's profile Send private message
Cristian Streng
Founder


Joined: 28 Oct 2005
Posts: 4585

Phone Type: (many)

PostPosted: Mon Dec 01, 2008 7:22 pm    Post subject: Reply with quote

omontero wrote:
Could I use your tool to convert an map in pdf format to use it with mgmap?

I guess you can calibrate the map with OziExplorer then convert it using these instructions... Or better, you can calibrate it directly in MSR MapCruncher. My other answer to your question is here: http://forum.mgmaps.com/viewtopic.php?p=11779#11779
Back to top
View user's profile Send private message Visit poster's website
Pyrpolizer
Power User


Joined: 09 Nov 2008
Posts: 34

Phone Type: Nokia N95 8GB

PostPosted: Tue Dec 02, 2008 2:54 pm    Post subject: Reply with quote

I have some news regarding this tool and some tips

a) Regarding the instructions to prepare your Computer: I noticed some Regional settings won't have the option of a dot "." or "," available. You can overcome this problem by typing e.g a comma in Word or Notepat, select and copy it, and then go to your Regional setting options box, and paste it using CTRL+V

b)There is a free version of Ozi Explorer available that can be used to calibrate your map images. The only limitation is that you can only use *.bmp image files.
That shouldn't be a problem as you can easily convert your (e.g jpg files) to *.bmp format by just opening them in Ms Paint and "Save As" any other format including
of course *.bmp. Map Cruncher accepts almost any format. I would suggest you use Google Earth to get the coordinates for calibrating your Ozi map.

c) The greatest advantage of MapCruncher is that you can use just a single map and get out of that all downward zoom levels without having to download tiles over and over again for each zoom level separately. E.g you can download the tiles for zoom level 17 and use MapCruncher to get tiles for zoom levels 16,15,14,13, etc.

d)Using the above feature you can even have overlaping maps in just one pack.For example you can crunch the map of the whole country at zoom levels 10-14. Then the map of districts at say zoom levels 15 and 16. Then the map of towns inside the districts at zoom levels 17 and 18.This way you switch to different maps by just selecting a different zoom level. See schematic below.

e) The biggest disantvantage of MapCruncher is that it produces *.png files that are about 10 times bigger in size than *.jpg files.This problem can be solved using the free program "IrfanView" and convert your tiles in just one run using batch conversion. Notice the coordinates and zoom level of each tile are inside its name, not inside the file or it's type. So by converting from png to jpg your file is fine and fully coordinated.

f)The second disadvantage of MapCruncher is that it produces 1 tile per file. The good news is I have designed some windows based tools that can convert single tiles to multiple tiles per file format (MTPF). This way you can now store your own maps together with your other maps in MGMapsCache folder and just switch maps by pressing"0". The tools produces MTPFs at hash size 1, and tiles per file 2,4,8,16,32,64 and 128. You can download the tools from this topic:

http://forum.mgmaps.com/viewtopic.php?p=11790#11790



Overlapping.JPG
 Description:
 Filesize:  36.02 KB
 Viewed:  27892 Time(s)

Overlapping.JPG




Last edited by Pyrpolizer on Tue Dec 02, 2008 4:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
Pyrpolizer
Power User


Joined: 09 Nov 2008
Posts: 34

Phone Type: Nokia N95 8GB

PostPosted: Tue Dec 02, 2008 4:21 pm    Post subject: Reply with quote

omontero wrote:
Could I use your tool to convert an map in pdf format to use it with mgmap?


In fact my own maps were pdf too.
With adobe Reader 8.1.3 that I m using you just click on your map, it gets blueish in colour, and then you press edit\copy file to clipboard.
You open Ms paint edit\paste and save (as bmp.image)
I then use 2 applications running at the same time:Google Earth and OZi explorer. (Google is free, Ozi also has a free version) With Google Earth I put "placemarks" and copy coordinates directly and paste them in Ozi. 3 coordinate points forming a big triangle are enough. Ozi will create you a *.map file. Once you have that map file everything else is automated.

If your map is at street level-trust me you don't have any other choice.
Back to top
View user's profile Send private message
Pyrpolizer
Power User


Joined: 09 Nov 2008
Posts: 34

Phone Type: Nokia N95 8GB

PostPosted: Tue Dec 30, 2008 7:37 am    Post subject: Reply with quote

I think it’s about time we clarify some very confusing issues in terminology, as I receive PMs asking about it.

First: A map= What we commonly refer to, a piece of paper or a digital image with a map.

Second: *.map=A text file with .map extention produced by Ozi Exploreror gMapmaker in Ozi mode. It contains coordinates and needs the digital image mentioned above to work.

Third:The *.map file used in Mgmaps mode in gMapmaker or in MapTileCacher.perl This is also a text file with coordinates etc but totally ireelevant to the above.

What we need here is the second one.
Back to top
View user's profile Send private message
booBot
Power User


Joined: 03 Jan 2010
Posts: 30

Phone Type: Nokia 6680 v5.04.07 15-02-06 RM-36

PostPosted: Tue Jan 05, 2010 8:25 pm    Post subject: Reply with quote

May be your macros are not so popular because they depend on MS's Office?
Could you look into adapting them for OpenOffice, please?

_________________
MGMaps v1.39.21 on RS MMC 2GB (FAT16, 32kB blocks), GPS: NaviTel RX-200BT
Back to top
View user's profile Send private message
Pyrpolizer
Power User


Joined: 09 Nov 2008
Posts: 34

Phone Type: Nokia N95 8GB

PostPosted: Tue Jan 12, 2010 6:41 pm    Post subject: Reply with quote

How do you know they are not popular???

Anyway here we contribute my friend. We are not trying to sell anything. I did them for myself they worked perfectly, so I share them with others. That's all.

Besides OpenOffice crashes on my PC
Back to top
View user's profile Send private message
booBot
Power User


Joined: 03 Jan 2010
Posts: 30

Phone Type: Nokia 6680 v5.04.07 15-02-06 RM-36

PostPosted: Wed Jan 13, 2010 6:55 pm    Post subject: Reply with quote

Pyrpolizer wrote:
How do you know they are not popular???

That was your own observation (see the third post).

Pyrpolizer wrote:
Besides OpenOffice crashes on my PC

I do not have MS office and at the same time OpenOffice does not crash on my PC.

I'd gladly shared something but unfortunately I do not know how to use VB|macros.

_________________
MGMaps v1.39.21 on RS MMC 2GB (FAT16, 32kB blocks), GPS: NaviTel RX-200BT
Back to top
View user's profile Send private message
cdubler
Newbie


Joined: 23 Jan 2010
Posts: 1
Location: Denver, CO USA
Phone Type: BlackBerry Curve 8900 on AT&T. Also iPhone 3G.

PostPosted: Sat Jan 23, 2010 2:49 am    Post subject: Reply with quote

Hello Pyrpolizer,
I'm going to give your macro utility a try. It seems to be the only way I can get custom trails into offline MGMaps. I have a web site of trails that I've created from GPX and KML files: www.denvermetrotrails.com. From other threads, I've learned that if you put a KML file on your phone for use with MGMaps, it only shows waypoints, not polylines (trails). So I hope that by creating the map in Ozi first with the polylines, I can then convert it to .map for using with MGMaps.

I'll let you know how it goes.
Back to top
View user's profile Send private message Visit poster's website
micutu
Newbie


Joined: 06 Jan 2011
Posts: 2

Phone Type: Nokia E72

PostPosted: Fri Jan 07, 2011 9:40 pm    Post subject: Re: Convert Ozi Map files to Mobile maps Reply with quote

Pyrpolizer wrote:
Hi,

This is my first post here ...



hello,

after more than two years from the first post, please tell me if you discover a more simple way to convert from Ozi in GMaps.

I want to convert from GE in GMaps; in my PDA i have offline GE maps, which works perfect, obtained with Ozi, but for my E72 i cannot find anything to put the same maps there.

These maps are important for me, because the other maps in that area (Danube Delta: N 44.917821°, E 29.074905°) are very very bad.

thank you,
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MGMaps Forum Index -> Stored Maps All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
MGMaps topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group