Bílý vrch
icon TrekBuddy
www.trekbuddy.net
Outdoor companion.
  • internal / bluetooth / simulator GPS
  • offline raster maps
  • smart GPX / raw NMEA logs
  • waypoints and simple navigation
  • custom views
  • MIDP and Symbian phones
  • Blackberry
  • Android
Visit wiki to see all features, guides and howtos. Project tracker.

Partners:    (Polish/Polski)(Polski) Compass mapy      (Polish/Polski)(Polski) Galileos mapy      (Polish/Polski)(Polski) CartoMedia      (Czech/Èesky)(Èesky) Eaglesoft trasy      (Polish/Polski)(Polski) ExpressMap     

 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
HOWTO Maps and Atlases
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
 
Post new topic   Reply to topic    TrekBuddy Forum Index -> English
View previous topic :: View next topic  
Author Message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5665

PostPosted: Mon Jan 08, 2007 11:20 pm    Post subject: Reply with quote

.set file is ignored in tar-ed map/atlas
Back to top
View user's profile Send private message
Lakva



Joined: 09 Jan 2007
Posts: 212
Location: N 50,2380 E 12,8760

PostPosted: Tue Jan 16, 2007 8:40 am    Post subject: Re: HOWTO Maps and Atlases Reply with quote

A single... not an error, it's more likely a feature. But if somebody encounter the same trouble...
I tried to add a new layer into the existing atlas and because the new maps are from net, they dont have originally numbered sheet cut. So I decided to give them the same names, as maps in older layer have already.
But it did not work in the phone - each time just one of those layers worked - the one, which is fisrt opened. The other map displays, but it's badly calibrated - it uses the .map file of the first loaded map!

So I think, that the .map files must have unique names, even if they are in other folder and other atlas layer.

I hope, that I use a right terminology... I am not so strong in english...

_________________
The best thing a man can do for themselves is to help to the others.
-I know it sounds strange... but you may try it Smile
Back to top
View user's profile Send private message Visit poster's website
s_bostjan



Joined: 09 Jan 2007
Posts: 12

PostPosted: Thu Jan 25, 2007 12:51 pm    Post subject: Limitation in number of maps inside atlas layer? Reply with quote

I have prepared an atlas for TB where there are 2 layers. In one there is a single map, in the other i have 8 maps. TB is opening the Atlas and everything is working. When i add another map inside the second layer (where there will be now 9 maps) i get an IOException when starting:

Map loading failed.
java.io.IOException: Too many FileConnection.list enums

In every layer i have a .map and .set file and *_*_*.png files in set directory (1 png file in first layer and 16 png files / map in second layer)


Is this a bug or a limitation on my phone? (i have a Nokia 6151)
Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5665

PostPosted: Thu Jan 25, 2007 12:54 pm    Post subject: Reply with quote

It may be a bug - I'll check atlas loading process for left connections...
Back to top
View user's profile Send private message
Ranger



Joined: 12 Dec 2006
Posts: 6030

PostPosted: Thu Jan 25, 2007 1:01 pm    Post subject: Reply with quote

I didn't observe such behaviour in k750i having more than 20 maps in one layer.
Back to top
View user's profile Send private message
guest



Joined: 08 Oct 2006
Posts: 5013

PostPosted: Tue Apr 03, 2007 6:03 pm    Post subject: Re: HOWTO Maps and Atlases Reply with quote

kruch wrote:
Howto create a map

1. Get a calibrated map, or scan it and calibrate yourself, using a program like OziExplorer or MapCalibrator. 4 calibration points near the map corners are good enough. Be sure to select proper map datum and projection. I recommend OziExplorer if you are serious about maps. Wink

WARNING! MapCalibrator seems to move calibration points sometimes, check their positions when you think you are done, and correct if necessary (right-click, Calibration->Fine Calibration->Drag It!).

You may also find some handy map tools in Tools forum.

Now you need to cut the map to slices, with top-left corner pixel coordinates encoded in the filename, like my_map_240_960.png (note the undercores before x-y coordinates). I use slices of 300x400 and 256x256 pixels; you may use smaller or bigger, however smaller may be less comfortable due to more frequent slice loading, larger may cause OutOfMemoryErrors depending on how much memory your device has for MIDlets; feel free to experiment... and share your findigs with others Smile

If you have your favourite application for such task, skip to step 2d.


2. Create map tiles and their listing. If you are on Windows, I recommend using Duffa's excellent TB Cutter application and then skip to 3. If you are on Linux, or a masochist, go through 2a-d.

a) Install GIMP2

b) Download skript for GIMP by Petr Krejčí for map cutting and copy it to GIMP share\gimp\2.0\scripts directory. NEW! Optimized version available in Tools forum

