Author Topic: How to delete a zoom factor in a sqlitedb map?  (Read 3039 times)

Offline tramp20

  • Expert
  • Master of Locus
  • ****
  • Posts: 581
  • Thanked: 5 times
    • View Profile
How to delete a zoom factor in a sqlitedb map?
« on: June 07, 2013, 15:07:52 »
Hi,
is it somehow possible to delete a complete zoom factor from a personal map .sqlitedb?
I don't want to download this map again because it has now already 2 GB :-(

I have the sqlite manager addon for Firefox from https://code.google.com/p/sqlite-manager/.

My SQL knowledge is very very old.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Sony Xperia Z1c   Android 10
 

Offline Menion

  • Locus team
  • Professor of Locus
  • *****
  • Posts: 12475
  • Thanked: 775 times
    • View Profile
    • http://www.asamm.com
  • Device: Pixel 2
Re: How to delete a zoom factor in a sqlitedb map?
« Reply #1 on: June 07, 2013, 15:51:45 »
let's try it

1. backup your map!
2. open file in add-on
3. you now need to know which zoom level you want to delete. Zoom levels are computed as 17 - z if I remember correctly :). So whole world is 17 - 0 = "17", almost street level described in locus as for example 16 is here  17 - 16 = 1!
4. in tab execute SQL write something like SELECT * FROM tiles WHERE z == 'X' where X is your computed zoom. By this you may check if it really found something. Unfortunately this add-on do not allow to display image in "image" column (btw. suggest to use SQLite Expert Personal 3 - free program where you may also check image in last column)
5. if all is fine, to delete tiles in this level just run DELETE FROM tiles WHERE z == 'X'
6. also suggest to delete column zooms (click with right button and set to 'null') in table "info". Locus will then re-initialize your map to get correct available zoom levels

hope this will work and helps. Let me know if there will be any problem
« Last Edit: January 01, 1970, 01:00:00 by Guest »
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 final download
 

Offline tramp20

  • Expert
  • Master of Locus
  • ****
  • Posts: 581
  • Thanked: 5 times
    • View Profile
Re: How to delete a zoom factor in a sqlitedb map?
« Reply #2 on: June 07, 2013, 16:28:12 »
Quote from: "menion"
(btw. suggest to use SQLite Expert Personal 3 - free program where you may also check image in last column)

Thank you.
I installed your suggestion, what should I see under images?
I see the same signs in the the whole db (attached screen shot).

And if I want to remove zoom 17 then "X" should be 0?

I will try this when the weather will become bad :-)
A 2 GB file is really big.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Sony Xperia Z1c   Android 10
 

Offline Menion

  • Locus team
  • Professor of Locus
  • *****
  • Posts: 12475
  • Thanked: 775 times
    • View Profile
    • http://www.asamm.com
  • Device: Pixel 2
Re: How to delete a zoom factor in a sqlitedb map?
« Reply #3 on: June 07, 2013, 16:37:52 »
- hmm I'm just checking last column and seems to have a problems with JPEG files. You may at least tap with right button > Hex editor > save and store data as image and check if it's correct zoom

- yes 17 should be 0

- and 2GB, if you have A4.0+, then this limit should be extended to 4 GB or you already have problems in Locus with this huge map?
« Last Edit: January 01, 1970, 01:00:00 by Guest »
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 final download
 

Offline tramp20

  • Expert
  • Master of Locus
  • ****
  • Posts: 581
  • Thanked: 5 times
    • View Profile
Re: How to delete a zoom factor in a sqlitedb map?
« Reply #4 on: June 07, 2013, 16:45:49 »
Quote from: "menion"
6. also suggest to delete column zooms (click with right button and set to 'null') in table "info". Locus will then re-initialize your map to get correct available zoom levels


Where should I do this?
In SQLite Expert I don't find this.
Please add a screen shot.


In the meantime deleting zoom 17 succeeded and the database is smaller now.
Can I now  in Locus continue downloading other parts of my selected region and will these be imported to the existing map?
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Sony Xperia Z1c   Android 10
 

