Please select Into the mobile phone version | Continue to access the computer ver.
Pilot 2 MBTiles import
Uploading and Loding Picture ...(0/1)
o(^-^)o
LV_Forestry
First Officer
Flight distance : 4726654 ft
Latvia
Offline

Tutorial to add custom maps to DJI Pilot 2. In this example I use Global Mapper to generate the Tile, it's not the cheapest, there are probably others.
As usual, I'm not affiliated with the manufacturers of the software I'm taking as an example, just a satisfied user.

A/ Displays on Global Mapper the necessary layers.

In this example what interests me is to see the riverbed that appeared on the LiDAR data after removing the vegetation.
GM3.JPG

B/ Once the visual on the screen suits you, right click on the layer, layer, export.
GM4.jpg

C/ Select "MapBox MBTiles Tileset"
GM1.JPG

D/ Adjust the zoom level.
For the number of zoom level I put the same thing as the max zoom. This way I find it more practical to use. If you only put a few levels, the map will disappear when navigating the RC depending on the zoom level.
GM2.JPG

E/ Export to SD card or directly to RC memory via USB cable.

F/On the RC, Open Pilot2 Settings, then "Map Settings"
DP1.JPG

G/ Choose "Custom Layer"
DP2.JPG

H/ Choose "Import"
DP3.JPG

I/ Choose the MBTile file in the folder where it was saved.
You can see what it looks like by tapping on the map icon.
DP4.JPG

J/ Make the layer visible in the trajectory planning interface.
DP5.JPG

K/ Enjoy
DP6.JPG


2023-3-20
Use props
djiuser_5InBLucOeljy
lvl.1
Flight distance : 1265121 ft
Portugal
Offline

Hi,
I already tested with raster files, and it works just fine.
Thank you so much for your help.
2023-3-21
Use props
Axelz
lvl.4
Flight distance : 3427999 ft
  • >>>
United Kingdom
Offline

I wondered if anyone had had success with software other than the Globalmapper as shown above to generate these tilesets?  I've attempted to generate mbtiles for two areas I've mapped I was keen to have on the DJI Pilot 2 application rather than the older inbuilt map sources, however it just crashes the app when clicking the eye icon to show the layer once in the area.  Tried with MapTiler (free version) as well as Agisoft Metashape with various mbtile export file format combinations and sizes, they show after importing correctly in the application after importing. Tried with webp, jpg and png formats also. Latest DJI Pilot application and firmware on the mavic 3 enterprise and RC Pro Enterprise controller.
2023-5-15
Use props
Johnnokomis
Core User of DJI
Flight distance : 13800095 ft
  • >>>
United States
Offline

Axelz Posted at 5-15 13:22
I wondered if anyone had had success with software other than the Globalmapper as shown above to generate these tilesets?  I've attempted to generate mbtiles for two areas I've mapped I was keen to have on the DJI Pilot 2 application rather than the older inbuilt map sources, however it just crashes the app when clicking the eye icon to show the layer once in the area.  Tried with MapTiler (free version) as well as Agisoft Metashape with various mbtile export file format combinations and sizes, they show after importing correctly in the application after importing. Tried with webp, jpg and png formats also. Latest DJI Pilot application and firmware on the mavic 3 enterprise and RC Pro Enterprise controller.

I've spent the last  4 weeks mapping this gigantic area with Metashape. Exporting MBTiles using these settings seem to import perfectly onto the RC. I use my latest MBTiles to know what areas need mapping next.
2023-5-15
Use props
Axelz
lvl.4
Flight distance : 3427999 ft
  • >>>
United Kingdom
Offline

Thanks I've tried with similar settings from metashape (PNG and smaller total size as far smaller area) and it still crashes unfortunately, though does show correctly still in the preview with a black and white map overlay around it as before, very odd. Using latest DJI Pilot 2 6.1.1.1.  I'll contact DJI support to see if they can try the same mbtiles and see if they can recreate.
2023-5-16
Use props
LV_Forestry
First Officer
Flight distance : 4726654 ft
Latvia
Offline

Axelz Posted at 5-16 11:25
Thanks I've tried with similar settings from metashape (PNG and smaller total size as far smaller area) and it still crashes unfortunately, though does show correctly still in the preview with a black and white map overlay around it as before, very odd. Using latest DJI Pilot 2 6.1.1.1.  I'll contact DJI support to see if they can try the same mbtiles and see if they can recreate.

If you follow John's instructions with the settings on the screenshot provided, it should work.
Mind the resolution, and I noticed that it also doesn't like datasets with a different vertical datum. Better stick to WGS84 GRS80. This shouldn't matter because MBtiles are 2D but obviously it does. No idea why.
2023-5-16
Use props
Axelz
lvl.4
Flight distance : 3427999 ft
  • >>>
United Kingdom
Offline

LV_Forestry Posted at 5-16 11:28
If you follow John's instructions with the settings on the screenshot provided, it should work.
Mind the resolution, and I noticed that it also doesn't like datasets with a different vertical datum. Better stick to WGS84 GRS80. This shouldn't matter because MBtiles are 2D but obviously it does. No idea why.

Thanks mine is using WGS84 EPSG:3857 so not 100% the same but does display in the preview, I did change co-ordinate system to the same in the screenshot but behaviour still the same unfortunately.  Will see what DJI say when they have tried my tilesets. Cheers.
2023-5-16
Use props
LV_Forestry
First Officer
Flight distance : 4726654 ft
Latvia
Offline