c) Start GIMP and open the map. In the main window in Scripts-Fu menu you should have OT2gps item. Click on it, set 240x320 or 300x400 slice dimension, 256 colors and run it. The script will create map slices named xxx_240_960.png int the same directory where the original map is. It may take a few minutes...

d) Prepare map directory. In the same place you have the calibration file (the one with .map or .gmi extension), create set directory and copy all map slices to it.
The map directory then looks like this:

18_Prague_north.map
set/
set/18_0_0.png
set/18_240_0.png
set/18_480_0.png
set/...


* Directory listing may be very slow on real devices. You may get significant speedup for map loading if you create a listing of map slices in advance. The listing file must have the same name as calibration file, with extension .set and be in the same directory.
So for the example above, you can easily create the listing this way:

Code:
dir /b set > 18_Prague_north.set (on Linux: ls set > 18_Prague_north.set)


The listing file content is simple:

18_0_0.png
18_0_1280.png
18_0_1600.png
...


So the complete example directory looks like:

18_Prague_north.map
18_Prague_north.set
set/
set/18_0_0.png
set/18_240_0.png
set/18_480_0.png
set/...


3. Copy the map (output) directory to the memory card.

So much for a single map.

Howto create an atlas

Atlas is 2 dimensional maps collection. Maps of the same scale, usually covering a continuous area (this is not a condition, but makes sense, right Smile ), are grouped in something I call a layer. And there may be more layers in an atlas.

Atlas directory structure sample:

atlas-cr/
atlas-cr/cr.tba
atlas-cr/roadmap/
atlas-cr/roadmap/24/
atlas-cr/roadmap/24/P24_ozf.map
atlas-cr/roadmap/24/P24_ozf.set
atlas-cr/roadmap/24/set/
atlas-cr/roadmap/24/set/24_0_0.png
atlas-cr/roadmap/24/set/24_0_320.png
atlas-cr/roadmap/24/set/...
atlas-cr/roadmap/25/
atlas-cr/roadmap/25/P25_ozf.map
atlas-cr/roadmap/25/P25_ozf.set
atlas-cr/roadmap/25/set/
atlas-cr/roadmap/25/set/25_0_0.png
atlas-cr/roadmap/25/set/25_0_320.png
atlas-cr/roadmap/25/set/...
atlas-cr/hikingmap/
atlas-cr/hikingmap/18_Prague_north/
atlas-cr/hikingmap/18_Prague_north/18_Prague_north.map
atlas-cr/hikingmap/18_Prague_north/18_Prague_north.set
atlas-cr/hikingmap/18_Prague_north/set/
atlas-cr/hikingmap/18_Prague_north/set/18_0_0.png
atlas-cr/hikingmap/18_Prague_north/set/...
atlas-cr/hikingmap/19_Prague_south/
atlas-cr/hikingmap/19_Prague_south/19_Prague_south.map
atlas-cr/hikingmap/19_Prague_south/19_Prague_south.set
atlas-cr/hikingmap/19_Prague_south/set/
atlas-cr/hikingmap/19_Prague_south/set/19_0_0.png
atlas-cr/hikingmap/19_Prague_south/set/...


You can see that 24, 25, 18_Prague_north and 19_Prague_south are normal maps as described in previous chapter, groupped in 2 layers - one is a collection of hiking maps hikingmap (1:50000), another is roadmap (1:200000).
File cr.tba is a text file with single line:

Code:
Atlas 1.0


Now all you have to do is copy this directory tree to the phone, select Load Atlas in the Options menu, and in file browser select this cr.tba file. You can switch layers with 7, maps with 9 key.

So long,
k.

Atlas example (11 MB(!) each) - unpack it and copy to the phone's memory card.


-------------------------------------------------------------------------------------------
--------------------OBSOLETE since 0.9.5rc3--------------------
-------------------------------------------------------------------------------------------


Tar-ed map
For phones that require confirmation for every file access for unsigned MIDlets (such as N6230i), it is better to pack the calibration file and map slices to a tar archive, eg.:

Code:
tar -cf 18_Prague_north.tar 18_Prague_north.map set


Then copy the archive to your phone's memory card.

Example tar-ed map example 990kB (page 47 from Czech Republic road map). For phones that support file access confirmation per session, you may just unpack it. You may expect a position shift due to used datum (S-42 CZ)..

Similarly to simple maps, for phones that require confirmation for every file access, it is better to simplify the atlas structure...

Tar-ed atlas

