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 

Tools to Convert single tiles to Multiple Tiles per File
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9  Next
 
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: Tue Dec 02, 2008 2:52 pm    Post subject: Tools to Convert single tiles to Multiple Tiles per File Reply with quote

The codes are Windows based and you will need

MS Word installed.
MS Excel installed.

Everything else together with instructions how to do it are inside the zip file. Please provide feedback in case of bugs.

A "must have" tools for those using MapCruncher, or Ozi maps as well as for people who have a collection of single tiles downloaded already.

The original tool had a bug (some tiles would be missing from end result), so please download the update from message #3

Arrow Arrow Arrow Arrow


Last edited by Pyrpolizer on Sun Dec 28, 2008 5:54 pm; edited 4 times in total
Back to top
View user's profile Send private message
Cristian Streng
Founder


Joined: 28 Oct 2005
Posts: 4585

Phone Type: (many)

PostPosted: Tue Dec 02, 2008 10:06 pm    Post subject: Reply with quote

Thanks, I have added a link in http://forum.mgmaps.com/viewtopic.php?t=725
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: Mon Dec 15, 2008 10:30 pm    Post subject: Reply with quote

Ok here's the update. Also notice that file "pack.bat" now runs directly from button 2.


Convert tiles to MTPF Updated.zip
 Description:

Download
 Filename:  Convert tiles to MTPF Updated.zip
 Filesize:  455.64 KB
 Downloaded:  5315 Time(s)

Back to top
View user's profile Send private message
JoeNuvo
Newbie


Joined: 25 Dec 2008
Posts: 2

Phone Type: Unknown

PostPosted: Thu Dec 25, 2008 7:16 am    Post subject: Reply with quote

Since your program did not support XX_YY name format.
Can you tell me where can I find information to convert XX_YY format to be QRST format ?

Thank you very much.
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: Fri Dec 26, 2008 6:00 pm    Post subject: Reply with quote

Seasons Greetings to all.

Sorry I don’t know of any program or readily available code that can do what you are asking.
It is a complicated procedure, it involves lots of repeatitive calculations and "if statements" and can only be done by computers-unless of course you want to spend one hour of your free time and 2 aspirins for the headache, to just rename one tile manually.
So if you can write the program, please send me a PM and I will explain the procedure.NOTE:To be precise the naming is YY_XX (Column_ROW) type, I have written it the opposite way in my instructions..sorry about that.

I could have used some of my spare time to write the complete code myself if there was enough interest from people in here, but as you can see…

Btw for all those using the code: I suggest having converted your tiles to *.jpg format with "IrfanView" before converting to MTPF. File sizes get reduced to 1/10th this way
Back to top
View user's profile Send private message
ambra
Power User


Joined: 03 Feb 2008
Posts: 92

Phone Type: SE K810i

PostPosted: Sun Dec 28, 2008 1:44 am    Post subject: Another tool to convert MapCruncher tiles to MGMaps format Reply with quote

Finally, I managed to find some time to write Java program for converting MapCruncher tiles to MGMaps format. Actually, that included learning Java, so this is my "Hello World!" application.

Use it like this:
java -jar MapAlive.jar

FEATURES:
- Reads Microsoft MapCruncher tiles
- Reads tiles from MGMaps cache folder (any hash_size)
- Reads tiles from other sources using "t[qrst]+" tile naming
- Saves tiles to MGMaps cache folder
- Saves tiles as Google Earth KMZ file
- CLI (Command Line Interface) added (java -jar MapAlive.jar help to see usage).

More to come.

Please, test MapAlive and give suggestions.

NOTE: MapAlive works only with single map type. If you have many map types in same MGMapsCache folder, you need to separate map types into different folders. Afterwards, you can join resulting maps.



preview.png
 Description:
 Filesize:  18.5 KB
 Viewed:  74537 Time(s)

preview.png



MapAlive_src.zip
 Description:
MapAlive - source code

Download
 Filename:  MapAlive_src.zip
 Filesize:  24.83 KB
 Downloaded:  3434 Time(s)


MapAlive.zip
 Description:
MapAlive - tool for converting tiles between different formats

Download
 Filename:  MapAlive.zip
 Filesize:  21.69 KB
 Downloaded:  5973 Time(s)



Last edited by ambra on Mon Mar 21, 2011 3:29 pm; edited 26 times 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: Sun Dec 28, 2008 1:46 pm    Post subject: Reply with quote

...

Last edited by Pyrpolizer on Mon Dec 29, 2008 7:27 pm; edited 2 times in total
Back to top
View user's profile Send private message
ambra
Power User


Joined: 03 Feb 2008
Posts: 92

Phone Type: SE K810i

PostPosted: Sun Dec 28, 2008 1:57 pm    Post subject: Reply with quote

The last error is result of not finding "common.jar" in "lib" folder, so you should have kept it there.

The first output looks like everything went well.
What version of JRE are you using? The program relies on "New I/O" introduced in Java 1.4.
I'll switch to Windows to see if it works.

UPDATE: I've just run it on Windows XP SP2 with Sun's JRE 1.6 and it works fine.
I'll add some debugging information. so that you can trace the problem.
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: Sun Dec 28, 2008 2:38 pm    Post subject: Reply with quote

It seems I have the latest version
(Version 6 Update 11).

Anyway I will wait and see what other users say.


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


Joined: 03 Feb 2008
Posts: 92