Axelz Posted at 5-16 11:49
Thanks mine is using WGS84 EPSG:3857 so not 100% the same but does display in the preview, I have just logged with DJI and provided my files so they can try them out.  I'll see if i can change to the same co-oordinate system you have used and retry in case that were the issue here.

3857 is normal, it's pseudo mercator. To flatten the map. Otherwise it would be twisted.

The idea is to generate the DME in WGS84 without changing the vertical datum. Then you generate the orthophoto, there you will have no choice. If the DME is WGS84, the ortho will be too.

I'm doing the test to make sure I'm not telling you nonsense. So far I've output DME and Ortho in LKS92 LV14 format, neither works. Then the DME in WGS84 GRS80 format, that works. The file is 300Mb.

And now it's the turn of the 1.63Gb ortho and it works too.  

DSM.JPG Ortho.JPG


I have the same settings as John:
1.JPG
2023-5-16
Use props
Axelz
lvl.4
Flight distance : 3427999 ft
  • >>>
United Kingdom
Offline

LV_Forestry Posted at 5-16 12:05
3857 is normal, it's pseudo mercator. To flatten the map. Otherwise it would be twisted.

The idea is to generate the DME in WGS84 without changing the vertical datum. Then you generate the orthophoto, there you will have no choice. If the DME is WGS84, the ortho will be too.

Thanks for trying, I'm using same co-ordinate and export format settings but still crashing when enabling, preview works fine.[img][/img]
2023-5-16
Use props
LV_Forestry
First Officer
Flight distance : 4726654 ft
Latvia
Offline

Axelz Posted at 5-16 12:11
Thanks for trying, I'm using same co-ordinate and export format settings but still crashing when enabling, preview works fine.[view_image][/img]

So there I am dry. If the preview works but not in the map... I really don't see. Especially since your map is much smaller than mine and the resolution lower.

I suggest you download (the link should be active within 15 minutes, time to upload the file) the map that I used as a screenshot in the previous post and test.

https://failiem.lv/u/6t9z3ckzr

If it works for me but not for you, you can suspect the malfunction of your RC.
2023-5-16
Use props
Axelz
lvl.4
Flight distance : 3427999 ft
  • >>>
United Kingdom
Offline

LV_Forestry Posted at 5-16 12:21
So there I am dry. If the preview works but not in the map... I really don't see. Especially since your map is much smaller than mine and the resolution lower.

I suggest you download (the link should be active within 15 minutes, time to upload the file) the map that I used as a screenshot in the previous post and test.

Thank you, I loaded your overlay in and it did work.  Appears my problem was i was using spaces in the name.  Once I renamed to remove those the tilesets magically appeared in the view!  Appears to be a bug in the application, hopefully fixed with a future release.
2023-5-16
Use props
patiam
Core User of DJI
Flight distance : 1148294 ft
  • >>>
United States
Offline

Axelz Posted at 5-16 12:37
Thank you, I loaded your overlay in and it did work.  Appears my problem was i was using spaces in the name.  Once I renamed to remove those the tilesets magically appeared in the view!  Appears to be a bug in the application, hopefully fixed with a future release.

never, EVER, use spaces in the name or path when doing geospatial work.

EVER.
2023-5-16
Use props
reinisindans
New

Latvia
Offline

Does anyone have any experience creating VECTOR MBTiles?

I successfully use python script to create raster MBTiles from ArcGis project. But the resulting MBTiles files are huge (around 10Gb for Latvia ~ 64 000 sq.km), zoom level 19. Takes around 10hours to generate.

MBTiles can also be written as VECTORS- in this case the size is reduced to something like 500Mb, and generation takes mere minutes. But right now I am struggling with applying styles to the vector MBTiles. Looking for some python libraries that could do it,  or GDAL based solution....



About previous posts concerning coordinate systems- MBTiles EXPECTS EPSG:3857, and might not work with others. Doing a coordinate system transform before trying to generate MBTiles ir recommended (some MBTile generating tools might do it for you internally, though).


Also DJI Pilot 2 has some weird issues- when showing the vector MBtiles, it automatically adds a topological map as baselayer underneath it. And switching the layer 'off' hides the topological baselayer, but the actual vector MBTiles data stays visible....
3-12 07:13
Use props
LV_Forestry
First Officer
Flight distance : 4726654 ft
Latvia
Offline

reinisindans Posted at 3-12 07:13
Does anyone have any experience creating VECTOR MBTiles?

I successfully use python script to create raster MBTiles from ArcGis project. But the resulting MBTiles files are huge (around 10Gb for Latvia ~ 64 000 sq.km), zoom level 19. Takes around 10hours to generate.

You mean vector tile MVT ? Iam not sure Pilot 2 is able to use that file, i will give a try.

The whole country in a single file ! Well even if we have a rather small country iam not sure that is reasonable. Personally i work with LVM and MPS data layer, separate per novads. Much lighter.

Are you in Riga ? We can discuss if needed.
3-12 10:11
Use props
LV_Forestry
First Officer
Flight distance : 4726654 ft
Latvia
Offline

reinisindans Posted at 3-12 07:13
Does anyone have any experience creating VECTOR MBTiles?

I successfully use python script to create raster MBTiles from ArcGis project. But the resulting MBTiles files are huge (around 10Gb for Latvia ~ 64 000 sq.km), zoom level 19. Takes around 10hours to generate.

And another things, forget about 3857 with pilot2. So far as i know 4326 only.
3-12 10:13
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules