Custom Maps in Mission Planner

First of all, thank you for putting up with us. I did cntr-f, pressed the Custom GDAL button, pointed it to the directory where my GeoTIFF was located, and selected the “GDAL Custom” map type but I am still getting Google Satellite imagery. The debug window shows that the TIFF is being loaded so either my image is incorrectly formatted or I am missing something else. Seriously, thank you again for all that you do.

can you show me what else the debug window was displaying? the geotiff needs to be in wgs84/EPSG:4326

Debug text…

INFO MissionPlanner.Controls.Loading - 0.0% C:\Geo\DJI_0053_modified.tif
INFO MissionPlanner.Controls.Loading - Create Instance
INFO MissionPlanner.Controls.Loading - 0.0% C:\Geo\DJI_0053_modified.tif
INFO MissionPlanner.Controls.Loading - 0.0% C:\Geo\DJI_0053_modified.tif
INFO GDAL.GDAL - Raster dataset parameters:
INFO GDAL.GDAL -   Projection: GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84
",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIM
EM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]]
INFO GDAL.GDAL -   RasterCount: 3
INFO GDAL.GDAL -   RasterSize (4565,2203)
INFO GDAL.GDAL - Using driver GeoTIFF
INFO GDAL.GDAL -   Metadata:
INFO GDAL.GDAL -     0:  AREA_OR_POINT=Area
INFO GDAL.GDAL -
INFO GDAL.GDAL -   Image Structure Metadata:
INFO GDAL.GDAL -     0:  INTERLEAVE=PIXEL
INFO GDAL.GDAL -
INFO GDAL.GDAL - Corner Coordinates:
INFO GDAL.GDAL -   Upper Left (35.2655756813208, -120.657492701042)
INFO GDAL.GDAL -   Lower Left (35.2655756813208, -120.657662293928)
INFO GDAL.GDAL -   Upper Right (35.2659271073427, -120.657492701042)
INFO GDAL.GDAL -   Lower Right (35.2659271073427, -120.657662293928)
INFO GDAL.GDAL -   Center (35.2657513558404, -120.657577458994)
INFO GDAL.GDAL -
INFO GDAL.GDAL - Coordinate System is:
INFO GDAL.GDAL - GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
INFO MissionPlanner.Controls.Loading - Loading.Close()

ok, so asume the coords you see are correct, it looks valid to me at first glance.

and you have changed the map source to GDAL custom.

it should just work.

can you share one of the images?

Mission planner screenshot

GeoTIFF

i think the lat and long have been swapped in the geotiff

Looks like a couple things are going on. The Upper Left and Lower Right coordinates are swapped and the coordinates are centered in the wrong yard. It appears I need to find a QGIS tutorial for creating GeoTIFFs unless you know of an easier way to import custom imagery for a relatively small area.

i normally use globalmapper. so cant help on that front. but yet, if you can get that fixed, i think it will work as expected.

try this
https://www.qgistutorials.com/en/docs/georeferencing_basics.html

I thought I figured out what I was doing wrong. QGIS asks for long, lat instead of lat, long.

The output from Georeferencer looks correct and the coordinates track appropriately in QGIS but I still cannot get the GeoTIFF to load in Mission Planner. Here is the most recent GeoTIFF I made today.

Below is the debug output and notice it lists coordinates as long, lat which seems odd. I confirmed the coordinates of the corners are correct if I plot them as lat, long instead of long, lat.

INFO MissionPlanner.Controls.Loading - 0.0% C:\temp\Output\DJI_0053_8OCT2020.tif
INFO MissionPlanner.Controls.Loading - Create Instance
INFO GDAL.GDAL - Raster dataset parameters:
INFO GDAL.GDAL -   Projection: GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84
",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIM
EM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]]
INFO GDAL.GDAL -   RasterCount: 3
INFO GDAL.GDAL -   RasterSize (4353,2635)
INFO GDAL.GDAL - Using driver GeoTIFF
INFO GDAL.GDAL -   Metadata:
INFO GDAL.GDAL -     0:  AREA_OR_POINT=Area
INFO GDAL.GDAL -
INFO GDAL.GDAL -   Image Structure Metadata:
INFO GDAL.GDAL -     0:  INTERLEAVE=PIXEL
INFO GDAL.GDAL -
INFO GDAL.GDAL - Corner Coordinates:
INFO GDAL.GDAL -   Upper Left (-120.657725623445, 35.265531420833)
INFO GDAL.GDAL -   Lower Left (-120.657725623445, 35.265150566923)
INFO GDAL.GDAL -   Upper Right (-120.657096455676, 35.265531420833)
INFO GDAL.GDAL -   Lower Right (-120.657096455676, 35.265150566923)
INFO GDAL.GDAL -   Center (-120.657411111829, 35.2653410661463)
INFO GDAL.GDAL -
INFO GDAL.GDAL - Coordinate System is:
INFO GDAL.GDAL - GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
INFO MissionPlanner.Controls.Loading - Loading.Close()

