Understanding oruxmaps offline raster format (sqlite)

Started by dimmel, July 13, 2014, 05:01:33 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

dimmel

Hello,



I am trying to convert between Oruxmaps SQLite raster map files (with xml) and Locus SQLite raster map files. The Locus format is very straight forward: each tile is represented by it's x/y coordinate and a zoom level. But how is the Oruxmaps format defined? In detail, how can I map some Locus tile x/y/z to a tile in the Oruxmap file?



Regards,

orux

#1
Quote from: "dimmel"Hello,



I am trying to convert between Oruxmaps SQLite raster map files (with xml) and Locus SQLite raster map files. The Locus format is very straight forward: each tile is represented by it's x/y coordinate and a zoom level. But how is the Oruxmaps format defined? In detail, how can I map some Locus tile x/y/z to a tile in the Oruxmap file?



Regards,


Hi,

the tiles are stored in a table, using coordinates x, y, z.

x, y-> integers that indicates the position of the tile in the horizontal/vertical dimensions, starting at zero, from top-left corner.

z-> zoom level of the tile.



but you need to interpret the xml file attached to the database in order to obtain:



the size of the tiles (may be 128/256/512px)

projection in which the map was created

the coordinates of the four corners (always in WGS84 coordinate system)

optional: the original map datum used.



Note that is a format that allows maps from any size/scale/coordinate system; I don't know the equivalences with locus maps.



But if you want to work with maps always using google coordinate system, it is easier.



orux

rvb

#2
it is very easy to go from any format to orux via mobac.



unfortunately it is impossible to go from orux to any other format.



i would like a tool from orux to mbtiles or plain xyz.

dimmel

#3
Quote from: "rvb"it is very easy to go from any format to orux via mobac.



unfortunately it is impossible to go from orux to any other format.



i would like a tool from orux to mbtiles or plain xyz.


I agree. My intention was to write a little conversion tool from Orux format so that the maps can also be used with Mobac as input source.



Other formats (such as the standard format used by Locus) have a fixed top left corner which corresponds to the slippy format used by OSM. If I understand orux's answer correctly, then for each zoom level the top left corner can vary. Taking the slippy tile conversion formulas (http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Lon..2Flat._to_tile_numbers">http://wiki.openstreetmap.org/wiki/Slip ... le_numbers">http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Lon..2Flat._to_tile_numbers) I assume this means, that the top left corner defined for a zoom level has to be substracted from the actual coordindate.

dimmel

What unit are the MapDimensions' width/height?


<MapChunks xMax="1" yMax="1" datum="WGS84" projection="Mercator" img_height="512" img_width="512" file_name="Layer 09" />
<MapDimensions height="512" width="512" />

RichLangford

You can see and download every BLOB in a .DB file using "DB browser for SQlite" (https://sqlitebrowser.org/">https://sqlitebrowser.org/). However, there may be hundreds of them, and they are not georeferenced. This points to a fundamental property of the map database, in that it is composed of numerous tiles, not a single, scalable image.