Offline tramp20

  • Expert
  • Master of Locus
  • ****
  • Posts: 581
  • Thanked: 5 times
    • View Profile
Re: How to delete a zoom factor in a sqlitedb map?
« Reply #5 on: June 07, 2013, 16:51:20 »
Quote from: "menion"
- hmm I'm just checking last column and seems to have a problems with JPEG files. You may at least tap with right button > Hex editor > save and store data as image and check if it's correct zoom


- and 2GB, if you have A4.0+, then this limit should be extended to 4 GB or you already have problems in Locus with this huge map?

If I save this as .png then I see a tile.

I have 4.04 and didn't know that the limit can be at 4 GB.
No, I have no problems with this map, I only feared to get some :-)

Thank you for your help till now.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Sony Xperia Z1c   Android 10
 

Offline tramp20

  • Expert
  • Master of Locus
  • ****
  • Posts: 581
  • Thanked: 5 times
    • View Profile
Re: How to delete a zoom factor in a sqlitedb map?
« Reply #6 on: June 07, 2013, 19:29:16 »
Hi menion,
if you have time can you answer my question too?
viewtopic.php?f=10&t=3144&p=21341#p21340
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Sony Xperia Z1c   Android 10
 

Offline gynta

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 3550
  • Thanked: 44 times
    • View Profile
    • Locus live tracking service
  • Device: SM-A530F(A8) Android 8.0.0
Re: How to delete a zoom factor in a sqlitedb map?
« Reply #7 on: June 07, 2013, 20:18:21 »
Quote from: "tramp20"
is it somehow possible to delete a complete zoom factor from a personal map .sqlitedb?
Sure - and it's easy...  ;)

eg(!)

#copy your my.sqlitedb to D:

#Save this text as "SQLite_source.xml" to MobileAtlasCreatormapsources
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<localTileSQLite>
<name>SQLite atlas</name>
<sourceFile>D:my.sqlitedb</sourceFile>
<atlasType>RMaps</atlasType>
<backgroundColor>#000000</backgroundColor>
</localTileSQLite>

#Start MobileAtlasCreator

#Select  "SQLite atlas"

#Create a new atlas with your new zooms

edit
The idea ist not new.
Thanks brotbuexe
for -> http://docs.locusmap.eu/doku.php/commun ... g_sqlitedb
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline Menion

  • Locus team
  • Professor of Locus
  • *****
  • Posts: 12475
  • Thanked: 775 times
    • View Profile
    • http://www.asamm.com
  • Device: Pixel 2
Re: How to delete a zoom factor in a sqlitedb map?
« Reply #8 on: June 08, 2013, 07:52:27 »
gynta solutions should also work, but when you know what to do, deleting rows directly in database is for sure faster. And zooms are in table "info", so switch in left panel to "info" table and there you column with list of zooms
« Last Edit: January 01, 1970, 01:00:00 by Guest »
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 final download
 

Offline tramp20

  • Expert
  • Master of Locus
  • ****
  • Posts: 581
  • Thanked: 5 times
    • View Profile
Re: How to delete a zoom factor in a sqlitedb map?
« Reply #9 on: June 08, 2013, 13:54:13 »
Quote from: "menion"
gynta solutions should also work, but when you know what to do, deleting rows directly in database is for sure faster. And zooms are in table "info", so switch in left panel to "info" table and there you column with list of zooms

Thank you.
I did it in your way and now I found the zooms too.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Sony Xperia Z1c   Android 10
 

Offline tramp20

  • Expert
  • Master of Locus
  • ****
  • Posts: 581
  • Thanked: 5 times
    • View Profile
Re: AW: How to delete a zoom factor in a sqlitedb map?
« Reply #10 on: June 08, 2013, 17:48:15 »
Quote from: "gynta"
Quote from: "tramp20"
is it somehow possible to delete a complete zoom factor from a personal map .sqlitedb?
Sure - and it's easy...  ;)
eg(!)
...
Sorry I forgot to thank you too.

Gesendet von meinem LG-P970
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Sony Xperia Z1c   Android 10