Jumbled SQLite tiles?

Hi all, thanks in advance for the help.

Global Mapper 21.1, Windows 7, dual 8-core Xeons with 128gb ram.

When I export an SQLite (File>Export>Raster/Image Format>RMAPS SQLite) from GeoTiffs the SQLite exports and loads fine in Global Mapper. However, when I load it in a different program the tiles are jumbled and out of order, so map tiles are in the wrong place and all over the place.

If I export the same GeoTiffs with (what I believe to be) the same settings from another computer, the SQLite loads fine in other programs.

This issue has persisted from GM 20 to 21 and 21.1. I'm at a loss. How could GM load an SQLite correctly while other programs jumble the tiles? Am I missing some setting on the one workstation?

Thank you

Best Answer

  • bmg_bobbmg_bob Global Mapper Programmer Posts: 2,188
    Answer ✓
    Hello,

    At one time, there was an Android phone map viewer called RMaps, and the RMaps SQLite format was implemented specifically to work with that application. As I recall, the tile layout was different from the layout in other SQLite formats, such as MBTiles. To my knowledge, the application is no longer available, but this format lives on in Global Mapper. A couple of years ago, we redesigned the internals of Global Mapper's SQLite export functionality. It is possible that during implementation of those changes, this layout difference was lost. A quick look at OsmAnd indicates that their SQLite databases need to be in a specific format, and the RMaps SQLite databases do no match up. If you post a zip archive containing databases created with Global Mapper 19 and 21.1, I can take a look.

    Cheers,
    Bob

Answers

  • bmg_bobbmg_bob Global Mapper Programmer Posts: 2,188
    Hello,

    This is what I think you are saying:

    On Computer A: 
    Export RMAPS SQLite using Global Mapper. Resulting SQLite file appears jumbled in other software, but ok in Global Mapper.

    On Computer B: 
    Export RMAPS SQLite using Global Mapper. Resulting SQLite file is ok in other software and in Global Mapper.

    Is this correct?
    What other software are you using?
    Have you tried exporting to the MapBox MBTiles Tileset format? That is also a SQLite database that contains tiled raster data. One difference between the two tiled formats is that RMAPS is "top to bottom" and MBTiles is "bottom to top". If the other software you are using expects "bottom to top" and you give it "top to bottom", then the results would be similar to what you are describing.

    Cheers,
    Bob



  • TKHTKH Posts: 5
    Hi Bob,

    You are correct.

    OsmAnd for Android for example. No, I have not exported in MBTiles because, unfortunately, it needs to be an SQLite rather than .mbtiles.

    The tiles are out of order north to south AND east to west. In addition, tiles can missing completely or displaying different zoom levels from their neighbor.

    See these two screenshots for example:
    https://drive.google.com/file/d/1c1HAWkJgT5hNmpbjKWDq0Lu9RrdKugI5/view?usp=sharing

    It's odd to me that I have to use a different workstation with the same version of Global Mapper with the same settings to get a file that displays properly. How do I fix this on the one workstation?

    Thanks
  • TKHTKH Posts: 5
    Bob, 

    I'm afraid I may have wasted your time, my apologies.  After a ton more testing, all programs can load SQLites from GM v19 without a problem. However, SQLites from 21 and 21.1 are jumbled in some programs but not all.

    Did Global Mapper change how it writes or structures SQLite databases or indexes between versions 19 and 21.1? Perhaps with the introduction of multi-core support for SQLite exports?

    Thanks
  • TKHTKH Posts: 5
    Bob, thanks for your help on this. I ended up reaching out to the OsmAnd developers and they were able to fix it on their end. You're right, OsmAnd was somehow handling the files differently or needed something different.
Sign In or Register to comment.