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 

MapCruncher maps in MGMaps
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic   printer-friendly view    MGMaps Forum Index -> Stored Maps
View previous topic :: View next topic  
Author Message
lofarkas
Power User


Joined: 02 Jun 2007
Posts: 92

Phone Type: HTC Desire

PostPosted: Mon Dec 17, 2007 10:24 am    Post subject: Reply with quote

Hey, I just did some quick testing... downloaded irfanview for batch png -> jpg conversion and did a small map for testing.
Irfanview can't fool around with the extensions so before looking for a rename tool I went back to total commander... and it didn't disappoint. You just select your files, right click, choose rename and set it to *.png.

Wooo! Map size shrinks to a tenth in minutes!

I tested it and it works fine, I can zoom in all the way w/o problems. Very warmly recommended to everyone.

As a result, you don't need to change the program... I guess most people have total cmd and those who don't can dl some rename tool.


Of course it wd be even nicer to be able to run some version of the tile downloader perl on image files and get all the tile/file options and instant compatibility and all that, but I'm not complaining, that's for sure.

Or rather, I am complaining about my original dl-ed maps not working. Can you troubleshoot that for me pls?

(Quoting myself: Also, now mgmaps doesn't even display my good old cached maps. I think that's because of a map format change...
Mine look like: MGMapsCache/GoogleMap_14/[0]/7895_5461.mgm
Is that not supported anymore? If so, can I convert the map cache?)
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 17, 2007 11:11 am    Post subject: Reply with quote

lofarkas wrote:
As a result, you don't need to change the program... I guess most people have total cmd and those who don't can dl some rename tool.

I'm pretty sure most people don't have totalcmd or other batch renaming tools... So I _should_ change the program and the instructions to recommend jpg over png.

lofarkas wrote:
Of course it wd be even nicer to be able to run some version of the tile downloader perl on image files and get all the tile/file options and instant compatibility and all that, but I'm not complaining, that's for sure.

Hmm.... that would be more or less like rewriting mapcruncher Smile

lofarkas wrote:
Or rather, I am complaining about my original dl-ed maps not working. Can you troubleshoot that for me pls?

I'll try, but it can still be a memory problem. With the cache size set to (say) 2000kB it should fit well the tiles, but it's possible that the phone doesn't have that much spare memory (if the mgmaps cache size is too small it can not fit all map tiles, if it's too big it may fill all the available memory).

lofarkas wrote:
(Quoting myself: Also, now mgmaps doesn't even display my good old cached maps. I think that's because of a map format change...
Mine look like: MGMapsCache/GoogleMap_14/[0]/7895_5461.mgm
Is that not supported anymore? If so, can I convert the map cache?)

They are still supported. Can you send me your map cache so that I have a look? Not the entire cache, but send a zip with your cache.conf and a few (5-10) tiles.
Back to top
View user's profile Send private message Visit poster's website
lofarkas
Power User


Joined: 02 Jun 2007
Posts: 92

Phone Type: HTC Desire

PostPosted: Mon Dec 17, 2007 11:43 am    Post subject: Reply with quote

Well, total commander is just the normal file manager of windows... I feel acute despair whenever I have to use a PC w/o it.
I'm pretty sure that getting/installing irfanview or similar for the conversion is the bottleneck and not the renaming. I.e. if someone gets irfanview and converts the files they'll find a way to rename them, too.

Good to hear the old cache should still work but no idea why it doesn't. I was using 1.37.03 until now and it worked flawlessly. 1.38.02 can't see the cache, nor can 1.39.02

I may have screwed up somewhere along the line but I'm pretty sure I didn'tSmile

I added a small sample. Cache.conf just says version=2 and I have the oldish folder structure with folders like [6] in there. 1 tile/file named whatever.mgm

Thanks!


Edit: I just checked the memory with another java app (opera mini modded by some hackers) and it says: available 665168b (=649 kB); java heap 1718148b (dynamic) (=1670kB); total: 1048572b.

I'm guessing this is the cache memory, right? So I should set mgmaps to ~600 or so?



MGMapsCache.zip
 Description:

Download
 Filename:  MGMapsCache.zip
 Filesize:  141.3 KB
 Downloaded:  2199 Time(s)

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 17, 2007 7:42 pm    Post subject: Reply with quote

