Disable creating blank tiles in MOBAC
2 posters
Disable creating blank tiles in MOBAC
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.
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
Re: Disable creating blank tiles in MOBAC
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 : 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.
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 : 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
Re: Disable creating blank tiles in MOBAC
Thank you for answer but this method will delete many useful tiles.
All blank tiles has same byte order . 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.
All blank tiles has same byte order . 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
Re: Disable creating blank tiles in MOBAC
Maksym wrote:Thank you for answer but this method will delete many useful tiles.
All blank tiles has same byte order . 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
Re: Disable creating blank tiles in MOBAC
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?
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
Similar topics
» After creating maps with MOBAC I only get empty tiles
» Creating Map from multiple tiles
» Missing Tiles in OruxMaps (Android) after creating Atlas
» Blank Map as background
» Import multiple files, Swiss grid
» Creating Map from multiple tiles
» Missing Tiles in OruxMaps (Android) after creating Atlas
» Blank Map as background
» Import multiple files, Swiss grid
Permissions in this forum:
You cannot reply to topics in this forum
|
|