How to convert another map database to Locus map use

Started by Steven, October 10, 2024, 09:37:37

0 Members and 2 Guests are viewing this topic.

Steven

Hello,

I want to convert hikingtrailhk database (android ) map to Locus. I found the database located at
\Xiaomi Pad 5 Pro\Internal Storage\Android\data\tsoiyatshing.hikingtrailhk\files\indexes\map\V1.db
. It should use "SQLite format 3" format.  However I don't have idea to convert it. Is it need to write a XML file ?


Thanks a lot
Steven
  •  

michaelbechtold

You should use a sqlitedb manager to show us the structure of the beast. A textual dump like the last  attachment does not help.
There is free SW for above.
  •  
    The following users thanked this post: Steven

voldapet

To be honest, I don't know this app, but I don't think there is any simple conversion tool. Also, the question is whether the database contains only the base map or also some trails or points.
If you want to convert routes from this application to Locus Map, I would recommend exporting trails to GPX and then importing the GPX into Locus Map.
  •  

Steven

Here is the DB structure, what is the next step. Any guide or document can provide me how to do, many thanks for your help

  •  

michaelbechtold

That will be heavy lifting, I guess.
The simplest DB structure Locus can use is sqliteDB, as you find in the Locus "maps" folder is: x, y, z (zoom level) and a BLOB with the tile image, all in one table.
In your DB x, y, z are in the "Tile" table, while the image BLOB seems to be the one in the "TileData" table, with tileId being the linking reference.
You could first check if the BLOBs in your DB are 256 x 256 or 512 x 512 sized images that are in png or jpg format.
If that is true, you need to do database scripting to export your DB image blob data into a tree structure (by zoom levels) and x as the next level of folders, with the images as <y>.png/.jpg
Once you have that you can use MOBAC to compile a sqliteDB that Locus can use.
  •