Menu

#285 Multi zone atlases

Already_implemented
open
nobody
None
1
2019-06-20
2019-06-19
No

Hi,

first of all, many thanks to developpers for this excellent tool.

Let's assume that I have selected and added as atlas content several geographical areas.
When atlas creation is launched, result "behaviour" is not the same depending on atlas format.

If format is "OruxMaps", then several directories are generated, one for each geographical area, ie. one map for each geographical area.

On the other hand, if selected format is "MBTiles", then only one file is generated, including all tiles from all areas, but the file is "supposed" to cover only the last extracted area ("Metadata" table, "Bounds" attribute).

Mobac's behaviour in case of OruxMaps format is perfect : This allow to define several areas, then launch in one click corresponding maps creation.

On the other hand, what is done in case of MBTiles format is definitely not good and useless.... since resulting .mbtiles file is not usable, since its content (several areas) is not its "declared" content (only the last area). In particular, it is 100% unusable in OruxMaps.

I focused onto these two formats... because they are the only I'm using currently, but I did some quick tests, and according to them, it "seems" that Mobac has "OruxMaps like behaviour" and generate as many sub-directories that there are areas in the selection if Atlas is "natively" made of several files, gathered in directories, and "MBTiles like behaviour" (everything in same db file) in all formats for which atlas is made of only one sqlite db file (which is the case of MBTiles format, but also OsmAnd Sqlite, or RMaps Sqlite, etc...)

What I would suggest in case of "monolithic" sqlite db files is the following :
-either create as many db files as there are distinct areas in Atlas content selection
-or at least warn the user that there are several areas, and ask for confirmation before starting atlas generation.

First proposal is from far the best one, since it allows creation of several maps in one click, the same way we can do it with "OruxMaps like" formats.
But if, for any reason, it's too complex to implement, the second proposal would at least avoid to launch a quite long, but useless process, to generate someting unusable...

Discussion

  • r_x

    r_x - 2019-06-19

    Have you tried to move maps between the layers in the atlas content pane? Every atlas format works a little bit diferent. I don't remember how the atlas formats you mention work exactly, but if the atlas limitations allow it and you don't get one file per map you can do a lot by restructuring the atlas content tree.

     
    • Laurent Grenet

      Laurent Grenet - 2019-06-19

      Hi,
      Thank you for answering... but I don't understand what you mean with
      moving maps between the layers.

      Since I'm afraid to have been myself unclear, let me to be a little bit
      more clear.

      Let's assume I have selected a first area, which covers (for example...)
      a part of french alps, and "Add selection" with 4 zoom levels selected,
      then selected a second area (eg. in french brittany) and added it too.
      As a result, "Atlas content tree" is as follow :

      AtlasName (MBTiles SQlite)
          Alpes
              Alpes 13
              Alpes 14
              Alpes 15
              Alpes 16
         Bretagne
              Bretagne13
              Bretagne14
              Bretagne15
              Bretagne16

      In such a case, if atlas format is "OruxMaps Sqlite" , resulting atlas is generated as a directory/subdirectories/files structure as follow :

      AtlasName_2019-06-19_214048
      -----Alpes
      ----------Alpes.otrk2.xml
      ----------OruxMapsImages.db
      -----Bretagne
      ----------Bretagne.otrk2.xml
      ----------OruxMapsImages.db

      and then "Alpes" sub-directory and its content is a perfect Map for OruxMaps, which includes all tiles from alps and only them, and "Bretagne" subdir and its content as well with tiles from brittany area.

      But if atlas format is "MBTiles Sqlite", resulting atlas is made of only one file (and here is the issue), directly at topmost level of atlases directory, named AtlasName_2019-06-19_214315.mbtiles

      And this unique .mbtiles files contains all tiles from Brittany, and from Alps, but its Metadata table specify "bounds".... which covers only brittany area (the last one in the list)

      What would be great would to have atlas generated as follow :

      AtlasName_2019-06-19_214315
      -----Alpes.mbtiles
      -----Bretagne.mbtiles

      with Alpes.mbtiles including only tiles from Alps area (and metadata/bound corresponding to bounds of this area), and Bretagne.mbtiles including tiles of brittany area, and corresponding metadata/bound.

      If this is not (easily...) feasible, the option would to have only a warning before launching atlas generation, because in any case, it doesn't make sense (and cannot be used in any way by OruxMaps) to have in the same file tiles coming from Brittany, and tiles from Alps.

      I hope I'm more clear now
      Regards

      Laurent

       

      Last edit: Laurent Grenet 2019-06-20
  • r_x

    r_x - 2019-06-20

    Use drag and drop to move maps between layers.

     
  • Laurent Grenet

    Laurent Grenet - 2019-06-20

    I really do not understand what it could change ????
    The issue with MBTiles format (and some other) resides in the fact that several areas are extracted in only one file.

    Whatever the way we could group / ungroup maps and layers in Atlas content window, we continue to have only one .mbtiles file as output.... while the need is to have as many distinct files as we have distinct geographical areas....

     
  • r_x

    r_x - 2019-06-20

    Every layer creates one file.
    Two layers -> two files.

    If you now move the maps from layer 2 to layer 1 you should only get one file.

     
  • Laurent Grenet

    Laurent Grenet - 2019-06-20

    Unfortunately, what you mention is not the case, at least with MBTiles and some other formats.

    Maybe "every layer SHOULD create one file".... but it's not actually the case.

    As mentioned in my post, I have several layers (one layer per geographical area), each layer containing several zoom levels (for the same area) .
    And nevertheless, several layers produce only one file....

    Pls have a look on attached file : screen copy of atlas content window.

    Maybe this request shouldn't be in "Feature request" category, but in "Bugs" category ?

     
  • r_x

    r_x - 2019-06-20

    You were talking about OruxMaps therefore what I said was only dedicated to OruxMaps. As I wrote every atlas format works different and every atlas format as certain limitations. Therefore you can't say an atlas format works incorrectly because another format works different.

    However I just tried it myself and it turns out that the atlas format OruxsMaps SQlite is not capable to handle multiple areas in one file. Therefore it is a limitation of the atlas format and has nothing to do with MOBAC.

    Anyway I don't implement new features for MOBAC. Only bug fixing and minor enhancements will be implemented.

     
  • Laurent Grenet

    Laurent Grenet - 2019-06-20

    Sorry, but I don't say that MBTiles format works incorrectly because it works differently than another format, but because, when launched with several layers, it works in such a way that generated atlas contains tiles from geographical areas which are not inline with the declared "Bounds" attribute of Metadata table.
    Whatever the reason behind, this is strictly speaking incorrect....

    Nevertheless, this is not a major point, and I fully agree it's not a major bug...
    I only take note that MBTiles (and some other) format is incompatible with multi-layers atlases....

     

Log in to post a comment.