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 
The make_atlas.bat cannot create some kind of Atlas

 
Post new topic   Reply to topic    TrekBuddy Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
Carinobi



Joined: 07 Apr 2010
Posts: 17

PostPosted: Fri Apr 09, 2010 9:44 pm    Post subject: The make_atlas.bat cannot create some kind of Atlas Reply with quote

SOLVED: see next post.

I have some data like this, downloaded with jSigPac, and it does not create a correct name for the.jar when map folders contain characters after .jpg

Before using make_atlas.bat



It says:

Code:
[6] null: java.IOException:
File file:///E:/Atlas/papoi_125/papoi_mtb_0125.jpg_0-0_/papoi_mtb_0125.jpg_0-0_.tar not found


After using make_atlas.bat



Last edited by Carinobi on Sun Apr 11, 2010 10:57 am; edited 5 times in total
Back to top
View user's profile Send private message
Carinobi



Joined: 07 Apr 2010
Posts: 17

PostPosted: Sat Apr 10, 2010 8:45 am    Post subject: New make_atlas.bat for some kind of filenames Reply with quote

It has been solved with a modified make_atlas.bat

Code:
@ECHO OFF

rem Set Directory name where Atlas is
SET OUT_DIR=TARED

REM
REM This line removes old out folder
REM
IF EXIST "%OUT_DIR%" (
   del /Q %OUT_DIR%
   RD /S /Q %OUT_DIR%
)
REM
REM This loop searches for folders(layers) and subfolders(maps)
REM and compresses content to TAR archive
REM
FOR /D %%L in (*.*) DO (
   IF /I NOT "%%L"=="%OUT_DIR%" (
      Echo Working on Layer %%L
      cd %%L
      FOR /D %%M in (*.*) DO (
         Echo    Compressing map %OUT_DIR%\%%L\%%M
         mkdir "..\%OUT_DIR%\%%L\%%M"         
         ..\tar -v -C "%%M" -cf "..\%OUT_DIR%\%%L\%%M\%%M.tar"  "%%M.map"  "%%M.set"  set
         ..\tar -v -R -tf "..\%OUT_DIR%\%%L\%%M\%%M.tar" > "..\%OUT_DIR%\%%L\%%M\%%M.tmi"
      )
      cd ..
   )
)
REM
REM This loop creates Atlas archive
REM
FOR %%L in (*.tba) DO (
   Echo Creating Atlas %%L
   tar -v -cf "%OUT_DIR%\%%L.tar" "%%L"
   FOR /D %%M in (*.*) DO (
      IF /I NOT %%M==%OUT_DIR% (
      tar -v -rf "%OUT_DIR%\%%L.tar" --exclude=*.png "%%M"
      )
   )
)
pause


It basically consists on replacing %%~nM for %%M and %%~nL for %%L because some maps are differenciated when created with mapping software one from each other in appending characters AFTER the dot in the filename, for example mymap.jpg_0 and mymap.jpg_1, that were created in the old bat as mymap.tar instead of mymap.jpg_0.tar like it should be.


Batch script to automatically convert Trekbuddy maps to tar and tbi format from original map-png/jpg. The bat must be put in the same folder that the .tba and the tar.exe with libiconv-2.dll and libintl-2.dll libraries.

You should use PNG images instead of jpg and create it with TBMapper or Mobile Atlas creator using the tile (resolution) size that best fits your phone, but this is not mandatory

Script download:
http://www.trekbuddy.net/forum/download.php?id=3372
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    TrekBuddy Forum Index -> Bugs 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 cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group