Do you have a known good GeoTIFF that I can try so I know what good is supposed to look like in Mission Planner? Thank you again.

ok i found a bug in MP.
the image you have is correct, but it was a 24bit image, not a 32 bit image, so MP did not display it correctly.
ie the alpha channel (the missing 8 bits) was set to 0’s, ie transparent. so it was drawing it transparent in mission planner.
ive just pushed a new beta MP and your image should now work.

another workaround is save the image as a 32bit geotiff vs a 24 bit geotiff.

Michael you are the man. I wouldn’t have called that a bug as much as a “limitation” of Mission Planner. Regardless, it works now and I am stoked. Thank you again for all of your help to me and everyone else.

Thankyou very much sir, for detailed explanation.

I have imported a custom low resolution geotiff in MP using GDAL and it only shows up at very high zoom levels, where the pixels are already too large to make out anything. Can I set the zoom levels at wich the custom image should be loaded over gmaps, or is there a different workaround?

update: Found a workaround by creating a WMS using GeoServer, however it would be useful to directly load the GeoTIFFs, because than I wouldn´t have to change the map provider every time and the main map would remain in the background below the loaded GeoTIFF.

can you upscale the geotiff when you save it?

MP wont display it as the pixel density is to low by the sounds of it

The upscaled version doesn´t show up at all. I have even tried to add a 4th alpha-channel (besides RGB), but no luck. Here is the output from the console:

INFO MissionPlanner.Controls.Loading - Create Instance
INFO MissionPlanner.Controls.Loading - 0,0% C:\tmp\GIS\TUPI\test\upscaled2.tif
INFO GDAL.GDAL - Raster dataset parameters:
INFO GDAL.GDAL -   Projection: GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]]
INFO GDAL.GDAL -   RasterCount: 4
INFO GDAL.GDAL -   RasterSize (16803,15787)
INFO GDAL.GDAL - Using driver GeoTIFF
INFO GDAL.GDAL -   Metadata:
INFO GDAL.GDAL -     0:  AREA_OR_POINT=Area
INFO GDAL.GDAL -
INFO GDAL.GDAL -   Image Structure Metadata:
INFO GDAL.GDAL -     0:  INTERLEAVE=PIXEL
INFO GDAL.GDAL -
INFO GDAL.GDAL - Corner Coordinates:
INFO GDAL.GDAL -   Upper Left (11,5598182085919, 47,2535291182239)
INFO GDAL.GDAL -   Lower Left (11,5598182085919, 47,0956591182239)
INFO GDAL.GDAL -   Upper Right (11,7278482085919, 47,2535291182239)
INFO GDAL.GDAL -   Lower Right (11,7278482085919, 47,0956591182239)
INFO GDAL.GDAL -   Center (11,6438282085919, 47,1745991182239)
INFO GDAL.GDAL -
INFO GDAL.GDAL - Coordinate System is:
INFO GDAL.GDAL - GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
INFO MissionPlanner.Controls.Loading - Loading.Close()

what version of mission planner are you running? can you try beta?

I`m using 1.3.74. Also no change with beta.

@Michael_Oborne this is a great thread and I’m interested in using the features identified with MP to conducted a RTK mapping mission of an area depicted on GE. The aim is to get an accurate Geotiff x,y,z and then use this RTK Geotiff map loaded into MP to fly a fixed height above terrain as referenced in the RTK Geotiff. Repeatable and the ability to fly lower to the ground is what I’m looking for. This looks quite doable or have I missed something?

Steve

open MP
and press control-X
and the use “remove all” on mapbox

1 Like