Please select Into the mobile phone version | Continue to access the computer ver.
Pilot 2 MBTiles import
12706 19 2023-3-20
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.2
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
Second Officer
Flight distance : 3717720 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 : 14031719 ft
  • >>>
United States
Online

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
Second Officer
Flight distance : 3717720 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
Second Officer
Flight distance : 3717720 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
Second Officer
Flight distance : 3717720 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
Second Officer
Flight distance : 3717720 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 : 1156358 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
lvl.1
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....
2024-3-12
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.
2024-3-12
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.
2024-3-12
Use props
Taddpole808
lvl.2
Flight distance : 264711 ft
United States
Offline

Hello! Excellent directions and gets my georeferenced PDF on nicely. One question I have is about the zoom level. No matter what I change it to, I can only see the custom baselayer when zoomed in very close. If I set the zoom level to 20, it will crash dji pilot 2. Any help would be great! Thank you.

Eli
2024-7-30
Use props
Stijn Moke
lvl.2
Belgium
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.

Hi
New here...
I have some questions. I'm no GIS expert at all, but i do am an IT'er.
My friend has some basic skills in GIS and does work in arcgis as well.
He wanted to create a layer for me, so i can have a raster on my dji remote...

Yesterday we tried for the first time.
He told me he wasnt able to create MBTiles from arcgis. Is there no way to do this in arcgis?
He had to do it with with qgis i think (not sure).
So he created an MBTiles layer from there.
He imported it again and told me the labels were gone in the layer.
So he said the file would show as wanted (labels is a must).

He gave me the file and i imported it in dji.
However, the layer totally didnt show up as wanted.
It seems the pilot app adds a baselayer underneath the imported MBTiles map. Very strange.

Is there a guide somewhere how to create a correct layer? OR some rules/best practices guides ? (with settings).

Would appreciate that a lot.
We are both working at a firedepartment and we need some extra layers (a raster is a must anyhow).
Thanks in advance.
2024-12-22
Use props
LV_Forestry
First Officer
Flight distance : 4726654 ft
Latvia
Offline

Stijn Moke Posted at 12-22 02:13
Hi
New here...
I have some questions. I'm no GIS expert at all, but i do am an IT'er.

You have to start by putting the layers in the right order and then generating an MBTILE. It seems so simple to me that I may not have understood your problem. Don't hesitate to elaborate if the question goes beyond that.

1.JPG





2024-12-23
Use props
nicolas.soenens
lvl.1
Belgium
Offline

LV_Forestry Posted at 2024-12-23 09:19
You have to start by putting the layers in the right order and then generating an MBTILE. It seems so simple to me that I may not have understood your problem. Don't hesitate to elaborate if the question goes beyond that.

[view_image]

Hello, I am the person who would like to make the MBTiles.
The explanation is not quite correct:

- We would like to create MBTiles from a grid with label from a SHP.
-Steps:
++ Project in QGIS: CRS 3857
++ Load SHP and only attribute that will serve as label.          I select only the layer I want to transfer to MBTiles.

++ Go to Processing->Raster properties->XYZ tiles creation (MBTiles)
++ Enter range: working area (EXTENT)
       I chose ‘Calculate from layer’

++ Enter minimum and maximum zoom (0-100) (ZOOM_MAX & ZOOM_MIN)
      I chose 17-23  
++ Enter DPI (96 by default) in forums they also go to 150 DPI (DPI)
      I chose 96 (Default)

++ Enable antialiasing (ANTIALIAS)
     Currently checked (Default)

++ Tile format: JPG or PNG (TILEFORMAT)
      I chose JPG

++ Quality JPG defaults to 75 (1-100) (QUALITY))
      I chose 75 (Standard)

++ Size of Metatile (1-20) (METATILESIZE)
     I chose 4 (Default)

When loading the layer in DJI PILOT2 APP we have an error.



We can see the file on the screen but loading is not possible.

1-7 00:09
Use props
nicolas.soenens
lvl.1
Belgium
Offline

nicolas.soenens Posted at 1-7 00:09
Hello, I am the person who would like to make the MBTiles.
The explanation is not quite correct:

I found the problem:

Thanks to another forum: There is a bug in QGIS 3.36 with the mbtiles tool. Go back to 3.32 and it will work.

And. so it is!
It works immediately!
1-8 07:16
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules