This object is in archive! 

Edit offline maps

Michael Vogel shared this question 11 years ago
Answered

I have accidently added some tiles to an existing offline map with zoom level 12, but i am using only zoom level 5,7,9,11,13,14 and 15 for this map. So I would like to remove cards from the database, otherwise I would have to make everything from the beginning...


Feature request: when a offline map is displayed, "Modify Offline Map" instead of "Download Map" could be seen in the menu - allowing to remove tiles from a map using the same dialog like the download map procedure.

Replies (16)

photo
0

The effort and the benefit.


And you are sure that you will use this more often than three times


...in your life?

photo
0

Hopefully not :)


Maybe an external program which deletes all maps with a certain zoom level could be useful 5 times a life? ;-)


What I would use definitely more often, is an overview which areas of a map have been downloaded already with specific zoom levels.


I do some walks year by year on the UK coast path, so I need detailed maps (thanks to Locus allowing access to Ordnance Survey maps) from areas which are not just in a simple rectangle. After having collected different rectangles with different zoom levels in about 10 areas I don`t know exactly, if all needed locations will be definitely downloaded (and, to include my initial question, if there aren`t some unwanted maps also included).


photo
0

Hi Michael,


overview is nice idea, but still little bit complicated for me, anyway who know what future brings :)


anyway about deleting SQLite tiles in database, there is no direct method in Locus. I think that easier method is to use any SQL database editor and just delete lines with tiles. I may suggest SQLite manager (plugin for Firefox) that works quite well

photo
0

Menion,


thanks, I`ve viewed some of my maps in a SQL Browser and think about writing a small tool to display an overview (like in the picture above)...


...the reason for that is, that I have a map where some tiles are missing ("holes") in a certain zoom level, but when doing a download for this region again, Locus believes, these tiles are already in the database.


For doing some investigations, I would like to know, if the database structure is documented (I haven`t found any hints in the forum)?


I would like to know, how the values for X, Y, Z and S are defined in the tiles structure? Z seems to be the zoom level, but I have no idea how to handle the other elements...


And what about the info table? Is any of the items needed for handling the database correctly? What would happen, if tiles are added/removed without touching the info table? Found also, that I have duplicate values in the "zooms" field (e.g. 8;3;5;3)


Thank you very much!

photo
0

Hi,


hmm it`s a little bit complicated


1. X and Y values depend on map types. All online and downloadable maps in Locus use Mercator projection. All common maps (OSM, Google, ...) use orientation of Y axis from top to bottom, some use inverse Y, some use Spherical mercator projection and some use ellipsoid as base layer for projection. So it depend on what map you use and want to work with.


Basically all main description should be find on internet.


http://wiki.openstreetmap.org/wiki/Me...


2. S value is my private value that serve as a time stamp. It`s not important and leave it 0 if you will add some new tiles (or empty)


3. info table helps Locus to keep initialization faster and reduce some time. Anyway if this table will miss, Locus will create one when first run with this map. Great help should be if you fill zooms column (I`m quite surprised there are wrong values, I`ll check it). It will really speed up first start if map will be huge, anyway even this is not neccesary

photo
0

Thank you very much, I made a first (alpha) version to display the available map tiles in different zoom levels. It`s a simple windows program which needs the database file name as parameter (drag and drop should also work).


Because of my small notebook and the large number of different zoom levels within a database, I made a fixed window size and just guess for a useful map sizeat the moment, holding the shift or ctrl key while the program is started shrinks the map size.


https://sites.google.com/site/mrvogel...

photo
0

good try :)


250MB SQLite map - crash even on 16GB RAM

photo
0

crash with simple 10MB solite.map

photo
0

Hm,


even when I made a quick and dirty source code, it should *not* crash ?! Memory is definitely not the problem, I only keep a dynamic list of the given tiles in the memory.


It worked here on all tested database files (using nokia, bing and some other maps)


I don`t want that you have to much work testing other programs, so I will do further testing here in the next days. Anyhow I have changed the program to create a log file which should look like this (a criticical value is the zoom factor, which should help to see the whole map in the window):


________________________________________


Zoom Level 13 found


Zoom Level 10 found


Zoom Level 8 found


Zoom Level 6 found


Zoom Level 6:


x: 986 - 1028


y: 678 - 696


Zoom Level 6:


x: 246 - 259


y: 168 - 175


Zoom Level 8:


x: 57 - 80


y: 36 - 52


Zoom Level 10:


x: 7 - 10


y: 4 - 7


Zoom Factor: 4


Drawing Level 13


Drawing Level 10


Drawing Level 8


Drawing Level 6


Ok.


________________________________________

photo
0

Even I could not reproduce any crash here (Windows XP), I did some changes...


Enter/Backspace allows to "zoom" in/out, the window should be resized to fit to the displayed map.

photo
0

nice - but without a new clean version - it can`t be tested...


btw.


should we swap this thread to Locus forum "tools" section ?


-> http://forum.locusmap.eu/viewforum.ph...

photo
0

good point gynta!


I marking this topic as answered (right Michael?). If you`ll want to continue in work on this tool (and I think it should became very nice and useful tool), I may only suggest to create new topic in Tools section and continue there

photo
0

Keeping this answered is ok, thank you. I will continue programming as soon I`ll get a notebook with a higher screen resolution, actually I work on a netbook with 1024x600 :(


...maybe it could be in the tool section then (even I don`t know what a "clean" version is, it never crashed here with a dozen of maps)


photo
0

Hi Michael, how did you get OS maps into Locus? This is something I`ve been wanting to do for ages and have messaged Locus a number a times but have not had a response. Any help would be greatly appreciated. Darryl

photo
0

OS is available via Bing maps – if Locus doesn`t show it by default, try to search for Locus Addons to include additional map sources.

photo
0

Found it, perfect. Many thanks :)

Replies have been locked on this page!