Tools to Convert single tiles to Multiple Tiles per File
Select messages from
# through # FAQ
[/[Print]\]
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9  Next  :| |:
MGMaps -> Stored Maps

#1: Tools to Convert single tiles to Multiple Tiles per File Author: Pyrpolizer PostPosted: Tue Dec 02, 2008 2:52 pm
    —
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

#2:  Author: Cristian Streng PostPosted: Tue Dec 02, 2008 10:06 pm
    —
Thanks, I have added a link in http://forum.mgmaps.com/viewtopic.php?t=725

#3:  Author: Pyrpolizer PostPosted: Mon Dec 15, 2008 10:30 pm
    —
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:  5314 Time(s)


#4:  Author: JoeNuvo PostPosted: Thu Dec 25, 2008 7:16 am
    —
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.

#5:  Author: Pyrpolizer PostPosted: Fri Dec 26, 2008 6:00 pm
    —
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

#6: Another tool to convert MapCruncher tiles to MGMaps format Author: ambra PostPosted: Sun Dec 28, 2008 1:44 am
    —
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.


Last edited by ambra on Mon Mar 21, 2011 3:29 pm; edited 26 times in total


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

preview.png



MapAlive_src.zip
 Description:
MapAlive - source code

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


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

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


#7:  Author: Pyrpolizer PostPosted: Sun Dec 28, 2008 1:46 pm
    —
...

Last edited by Pyrpolizer on Mon Dec 29, 2008 7:27 pm; edited 2 times in total

#8:  Author: ambra PostPosted: Sun Dec 28, 2008 1:57 pm
    —
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.

#9:  Author: Pyrpolizer PostPosted: Sun Dec 28, 2008 2:38 pm
    —
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

#10:  Author: ambra PostPosted: Sun Dec 28, 2008 2:50 pm
    —
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

#11:  Author: Pyrpolizer PostPosted: Sun Dec 28, 2008 3:59 pm
    —
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.

#12:  Author: ambra PostPosted: Sun Dec 28, 2008 4:06 pm
    —
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?

#13:  Author: Pyrpolizer PostPosted: Sun Dec 28, 2008 4:42 pm
    —
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".

#14:  Author: ambra PostPosted: Sun Dec 28, 2008 4:55 pm
    —
OK, I understand. I'll add support for "qrts" and "X_Y" files. Maybe even option to extract tiles from MTPF files.

#15:  Author: Pyrpolizer PostPosted: Sun Dec 28, 2008 5:24 pm
    —
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

#16:  Author: ambra PostPosted: Sun Dec 28, 2008 7:34 pm
    —
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?

#17:  Author: Pyrpolizer PostPosted: Sun Dec 28, 2008 8:01 pm
    —
No, the correct one is:
Q=0
R=1
T=2
S=3

#18:  Author: ambra PostPosted: Sun Dec 28, 2008 8:04 pm
    —
Pyrpolizer wrote:
I am afraid no.
Q=0
R=1
T=2
S=3


Fixed.

#19:  Author: Pyrpolizer PostPosted: Sun Dec 28, 2008 9:54 pm
    —
It works fine. No problem at all. Congrats!

#20:  Author: Cristian Streng PostPosted: Mon Dec 29, 2008 9:57 am
    —
Nice tool! I have linked it from http://forum.mgmaps.com/viewtopic.php?t=725



MGMaps -> Stored Maps


output generated using printer-friendly topic mod. All times are GMT

Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9  Next  :| |:
Page 1 of 9

Powered by phpBB © 2001, 2005 phpBB Group