lofarkas wrote:
Well, total commander is just the normal file manager of windows... I feel acute despair whenever I have to use a PC w/o it.
I'm pretty sure that getting/installing irfanview or similar for the conversion is the bottleneck and not the renaming. I.e. if someone gets irfanview and converts the files they'll find a way to rename them, too.

Good to hear the old cache should still work but no idea why it doesn't. I was using 1.37.03 until now and it worked flawlessly. 1.38.02 can't see the cache, nor can 1.39.02

I may have screwed up somewhere along the line but I'm pretty sure I didn'tSmile

I added a small sample. Cache.conf just says version=2 and I have the oldish folder structure with folders like [6] in there. 1 tile/file named whatever.mgm

Thanks!


Edit: I just checked the memory with another java app (opera mini modded by some hackers) and it says: available 665168b (=649 kB); java heap 1718148b (dynamic) (=1670kB); total: 1048572b.

I'm guessing this is the cache memory, right? So I should set mgmaps to ~600 or so?

You're right, it doesn't work, it expects hash size = 1 but it's actually 97. I'll fix it in the next version, until then you can fix it: edit cache.conf and change it to

version=3
hash_size=97

Cristian
Back to top
View user's profile Send private message Visit poster's website
lokura
MGMapper


Joined: 18 Aug 2007
Posts: 22

Phone Type: Unknown

PostPosted: Mon Dec 17, 2007 8:05 pm    Post subject: Reply with quote

fine, it´s working using irfanview and total cmd
finally i got my nautical charts working on the phone tnx
Back to top
View user's profile Send private message
lofarkas
Power User


Joined: 02 Jun 2007
Posts: 92

Phone Type: HTC Desire

PostPosted: Mon Dec 17, 2007 8:22 pm    Post subject: Reply with quote

I changed cache.conf but to no avail. It's just my sad and lonely favourite locations marked over the "please zoom out" pattern:(


Lokura: welcome, I'm glad it works 4 u. BTW your nick sorta means "madness" in spanish.
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 17, 2007 8:33 pm    Post subject: Reply with quote

lofarkas wrote:
I changed cache.conf but to no avail. It's just my sad and lonely favourite locations marked over the "please zoom out" pattern:(

OK, got it wrong. The cache.conf should be:

version=3
hash_size=97
tiles_per_file=1
Back to top
View user's profile Send private message Visit poster's website
lofarkas
Power User


Joined: 02 Jun 2007
Posts: 92

Phone Type: HTC Desire

PostPosted: Mon Dec 17, 2007 9:11 pm    Post subject: Reply with quote

Cristian Streng wrote:
lofarkas wrote:
I changed cache.conf but to no avail. It's just my sad and lonely favourite locations marked over the "please zoom out" pattern:(

OK, got it wrong. The cache.conf should be:

version=3
hash_size=97
tiles_per_file=1


There you go... that works.
Thanks a bunch, as ever. You're the man!
Back to top
View user's profile Send private message
Phil061
Power User


Joined: 20 Aug 2007
Posts: 67

Phone Type: Unknown

PostPosted: Wed Jan 09, 2008 2:04 am    Post subject: Reply with quote

Few help for to use Image Arithmetic 2.5 and create the .lst file

On windows push start/execute/cmd

Write the url of your folder (after each step push return):
In my ex my folder is on H:
H:\Sauv\GPS\Map\SHOM\7200_1\Layer_NewLayer

So write:
H: and push return
Write:
cd H:\Sauv\GPS\Map\SHOM\7200_1\Layer_NewLayer

Now it's write:
H:\Sauv\GPS\Map\SHOM\7200_1\Layer_NewLayer>

Write:

dir /b >file.lst

You must see something like that:

so
Code:
Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Phil>h:

H:\>cd H:\Sauv\GPS\Map\SHOM\7200_1\Layer_NewLayer

H:\Sauv\GPS\Map\SHOM\7200_1\Layer_NewLayer>dir /b >file.lst

H:\Sauv\GPS\Map\SHOM\7200_1\Layer_NewLayer>


Go into the folder and open the file.lst with the notepad (right click and open with, choose notepad) and remove the file which are not .png (so by ex: remove the LayerMetadata.xml of the list)
And save

After that, launch Image processor and push Quantize button select the option Median cut, 64colors and... (i have used the data of the previous link in the previous post) , push load batch and load the .lst file


I hope it helps you for make and use the .lst file

Best Regards
Back to top
View user's profile Send private message
iliyant
Newbie


Joined: 18 Dec 2007
Posts: 2

