OruxMaps
Visit the new forum: <a href="http://www.oruxmaps.com/foro">OruxMaps</a>

Join the forum, it's quick and easy

OruxMaps
Visit the new forum: <a href="http://www.oruxmaps.com/foro">OruxMaps</a>
OruxMaps
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Disable creating blank tiles in MOBAC

2 posters

Go down

Disable creating blank tiles in MOBAC Empty Disable creating blank tiles in MOBAC

Post  Maksym Thu Jan 31, 2013 9:19 am

Hello, Orux.
How can I disable generating blank (light-blue) tiles in MOBAC when make Oruxsqlite map? The quantity of blank tiles is more then map tiles!
Or how can I automatically delete blank tiles from map db?
Thanks.

Maksym

Cantidad de envíos : 5
Fecha de inscripción : 2013-01-26

Back to top Go down

Disable creating blank tiles in MOBAC Empty Re: Disable creating blank tiles in MOBAC

Post  yip Sat Feb 02, 2013 3:27 am

Hi Maksym

First, Orux sure have a better answer.

Here is my 2 cents on the subject.

I don't think it is even possible in MOBAC.
So here is a dirty way to remove blank tiles by hand cheers : make backups !

-fetch sqlite3.exe there : sqlite3 exe (from the official SQLite website)
-put it in c:\windows
-open a CMD prompt and go to where your map is
-execute the following (in bold):

> sqlite3 OruxMapsImages.db
SQLite version 3.7.5
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> DELETE FROM tiles WHERE length(image) < 5000 ;
sqlite> VACUUM ;
sqlite> .quit
>

That's it. It does not remove "blank" tiles, but it remove "small" tiles. Please notice the difference. the value of 5000 is the threshold of the above script considers tiles to be empty. It may not be the right value for all maps (JPG/PNG/256...). If you had a map of a lake, it can remove some tiles of it.
They will appear as "missing" tiles in oruxmaps (with a "recycle" symbol in the middle).

Orux, do you have a cleanier way to do this ? for example checking the number of colors in a tile ? a 1 color PNG is likely to be a filling tile. Do you think OMDesktop could handle the job and add a "strip db" option ?

yip

Doing it the Android way:
-Grab the most excellent software "SQLite Debugger" on the market.
-With it, browse and select the DB file
-type in the same SQL Statement as above by tapping on the syntax.
-don't forget to commit changes in bottom-right.
This app can also be used to view the images blobs inside the oruxmaps database. really neat.


yip

Cantidad de envíos : 40
Fecha de inscripción : 2012-01-21

Back to top Go down

Disable creating blank tiles in MOBAC Empty Re: Disable creating blank tiles in MOBAC

Post  Maksym Sat Feb 02, 2013 5:14 pm

Thank you for answer but this method will delete many useful tiles.
All blank tiles has same byte order Smile . I am not sure that they are identical when I select different compression level of JPEG for different scales. But in one one scale level all blank tiles are identical.
The main question is why generating blank tiles (need more time to make map)? Then we must find how delete this tiles (and also need to spent many time for this). I thnk better is not to generate blank tiles during map creation.

Maksym

Cantidad de envíos : 5
Fecha de inscripción : 2013-01-26

Back to top Go down

Disable creating blank tiles in MOBAC Empty Re: Disable creating blank tiles in MOBAC

Post  yip Sat Feb 02, 2013 7:42 pm

Maksym wrote:Thank you for answer but this method will delete many useful tiles.
All blank tiles has same byte order Smile . I am not sure that they are identical when I select different compression level of JPEG for different scales. But in one one scale level all blank tiles are identical.
The main question is why generating blank tiles (need more time to make map)? Then we must find how delete this tiles (and also need to spent many time for this). I thnk better is not to generate blank tiles during map creation.

Have you asked in MOBAC forum ?

If the method of deleting small tiles is not reliable enough, perhaps it is possible to detect and delete identical tiles based on a number of occurences of the same size. quite above my knowledge in SQL...

yip

Cantidad de envíos : 40
Fecha de inscripción : 2012-01-21

Back to top Go down

Disable creating blank tiles in MOBAC Empty Re: Disable creating blank tiles in MOBAC

Post  Maksym Sat Feb 02, 2013 8:52 pm

Of course, first I wrote at MOBAC forum. But r_x said that Oruxsqlite format imlementing by Orux himself and I must ask here.
Deleting tiles by exact size is a good idea, but not excellent. Maybe Orux can disable generating blank tiles?

Maksym

Cantidad de envíos : 5
Fecha de inscripción : 2013-01-26

Back to top Go down

Disable creating blank tiles in MOBAC Empty Re: Disable creating blank tiles in MOBAC

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum