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 
large maps don't work

 
Post new topic   Reply to topic    TrekBuddy Forum Index -> Known Issues
View previous topic :: View next topic  
Author Message
guest



Joined: 08 Oct 2006
Posts: 4855

PostPosted: Tue Apr 03, 2012 9:20 am    Post subject: large maps don't work Reply with quote

A single map 125952 x 75008 pixels split in 246 x 147 tiles is displayed incorrectly in 1.0.23. Map "loads", but only each 4th tile is displayed (seems that only odd rows and columns work).
Back to top
View user's profile Send private message Visit poster's website
guest



Joined: 08 Oct 2006
Posts: 4855

PostPosted: Tue Apr 03, 2012 3:09 pm    Post subject: Reply with quote

Probably found the cause.. TB uses some arcane heuristics to determine the tile size, that fails on sparse maps (maps that leave out some tiles near the borders). In this case, it believes tiles are twice as big, so it loads only every 4th tile.

Why don't you just add an option in .map file instead? Or, document the guessing algorithm, so I can work it around.. Thanks!
Back to top
View user's profile Send private message Visit poster's website
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5660

PostPosted: Tue Apr 03, 2012 6:36 pm    Post subject: Reply with quote

It looks like a bug. I tried (smaller) map with 246x147 tile size and it worked. Could you upload your map somewhere?
Back to top
View user's profile Send private message
guest



Joined: 08 Oct 2006
Posts: 4855

PostPosted: Wed Apr 04, 2012 11:55 am    Post subject: Reply with quote

No, as the map is almost 2GB.. But I've cropped the sides a bit and now it works. There were some 3 rows or columns missing..

I guess you simply check all tile's coordinates (x, y), and pick tile size as MIN(x), MIN(y) for all non-zero values. That would explain this behavior. Something more reliable could be handy.
Back to top
View user's profile Send private message Visit poster's website
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5660

PostPosted: Wed Apr 04, 2012 12:24 pm    Post subject: Reply with quote

Exactly. No idea how come it fails for you map. But I do not need tiles, just calibration (.map) and tiles list (.set or .tmi) would be enough.
Back to top
View user's profile Send private message
guest



Joined: 08 Oct 2006
Posts: 4855

PostPosted: Wed Apr 04, 2012 12:24 pm    Post subject: Reply with quote

Code:

def guess_tile_size(array):
    a = b = sys.maxint
    for i in array:
        if i != a and i < b:
            a, b = sorted((a, i))
    return b - a
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    TrekBuddy Forum Index -> Known Issues 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