sqliteDB autoload

Started by mapCoder, September 17, 2013, 17:29:46

0 Members and 1 Guest are viewing this topic.

mapCoder

Can someone list the requirements for the autoload feature ? There are 2 options (same type only & otherwise).

My scenario: I have divided my country into 2 areas (north & south).

I have the following sqlite files

top.sqlitedb: This an over all map containing tile zoom levels 8-11 (9-6 in sqlite)
North.sqlitedb: This contains the northern region in zoom levels 12-16 (5-1)
South.sqlitedb: contains the southern region in zoom levels 12-16 (5-1)
North17.sqlitedb: This contains the northern region in zoom levels 17 (0 in sqlite)
South17.sqlitedb: contains the southern region in zoom levels 17 (0 in sqlite)

All the DBs have the provider in the info table as "0". (so they are same type: I assume).

Now, what I expected Locus to do is to load the necessary tiles for the current zoom level from the sqlitedb files. meaning tile for zoom level 10 from top.sqlitedb and tile for zoom level 17 from North17/South17.sqlitedb.

However, that is not happening. what does work is if I'm in North.sqlitedb, it will load tiles from both North.sqlitedb & south.sqlitedb as required. but if I zoom out of the range of the current sqlitedb file, it will not load from the other files.

What have I done wrong?
  •  

mapCoder

if it helps, this is the info table from different files:

top.sqlitedb: 7|6|25.160089012284|55.3710937505824|7;6|0

North.sqlitedb: 5|1|25.160089012284|55.3710937505824|5;3;1|0

South.sqlitedb: 5|1|25.160089012284|55.3710937505824|5;3;1|0

North17.sqlitedb: 0|0|25.160089012284|55.3710937505824|0|0

South17.sqlitedb: 0|0|25.160089012284|55.3710937505824|0|0
  •  

Menion

what happen to you is how is locus done ... auto-loading system is quite old and I agree that it should work better

if you have more SQLite maps and you want, that all these maps works as one map!, then Locus has a solution for creating "multi-sqlite" map. Solution is simple. Create in you maps directory one sub-directory, for example Locus/maps/myBigMap and put all these sqlite files into this directory. That's all. Locus will display in list of personal maps, just one map "myBigMap" and it should work as expected, no matter what auto-loading you have selected.

about "auto-loading" - it works in a way, that if you're in one! zoom level and some tiles are missing, Locus is searching for an alternative map source that should fill empty places on screen. Anyway you're still limited by zoom levels of your base (selected) map
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

mapCoder

Quote from: menion on September 18, 2013, 08:36:46
what happen to you is how is locus done ... auto-loading system is quite old and I agree that it should work better

if you have more SQLite maps and you want, that all these maps works as one map!, then Locus has a solution for creating "multi-sqlite" map. Solution is simple. Create in you maps directory one sub-directory, for example Locus/maps/myBigMap and put all these sqlite files into this directory. That's all. Locus will display in list of personal maps, just one map "myBigMap" and it should work as expected, no matter what auto-loading you have selected.

about "auto-loading" - it works in a way, that if you're in one! zoom level and some tiles are missing, Locus is searching for an alternative map source that should fill empty places on screen. Anyway you're still limited by zoom levels of your base (selected) map

Thanks I was gonna try that but I came across a post here on this forum where someone said they got a 3.5 GB sqlite map working on ICS.

I went ahead and built a 5.7GB sqlite database. I can confirm that it works fine. speed is good aswell. :)

I'm quite pleased with the setup and will try it out for a few days.

Thanks Menion.
  •  

Menion

5.7 GB map works? hmm good news for me also. You're welcome of course. If I'll be able to help, feel free to write me ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Bob Denny

I made some sub-area maps with MOBAC, and they wouldn't auto-join until I used the "Reinitialize map" function. That is magic!

I was told on JellyBean that 2Gb was the limit. I also am surprised that you succeeded with larger.
  •  

Menion

I'm worried that more then magic, this autoloading is buggy and will definitely needs some more attention from my side soon. Anyway on JB, should be for sure limit 4GB. Looks it's even more, perfect
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

mapCoder

Quote from: menion on September 23, 2013, 21:47:21
I'm worried that more then magic, this autoloading is buggy and will definitely needs some more attention from my side soon. Anyway on JB, should be for sure limit 4GB. Looks it's even more, perfect

menion, on larger DBs like MSSQL we have the "check" key, which basically provides the limits on data in a table. this way, sql knows the range of data in a table and ignores scans if the data is outside of the range.

You could add another column table in the sqldb file that provides the ranges of the x,y tiles, so you can avoid a scan. (maybe you are already storing this, I don't know).

Or, use the filenames to provide hints eg: <map name>_z_x_y_<x limit>_<y limit>



the maps work fine, only thing i noticed is that tile loading bug. when the zoom is not 100%, Locus fails to load tiles. I do not have shading turned on.
  •