Tutorial: QGIS to Mission Planner Custom Map

This tutorial covers how to export a map from QGIS into Mission Planner. It assumes you already have a map that you want in QGIS (in this case, I just grabbed a free georeferenced pdf).


Planner has supported “inject GE” functionality for a long time, but it’s hidden away and has some quirks to it. From what I can gather, it was built around the specific way that Global Mapper exports tiles, which seems to conflict with the way that QGIS, ArcGIS, and Pix4D export XYZ tiles. I don’t know which is “right”, or if there even is a “right/wrong” standard, but the gist is that Mission Planner expects tiles to appear in folders numbered like this:


and the above-mentioned programs output as


This could be “fixed” in Mission Planner, but I think that “fix” is a strong word, as this would break functionality for anyone it was previously working for (don’t know how many of you are out there).

What I did instead was create a script that converts the naming and copies the files directly into the folder that Mission Planner pulls from. You don’t need to do anything in Mission Planner itself to install the tiles.

Copy Custom Map Script.zip (638 Bytes)

Extract the batch script out of this zip file and drag a folder of map tiles onto it, and wait for it to complete, and you’re done.

Detailed Steps

  1. Start with a map in QGIS that you want to export (making the map is beyond the scope of this tutorial). I am simply using a georeferenced pdf that I imported into QGIS.
  2. In the Processing Toolbox, search for “XYZ” and select “Generate XYZ tiles (Directory)”
    Screenshot 2023-09-30 074832
  3. Configure the output options
    a. Set the extent. Use the button on the right to calculate the extent from a layer, or select Draw on Canvas to create an extent manually
    b. Set minimum zoom to 0
    c. Set maximum zoom to something like 13-16. This depends how detailed your map is, since the exported map can’t be any more detailed than that anyway. Setting this too high can cause the export to take a long time. Each extra zoom level takes 4x as long as the previous zoom level to generate. Experiment with this setting.
    d. Set tile format to JPG
    e. Quality 100
    f. Output directory. Put this wherever you like. I chose Desktop. You will delete it later.
    g. Click Run
  4. Wait for the run to complete
  5. Place the above script in the folder above where you exported your tiles.
  6. Drag the exported folder onto the batch script
    Screenshot (1)
  7. Wait for the script to complete. Your map is now installed in Mission Planner.
  8. Open Mission Planner, go to the Plan page, and select “Custom” as the map type.
    Screenshot 2023-09-30 082831
  9. You should now be able to see your custom map on the Plan and Fly pages (you’ll need to be zoomed and panned to the right area obviously).

Thanks so much for this - have been searching for this functionality for hours! I’m working through your tutorial now… Maybe our admins can tag this with “georeferenced maps in mp” - somehow, I missed your post. Really - thanks a ton in advance!

1 Like

I made Bash script for use on Linux based systems. I am not the greatest Bash programmer so there are probably things that could be improved, but I thought I should leave it here anyways in case it is of use to anyone else. Run copy_custom_map.bash -h for help.

copy_custom_map.zip (1.1 KB)