Phone Type: SE K810i

PostPosted: Sun Dec 28, 2008 2:50 pm    Post subject: Reply with quote

I only guess that program couldn't find any files that it expects, so it doesn't create any subfolders and files, but finishes as expected, by creating cache.conf.

Anyway, I've uploaded new version. Get back to my post, and test it.

Run it with third argument "debug", and it will output a lot of text. You should probably redirect the output to a file:
java -jar MapAlive.jar <folder> <n> debug > output.txt
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: Sun Dec 28, 2008 3:59 pm    Post subject: Reply with quote

ambra wrote:
I only guess that program couldn't find any files that it expects, so it doesn't create any subfolders and files, but finishes as expected, by creating cache.conf.


Yeap, that's it!
It expects to find files with 0123 naming type.
So i think you should add support for the QRST naming type, obviously that will be necessary if you will add the topo map overlays you mentioned in the other topic.That should be very easy to do anyway...
May I also sugest you add support for the YY_XX naming type too? I know this is more complicated, but better be done right from the start of writting the code, otherwise it needs complete re-writting, new calculations etc.
Back to top
View user's profile Send private message
ambra
Power User


Joined: 03 Feb 2008
Posts: 92

Phone Type: SE K810i

PostPosted: Sun Dec 28, 2008 4:06 pm    Post subject: Reply with quote

Pyrpolizer wrote:
ambra wrote:
I only guess that program couldn't find any files that it expects, so it doesn't create any subfolders and files, but finishes as expected, by creating cache.conf.


Yeap, that's it!
It expects to find files with 0123 naming type.
So i think you should add support for the QRST naming type, obviously that will be necessary if you will add the topo map overlays you mentioned in the other topic.That should be very easy to do anyway...
May I also sugest you add support for the YY_XX naming type too? I know this is more complicated, but better be done right from the start of writting the code, otherwise it needs complete re-writting, new calculations etc.


Sure, it's not problem. I thought that MapCruncher makes only "0123..." tiles. Where did you get "qrts..." tiles?
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: Sun Dec 28, 2008 4:42 pm    Post subject: Reply with quote

MapCruncher produces 0123 naming files of course. But these are not the only tiles people would like to convert to MTPFs.

To give you an example I personlly had thousands of GoogleSat tiles. It took me more than a month to collect them from Goggle after been banned almost a hundred times. Would you imagine me having to wait for another month to re-download them in MTPF format? Wink

I strongly beleive it is better to download single tiles, than download them directly as MTPFs. 3 reasons for that a)Having single tiles you can make anything you want even Ozi Maps b)Nobody knows what effect a 16/32/64/128/264 TPF will have on its mobile.So s/he may want to switch from one TPF to another. S/he cannot do that unless he has single tiles saved or else s/he has to re-download everything.(Think of Google nightmare again) And c)Even the strongest mobile gets unstable as soon as we reach a few thousand files in a folder. I did the mistake of starting with 32 TPF, now I have so many MTPFs at zoom 18 that I need to switch to 64 or 128 TPF, as my cell already started showing signs of "discomfort".
Back to top
View user's profile Send private message
ambra
Power User


Joined: 03 Feb 2008
Posts: 92

Phone Type: SE K810i

PostPosted: Sun Dec 28, 2008 4:55 pm    Post subject: Reply with quote

OK, I understand. I'll add support for "qrts" and "X_Y" files. Maybe even option to extract tiles from MTPF files.
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: Sun Dec 28, 2008 5:24 pm    Post subject: Reply with quote

ambra wrote:
OK, I understand. I'll add support for "qrts" and "X_Y" files. Maybe even option to extract tiles from MTPF files.


Wow-wow! Are we two in some telepathy mode? Laughing

I just logged in to propose you that, as I was thinking about doing it myself. That will be VERY USEFUL i think, as many people got stuck at MTPFs they have already downloaded and they may want to switch the TPF at another number.

Please drop a message as soon as you have the QRST support ready so that we put it on full test will you?
I think you should also set a limit of tiles per folder -Windows does not accept more than 21,500 something. I set it at 16,000 and even on that Windows bends on its knees. Rolling Eyes
Back to top
View user's profile Send private message
ambra
Power User


Joined: 03 Feb 2008
Posts: 92

Phone Type: SE K810i

PostPosted: Sun Dec 28, 2008 7:34 pm    Post subject: Reply with quote

I've added support for QRST naming convention. Please test it.

I supposed that Q=0, R=1, S=2, T=3.
Is this correct?
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: Sun Dec 28, 2008 8:01 pm    Post subject: Reply with quote

No, the correct one is:
Q=0
R=1
T=2
S=3
Back to top
View user's profile Send private message
ambra
Power User


Joined: 03 Feb 2008
Posts: 92

Phone Type: SE K810i

PostPosted: Sun Dec 28, 2008 8:04 pm    Post subject: Reply with quote

Pyrpolizer wrote:
I am afraid no.
Q=0
R=1
T=2
S=3


Fixed.
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: Sun Dec 28, 2008 9:54 pm    Post subject: Reply with quote

It works fine. No problem at all. Congrats!
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 29, 2008 9:57 am    Post subject: Reply with quote

Nice tool! I have linked it from http://forum.mgmaps.com/viewtopic.php?t=725
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MGMaps Forum Index -> Stored Maps All times are GMT
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Page 1 of 9

 
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