1. Create "index" file of the whole atlas, using tar (let's assume you are in the main atlas-cr atlas directory from the previous example):
Code:
tar -cf cr.tar --exclude=*.png cr.tba hikingmap roadmap

The result of this is cr.tar file, which contains (verify with tar -tf cr.tar):

cr.tba
roadmap/
roadmap/24/
roadmap/24/P24_ozf.map
roadmap/24/set/
roadmap/25/
roadmap/25/P25_ozf.map
roadmap/25/set/
hikingmap/
hikingmap/18_Prague_north/
hikingmap/18_Prague_north/18_Prague_north.map
hikingmap/18_Prague_north/set/
hikingmap/19_Prague_south/
hikingmap/19_Prague_south/19_Prague_south.map
hikingmap/19_Prague_south/set/


You can see here that the "index" file contains all calibration files from the whole atlas, with preserved directory structure, and the .tba file too.

2. Now, pack each map in all layers the same way as a single map described above. So assuming you are in atlas-cr/hikingmap/18_Prague_north directory, run

Code:
tar -cf 18_Prague_north.tar 18_Prague_north.map set


Before 0.8.6, the tar-ed map replaced map's directory, now the directory structure is preserved.

Then you may delete (or backup somewhere else) maps slices and calibration files.
The atlas directory structure then looks like:

atlas-cr/
atlas-cr/cr.tar
atlas-cr/roadmap/
atlas-cr/roadmap/24/24.tar
atlas-cr/roadmap/25/25.tar
atlas-cr/hikingmap/
atlas-cr/hikingmap/18_Prague_north/18_Prague_north.tar
atlas-cr/hikingmap/19_Prague_south/19_Prague_south.tar


The name of the map pack (eg. 18_Prague_north.tar) must be the same as the name of the map directory (ie. 18_Prague_north)!

Now all you have to do is copy this directory tree to the phone, select Load Atlas in the Options menu, and in file browser select this cr.tar file.

Tar-ed atlas example, "normal" atlas example (11 MB(!) each) - unpack it and copy to the phone's memory card.



First I want to congratulate for a GREAT program.

I have been using Oziexp. with Ozie CE on my PDA, now I can use the maps on my SE K800i ( I hope).

I have a lot of allready calibrated N50 maps of Norway, that I have been converting to TB using the prosedure described above.
My problem is that when I use Duffa`s "cutter" the calibration file made by the program is diferent from the original one. Resulting in an map offset of prox. 500m to the S/W on all the maps.
Checking the new ".map" file in Ozie is conferming this error on the files tiled pictures in the "set" directory.

Been scratching my head, and trying to solve this for several days now, but without any luck.
Can someone PLEASE help me??

Morten
Back to top
View user's profile Send private message Visit poster's website
Ranger



Joined: 12 Dec 2006
Posts: 6030

PostPosted: Sat Apr 07, 2007 9:16 am    Post subject: Reply with quote

Hi Morten,
No way to help without both calibration files.
Could you post them ?
Back to top
View user's profile Send private message
guest



Joined: 08 Oct 2006
Posts: 5013

PostPosted: Tue Apr 10, 2007 5:42 pm    Post subject: Reply with quote

Ranger wrote:
Hi Morten,
No way to help without both calibration files.
Could you post them ?


Hi Ranger,

I finally found out the problem. My ready calibratet maps have calibration points in the corners not counting clockwise ( button left corner is 1, then, then top left corner 3, top right corner 2, and button right corner 4).
I guess the cutter dont look at the numbers on the calibration points, and only count them going clockwise.
When I changed the original calibration points to count clockwise, the problem was solved. (changed 2 and 3)

Hope this might have helped others wondering why they are about 500m offset, knowing thet the original .map file is correct.

Morten
Back to top
View user's profile Send private message Visit poster's website
guest



Joined: 08 Oct 2006
Posts: 5013

PostPosted: Wed Apr 11, 2007 6:15 pm    Post subject: Reply with quote

guest wrote:
Ranger wrote:
Hi Morten,
No way to help without both calibration files.
Could you post them ?


Hi Ranger,

I finally found out the problem. My ready calibratet maps have calibration points in the corners not counting clockwise ( button left corner is 1, then,
Morten


Hi Ranger,
The problem remains actually. Using the GoogleMV2, which is a perfect program for me, I have the same problem as above.
When I use the "cutter", it changes the position in the .map file.
Checking with Ozie, the original .map file has 9 calibration points, ( not only the corners). and they are not counting clockwise.

I can offcourse change all of them, but then I feel the "cutter" program is not working the way it shuld.

I`m posting the 2 .map files, so you can compare.

My biggest wish is for this to work. Getting really in to this TB now.

Morten


Last edited by guest on Wed Apr 11, 2007 7:10 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Ranger



Joined: 12 Dec 2006
Posts: 6030

PostPosted: Wed Apr 11, 2007 7:10 pm    Post subject: Reply with quote

guest wrote:
I`m posting the 2 .map files, so you can compare.


Morten, where you posted these files ?
Back to top
View user's profile Send private message
guest



Joined: 08 Oct 2006
Posts: 5013

PostPosted: Wed Apr 11, 2007 7:13 pm    Post subject: Reply with quote

Ranger wrote:
guest wrote:
I`m posting the 2 .map files, so you can compare.


Morten, where you posted these files ?


Did go the first time, but there they are.

The top one is the "cutter" .map.
Back to top
View user's profile Send private message Visit poster's website
Ranger



Joined: 12 Dec 2006
Posts: 6030

PostPosted: Wed Apr 11, 2007 7:54 pm    Post subject: Reply with quote

Morten,

I don't see a difference between this two files in part used by TB:

Code:

Molde-test TB cutter
........
MMPNUM,4
MMPXY,1,0,0
MMPXY,2,3379,0
MMPXY,3,3379,2279
MMPXY,4,0,2279
MMPLL,1, 7.120342, 62.754726
MMPLL,2, 7.192826, 62.754726
MMPLL,3, 7.192826, 62.732340
MMPLL,4, 7.120342, 62.732340
MOP,Map Open Position,0,0
IWH,Map Image Width/Height,3379,2279

Molde-test
............
MMPNUM,4
MMPXY,1,0,0
MMPXY,2,3379,0
MMPXY,3,3379,2279
MMPXY,4,0,2279
MMPLL,1, 7.120342, 62.754726
MMPLL,2, 7.192826, 62.754726
MMPLL,3, 7.192826, 62.732340
MMPLL,4, 7.120342, 62.732340
MOP,Map Open Position,0,0
IWH,Map Image Width/Height,3379,2279


and 4 points are clockwise.
Could you open your map in OziE, simply save map again and compare these values ?

Be careful with satelite images from GM. If you try hybrid mode, you can see for largest zoom difference between roads on maps and on satelites images up to 100 meters. TB Cutter can't repare it.
Back to top
View user's profile Send private message
guest



Joined: 08 Oct 2006
Posts: 5013

PostPosted: Wed Apr 11, 2007 8:50 pm    Post subject: Reply with quote

[quote="Ranger"]Morten,

I don't see a difference between this two files in part used by TB:

Code:

Molde-test TB cutter
........
MMPNUM,4
MMPXY,1,0,0
MMPXY,2,3379,0
MMPXY,3,3379,2279
MMPXY,4,0,2279
MMPLL,1, 7.120342, 62.754726
MMPLL,2, 7.192826, 62.754726
MMPLL,3, 7.192826, 62.732340
MMPLL,4, 7.120342, 62.732340
MOP,Map Open Position,0,0
IWH,Map Image Width/Height,3379,2279

Molde-test
............
MMPNUM,4
MMPXY,1,0,0
MMPXY,2,3379,0
MMPXY,3,3379,2279
MMPXY,4,0,2279
MMPLL,1, 7.120342, 62.754726
MMPLL,2, 7.192826, 62.754726
MMPLL,3, 7.192826, 62.732340
MMPLL,4, 7.120342, 62.732340
MOP,Map Open Position,0,0
IWH,Map Image Width/Height,3379,2279


I can see what you mean, but the maps are offset by prox. 1km!??

I`l post the "set" dir and then you can see. Strange?
The original image file before "cutting" is too big to poste, but if you check the cordinates of the "cutter" map, you will see what I meen.

Strange if I am the only one with this problem.

it really bugs mee, since I after soo short use of TB, and "cutter" realy fell in love with its simplisity.

If you can help me here Ranger, it would make me getting some sleep at night. (mostly spendt by pasting, and cutting maps).
Back to top
View user's profile Send private message Visit poster's website
Ranger



Joined: 12 Dec 2006
Posts: 6030

PostPosted: Wed Apr 11, 2007 10:38 pm    Post subject: Reply with quote

OK. I just checked coords for left_up corner and a small movement is visible; coords values should be:
Code:

MMPLL,1,
Longitude: 7.120342254638672
Latitude:  62.75473575056499   


but it doesn't mean 1km shift !

You use it as single map or one from atlas ?
Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5665

PostPosted: Wed Apr 11, 2007 11:48 pm    Post subject: Reply with quote

Ranger wrote:
Morten,

I don't see a difference between this two files in part used by TB:


The two files are identical. And I think TBCutter does not modify calibration files at all...

I must be missing something - I get no shift... ?



molde-ge.jpg
 Description:
 Filesize:  19.5 KB
 Viewed:  23121 Time(s)

molde-ge.jpg



molde-tb.jpg
 Description:
 Filesize:  15.87 KB
 Viewed:  23121 Time(s)

molde-tb.jpg


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    TrekBuddy Forum Index -> English All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Page 3 of 8

 
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 cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group