Menu

Use TIF+TFW files as source in Mobac ? Possible ?

2024-04-22
2024-04-24
  • Laurent Grenet

    Laurent Grenet - 2024-04-22

    Hi,

    I have a set of raster files in .tif format, each of them associated to their .tfw file providing geolocalization.

    Is there a mean to have these files read as source file by Mobac, in order to be able to export them in another format (MBTiles atlas in my case) ?

    Thanks in advance for any valuable idea !

     
    • r_x

      r_x - 2024-04-23

      There is no special custom map source format that uses TIF/TFW as input.

      There is only one generic input format which generates map tiles from an arbitrary image. Not sure if tiff is supported.

      It seems that this format has never been documented in the Wiki and I have not used it at all, so I don't know if it is still functional:

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <localImageFile>
           <name>Custom local image file atlas</name>
           <minZoom>4</minZoom>
           <maxZoom>14</maxZoom>
           <imageFile>path/to/the/imagefile.png</imageFile>
           <boxNorth></boxNorth>
           <boxEast></boxEast>
           <boxSouth></boxSouth>
           <boxWest></boxWest>
      </localImageFile>
      

      The box... entries need to be filled with the WGS84 lat/lon coordinate values.

      As usual MOBAC can only handle maps with Mercator projection. If the TFW file uses a different projection the generated tiles will most likely be miscalibrated.

       
  • Laurent Grenet

    Laurent Grenet - 2024-04-24

    Thank you for answering, but this cannot be convenient with my data.
    AFAI understand, what you propose needs a source file for each image, while I have a set of tenth of images, each with its positioning data.

    On the other hand, it's not really annoying for me (at least this time ;-)) since I've found a WMS server that provide exactly the same data, and works fine with Mobac.

    Nevertheless, what you propose could be useful to manage a large image resulting of assembly of several "small" images, maybe after scanning a paper map, and I keep it in note somewhere. If I test it one day in the future, I'll give a follow up on the forum.

     
    • r_x

      r_x - 2024-04-24

      No you don't need one source file each tile image, you just use one large calibrated image.

       
  • Laurent Grenet

    Laurent Grenet - 2024-04-24

    We say the same.
    In input, if we have only one image, we have only one "xml source file" providing calibration data of image.

    But I actually had not one image, but a bunch of 40 or 50 of images.
    If I wanted to use what you propose, I would have to, before, joining all these images in one global image, which is obviously feasible, but not so easy...
    Maybe, I could have opened all of them with QGis (that takes into account the .tfw calibration files, and then would have been able to correctly position all these images one beside the other), then generate a "printout" with QGis to have only one global image.

    I probably would have done this.... if I still have the need.... which is no more the case, as I wrote previously, thanks to the WMS server.

    Anyway, thanks a lot for your answers.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.