Phone Type: Nokia 6300

PostPosted: Wed Jan 09, 2008 7:57 pm    Post subject: Reply with quote

Sooo... there is another way to do this, and it works. here is what i've done:
First, after crunching the maps i've converted them to .jpg's.
I've written small very very stupid program to convert file names from Microsoft's format to MGMapCache format.
i've created custom map in mgmaps (MyMap for example), and folders, created from mapcruncher's files look like this:
\MyMap_1\0\#_#.mgm
\MyMap_1\1\#_#.mgm
..
\MyMap_2\0\#_#.mgm
\MyMap_2\1\#_#.mgm

and so on..
sadly, i can't post the tool yet, needs a little more work. i hope to have the time to finish and post it soon.
limitations, so far are:
windows only, one tile per file.
probably MapTileCacher.perl can be modified to do the same, it contains the subroutines for converting file names from Microsoft's format to mgmapcache, including more than one tile per file.

Great tool, that MGMap, ave Cristian Smile
Back to top
View user's profile Send private message
roger
MGMapper


Joined: 10 Jan 2008
Posts: 22

Phone Type: SE W800i

PostPosted: Thu Jan 10, 2008 8:11 pm    Post subject: Confirmation of settings and some quest Reply with quote

I also have generated a map by MapCruncher to display on MobileGMaps 1.39.03 on a SE W800i.
I have tried to follow your instructions in this thread by copying the cache.conf file to tile folder (e:/MGMapsCache).
This folder just consists of 20 .png files with sizes varying from 2k to 100k. The original .BMP map file was just on 54kB for testing.
Regarding the content of the cache.conf I have tried using both :
version=3
format=mapcruncher
center=0.0,0.0,1,MicrosoftMap

and

version=3
hash_size=97
tiles_per_file=1
format=mapcruncher
center=0.0,0.0,1,MicrosoftMap

which shall I use... does it matter ...?

Is it important to use the name "MicrosoftMap" in cache.conf ?
To finally succeed in displaying the map I have to select "Live Maps" by pressing "0" in map mode and mark "OfflineMode" and "Stored Maps". Though in "Map Types" page I have added the type MicrosoftMap.
Is this correct or not ...?

I have also set Storage Path to e:/MGMapsCache and Memory cache to 1000

God work ...

/Roger
Back to top
View user's profile Send private message
ambra
Power User


Joined: 03 Feb 2008
Posts: 92

Phone Type: SE K810i

PostPosted: Wed Feb 20, 2008 6:23 pm    Post subject: Reply with quote

lofarkas wrote:
Of course it wd be even nicer to be able to run some version of the tile downloader perl on image files and get all the tile/file options and instant compatibility and all that, but I'm not complaining, that's for sure.


You can get MapCruncher tiles compatibile with other tiles, by setting local Web server and putting MapCruncher tiles on it. Then modify MapTileCacher.perl script to download tiles from local Web server. The script will automatically collect MapCruncher tiles and make .mgm files with multiple tiles per file. Also, you can gain more space by converting PNG to JPEG.

Now, you can use MapCruncher tiles just as another MGMaps map (some map that you don't use) and switch them by pressing "0".
Back to top
View user's profile Send private message
Cristian Streng
Founder


Joined: 28 Oct 2005
Posts: 4585

Phone Type: (many)

PostPosted: Thu Feb 21, 2008 1:19 pm    Post subject: Reply with quote

ambra wrote:
lofarkas wrote:
Of course it wd be even nicer to be able to run some version of the tile downloader perl on image files and get all the tile/file options and instant compatibility and all that, but I'm not complaining, that's for sure.


You can get MapCruncher tiles compatibile with other tiles, by setting local Web server and putting MapCruncher tiles on it. Then modify MapTileCacher.perl script to download tiles from local Web server. The script will automatically collect MapCruncher tiles and make .mgm files with multiple tiles per file. Also, you can gain more space by converting PNG to JPEG.

Now, you can use MapCruncher tiles just as another MGMaps map (some map that you don't use) and switch them by pressing "0".

You're right, you can even put mapcruncher maps on a server and view them online in mgmaps as a custom map type. For that I have created a short php script to accept x/y/z coords and give back the corresponding map tile (it's attached). It expects to have the generated maps in a subfolder msr/LayerName/ (use whatever layer name you wish), then define a custom map in mgmaps with:

Custom map name: LayerName
Custom map url: http://your.server.com/msr.php?mt=LayerName

Cristian



msr.php.zip
 Description:

Download
 Filename:  msr.php.zip
 Filesize:  702 Bytes
 Downloaded:  1480 Time(s)

Back to top
View user's profile Send private message Visit poster's website
MikeK
Newbie


Joined: 29 Jun 2008
Posts: 1

Phone Type: Unknown

PostPosted: Sun Jun 29, 2008 8:52 pm    Post subject: Reply with quote

If I make maps in this way is the map coordinated?

So does the GPS work in maps made with MapCruncher?

I'm currently using TrekBuddy with my own custom map, but there are no zoom function... GPS works with TB, so I need to know does it work here?
Back to top
View user's profile Send private message
MaximS
Newbie


Joined: 20 Jul 2008
Posts: 2

Phone Type: Nokia 6500s

PostPosted: Sun Jul 20, 2008 7:20 pm    Post subject: Reply with quote

MikeK
It works perfectly. You can use your maps and GPS.

Cristian Streng
How create map with multiple tiles per file from MapCruncher's map?
Thank you
Back to top
View user's profile Send private message
Cristian Streng
Founder


Joined: 28 Oct 2005
Posts: 4585

Phone Type: (many)

PostPosted: Mon Jul 21, 2008 6:19 pm    Post subject: Reply with quote

MaximS wrote:
MikeK
It works perfectly. You can use your maps and GPS.

Cristian Streng
How create map with multiple tiles per file from MapCruncher's map?
Thank you

That is not possible at this time, MapCruncher splits the map so that it stores one tile in each file.
Back to top
View user's profile Send private message Visit poster's website
Clemens_1
Junior


Joined: 02 Sep 2008
Posts: 9

Phone Type: Unknown

PostPosted: Sat Sep 06, 2008 7:51 pm    Post subject: Some hints concerning MapCruncher? Reply with quote

OK, it is off topic. But I don't know where to get this information elsewhere.
MapCruncher is great. I have scanned some maps and did referencing / calibrating with MapCruncher. But I have problems to get the transparency right. The scanned maps are in tif now, but even with png and transparency set in Photoshop would not work, because it is too difficult, to hit exactly the right colors to be transparent.

By this problem I can use MapCruncher only for referencing / calibrating my scanned map and have this calibrated map without any satelite or hybrid pictures from Microsoft.

So my question: Is there an easy method, to get the entire scanned map to some transperency, so that the satelite or hybrid map would shine through?
I have tried this by exchanging the scanned map file with one of the same file name and image format but with a pure white content, setting transparency in MapCruncher to this white. MapCruncher did not let go himself tampered and showed the original scanned map (don't know, where it had this from!)

Second question: After MapCruncher has finished rendering, the scanned map tiles have a slightly rounded shape, especially at the left and right sides. How can I fit the tiles without having gaps between adjacent tiles shown on my mobile? - All ma scanned and calibrated Tiles are seperated fro their adjacent neithbor by a relatively large gab. With these gaps the MapCruncher is not praxis ready.
See Fotos of this. Or could this error be introduced to wrong cache.vonfig settings? I have:
version=3
format=mapcruncher
hash_size=97
tiles_per_file=1
center=48.806730,8.964844,10,MicrosoftMap

The original scanned maps for MapCruncher will overlap each other for about 30px til 50px, so that there should not be enough space, when walking from one scanned map zone to the region of the adjacent one.
Or will the MGMap look itself for the fitting and overlapping of adjacent tiles avoiding gaps between?
Hope I could describe it clear in english. Embarassed


And here I have a tip for reducing MapCruncher file size:
Sample:
MapCruncher original png = 202.76 kB
reducing via Photoshop / ImageReady to:
jpg max quality = 112,2 kB
jpg very high q = 61,29 kB
jpg high quality = 36,2 kB (lower is unacceptable)
png 8-bit = 50,7 kB

When reducing to 8 bit png, I have to choose a colcor palette. Do I assume right, that all png-files / tiles in one map folder should be based on the same color palette, in order to avoid strange effects, when navigating from one tile to its adjacent neighbour based on a different color palette?

OK: After crunching the files by MapCruncher, I had to all pass them via Batch-Mode through IrfanViewer. But here I had to click on each single tile, due to transparency question of the program.
I did use IrfanView it is nice but does not run fully automatically, but AFAIK I have to click in every file in a preview window, in order to define the transparency color. And I am not sure, wether the resulting tiles will all use the same color palette.
After having spent hours at the computer, I was eager to see the result of my work. All tiles were there, butt all had big gaps between each other so that I cannot use these files for good and comofortable navigation.

Have a look at my Fotos.

Next proble, was: I had to scan several maps and wanted to have tem together in one folder. So I had manualle ty copy all the files in one extra folder. And on many Kopies, I have been asked, wether I wanted to overwrite an exiting tile with the same naeme. Of course, I should not do this, when the overwriting file is larger than the other one. Thats because of the tiles at the boarder from one sanned map to another. Exacrtly the probelm, I had adsked for yesterday and now it comes as negatively out, as I can imagine.
Wahat should I correct in my workflow? And who knows, how I can automate some steps more?


Kind regards
Clemens



DSC_1451_b.jpg
 Description:
3 tiles adjacent and the second line of tiles has an offset to the first line. The content of the maps is correct and complete til the edge and I do not know, why there is a gap between the tiles.
 Filesize:  109.94 KB
 Viewed:  30036 Time(s)

DSC_1451_b.jpg



DSC_1453_b.jpg
 Description:
4 tiles adjacent. The content of the maps is correct and complete til the edge and I do not know, why there is a gap between the tiles.
 Filesize:  113.85 KB
 Viewed:  30036 Time(s)

DSC_1453_b.jpg


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


Joined: 18 Mar 2009
Posts: 3

Phone Type: Sony Ericsson P1i

PostPosted: Wed Mar 18, 2009 8:15 pm    Post subject: it works! Reply with quote

map cruncher...
it works flawlessly as i expected...
nice...
thank you very much..!! Wink
Back to top
View user's profile Send private message
Scowner
Power User


Joined: 05 Aug 2007
Posts: 32

Phone Type: iPhone 3gs

PostPosted: Tue Oct 06, 2009 8:56 pm    Post subject: mapcruncher to mgmaps Reply with quote

Have been reading all the threads on this where it all started using scripts to convert then on to gui

Can I summarise what I think I need to do to use mapcruncher maps in MGMaps

1. Use mapcruncher to calibrate and render the tiff image to .png files (22,000 files or nearly 2gb in my case)

2. Use some tool to convert from png to jpg
a. what tool? Is there a gui tool or must use scripting ? (irfanview?)
b. assume this will reduce size without loss of quality or zooming ability?

3. Convert to mgm format
a. using mapalive to do this. There is gui version now?
b. convert to multile tiles per file (32 seems to work well on my n95)
c. can convert jpg files above without renaming back to png?

4. load it up as per a normal mgmapscache folder on the phone
a. put in the cache.cnf and adjust setting as per mtpf setting

5. select live or add some custom map type

cheers,
Richard
Back to top
View user's profile Send private message
ambra
Power User


Joined: 03 Feb 2008
Posts: 92

Phone Type: SE K810i

PostPosted: Wed Oct 07, 2009 11:59 am    Post subject: Re: mapcruncher to mgmaps Reply with quote

Scowner wrote:
Have been reading all the threads on this where it all started using scripts to convert then on to gui

Can I summarise what I think I need to do to use mapcruncher maps in MGMaps

1. Use mapcruncher to calibrate and render the tiff image to .png files (22,000 files or nearly 2gb in my case)

correct

Scowner wrote:
2. Use some tool to convert from png to jpg
a. what tool? Is there a gui tool or must use scripting ? (irfanview?)
b. assume this will reduce size without loss of quality or zooming ability?

IrfanView will do the job. Quality loss will be unsignificant, but the size will be reduced a lot.

Scowner wrote:

3. Convert to mgm format
a. using mapalive to do this. There is gui version now?
b. convert to multile tiles per file (32 seems to work well on my n95)
c. can convert jpg files above without renaming back to png?

Yes, there is GUI version.
You don't have to rename JPG to PNG.

Scowner wrote:

4. load it up as per a normal mgmapscache folder on the phone
a. put in the cache.cnf and adjust setting as per mtpf setting

cache.conf will be created by MapAlive, so you should just upload it to phone and point MGMaps to the folder.

Scowner wrote:

5. select live or add some custom map type

MapAlive will ask you for map name. If you name it "MyMap", than add custom map named "MyMap" and empty url.
You can also name it as some other supported map type, and switch to that, supported map type to see your maps. I suggest custom map type.
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
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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