# Correct altitude in image metadata, incorrectly read by Pix4D Mapper

**URL:** <https://community.pix4d.com/t/correct-altitude-in-image-metadata-incorrectly-read-by-pix4d-mapper/15461>\
**Category:** PIX4Dmapper\
**Created:** [November 13, 2020, 9:47am UTC](https://community.pix4d.com/t/correct-altitude-in-image-metadata-incorrectly-read-by-pix4d-mapper/15461 "2020-11-13T09:47:03Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![chinouichanco](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@chinouichanco](https://community.pix4d.com/u/chinouichanco)\
**Post date:** [November 13, 2020, 9:47am UTC](https://community.pix4d.com/t/correct-altitude-in-image-metadata-incorrectly-read-by-pix4d-mapper/15461/1 "2020-11-13T09:47:03Z")

</div>

The DSMs produced from images from my Mavic Air are always in the negative by a few tens of meters.

These used to be processed on Pix4D cloud. My first time to process on Pix4D mapper, the same thing happens. However, the Mapper shows you more things and I noticed that it was incorrectly reading the image metadata. On the file itself, the altitude is correct (50 meters), but when imported for processing, the software reads it all as 1.2 meters. See image below.

 ![Files1](https://global.discourse-cdn.com/pix4d/original/2X/c/ce711dd17da0513ae0451bba1f085d21953ee0e8.jpeg)

So when the data set is processed, negative surface elevations will be the result. The bandaid solution is to manually correct the altitude on mapper before it starts processing, but this is only feasible for a small data set and not for data with hundreds of images. How can this be corrected automatically?

---

<div class="post-metadata">

**Author:** ![Beata](https://sea2.discourse-cdn.com/pix4d/user_avatar/community.pix4d.com/beata/32/187_2.png) [@Beata](https://community.pix4d.com/u/Beata)\
**Post date:** [November 13, 2020, 10:12am UTC](https://community.pix4d.com/t/correct-altitude-in-image-metadata-incorrectly-read-by-pix4d-mapper/15461/2 "2020-11-13T10:12:32Z")

</div>

Hi @chinouichanco,

Could you please share here with us one picture from your dataset? We’ll examine the EXIF file.

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![chinouichanco](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@chinouichanco](https://community.pix4d.com/u/chinouichanco)\
**Post date:** [November 13, 2020, 10:56am UTC](https://community.pix4d.com/t/correct-altitude-in-image-metadata-incorrectly-read-by-pix4d-mapper/15461/3 "2020-11-13T10:56:26Z")

</div>

Uploading the file results in error. Please find a link to the file below.  
[](https://dl.dropboxusercontent.com/s/b5ektxc4t98fsg2/DJI_0517.JPG?dl=0)

As follow up, I ran the data with the corrected altitude from the image metadata and the products were good.

---

<div class="post-metadata">

**Author:** ![Beata](https://sea2.discourse-cdn.com/pix4d/user_avatar/community.pix4d.com/beata/32/187_2.png) [@Beata](https://community.pix4d.com/u/Beata)\
**Post date:** [November 13, 2020, 11:38am UTC](https://community.pix4d.com/t/correct-altitude-in-image-metadata-incorrectly-read-by-pix4d-mapper/15461/4 "2020-11-13T11:38:45Z")

</div>

Thank you.

For DJI drones, we read the XMP Absolute Altitude tag. In your case, there is +1.20.  
 ![image](https://global.discourse-cdn.com/pix4d/original/2X/5/52790d47eee2e4814eb3f48a615f3516227c177a.png)

While the correct value is in EXIF GSP Altitude tag.  
 ![image](https://global.discourse-cdn.com/pix4d/original/2X/c/c2a67592d1ed70c33677213ecfa4a2d8de0cb482.png)

For datasets like this, you can edit the altitude of all the images together in the Image Properties Editor to 50m by:

1. Right-click one cell of the column.
2. Click **Edit All Altitudes / Horz. Accuracies / Vert. Accuracies**.
3. Type the new value.
4. Click Enter or click outside the cell.

Cheers!

---

<div class="post-metadata">

**Author:** ![chinouichanco](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@chinouichanco](https://community.pix4d.com/u/chinouichanco)\
**Post date:** [November 13, 2020, 11:58am UTC](https://community.pix4d.com/t/correct-altitude-in-image-metadata-incorrectly-read-by-pix4d-mapper/15461/5 "2020-11-13T11:58:27Z")

</div>

Hi Beata,

Thank you for this. A couple of follow-up questions:

1. Is there a way to correct the value showing up in the XMP Absolute Altitude tag? Is this an error with the drone firmware or GPS?
2. Motivating the first question, is a difference of 0.1 or 0.2 meters in altitude negligible? The Edit All Altitude function looks like a quick and easy fix, but the GPS altitudes of the input images vary. Most are 50.0, but a handful are 49.8 and 49.9.

---

<div class="post-metadata">

**Author:** ![Beata](https://sea2.discourse-cdn.com/pix4d/user_avatar/community.pix4d.com/beata/32/187_2.png) [@Beata](https://community.pix4d.com/u/Beata)\
**Post date:** [November 16, 2020, 8:43am UTC](https://community.pix4d.com/t/correct-altitude-in-image-metadata-incorrectly-read-by-pix4d-mapper/15461/6 "2020-11-16T08:43:57Z")

</div>

Hi,

Thank you for your reply.

1. Yes, this value can be wrong due to firmware issues. Could you update the firmware and let me know how it goes?
2. It depends on the Vertical Accuracy you defined in the _Image Properties Editor._ If the altitude varies by 10, 20 cm. Set at least 25 cm in _Accuracy Vert_.

Best!

---

<div class="post-metadata">

**Author:** ![chinouichanco](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@chinouichanco](https://community.pix4d.com/u/chinouichanco)\
**Post date:** [November 20, 2020, 6:23am UTC](https://community.pix4d.com/t/correct-altitude-in-image-metadata-incorrectly-read-by-pix4d-mapper/15461/7 "2020-11-20T06:23:22Z")

</div>

Hi Beata,

The DJI app tells me that the firmware is updated. So I’m at a loss as to how to possibly fix that issue.

Regards,

---

<div class="post-metadata">

**Author:** ![Beata](https://sea2.discourse-cdn.com/pix4d/user_avatar/community.pix4d.com/beata/32/187_2.png) [@Beata](https://community.pix4d.com/u/Beata)\
**Post date:** [November 24, 2020, 3:57pm UTC](https://community.pix4d.com/t/correct-altitude-in-image-metadata-incorrectly-read-by-pix4d-mapper/15461/8 "2020-11-24T15:57:51Z")

</div>

Hi,

@chinouichanco, we could have a deeper look into the issue, but we would need at least 3 images to create a project and information which app did you used to acquire the images.

Let me know if you are willing to send them to us.

Best!

---

<div class="post-metadata">

**Author:** ![chinouichanco](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@chinouichanco](https://community.pix4d.com/u/chinouichanco)\
**Post date:** [November 25, 2020, 10:03am UTC](https://community.pix4d.com/t/correct-altitude-in-image-metadata-incorrectly-read-by-pix4d-mapper/15461/9 "2020-11-25T10:03:07Z")

</div>

Hi Beata,

Please find the project files here: [Dropbox - File Deleted](https://www.dropbox.com/sh/vm08nsuilhlz733/AADp8cEMxsZEyA-dgpLbaHXFa?dl=0)

No problem in sharing these images as this was really a test flight since this is a recurring issue. I used the Pix4D app on iOS (iPad mini 5) to acquire the images and the Pix4D Desktop software to process.

Thanks again.

---

<div class="post-metadata">

**Author:** ![Beata](https://sea2.discourse-cdn.com/pix4d/user_avatar/community.pix4d.com/beata/32/187_2.png) [@Beata](https://community.pix4d.com/u/Beata)\
**Post date:** [November 26, 2020, 12:54pm UTC](https://community.pix4d.com/t/correct-altitude-in-image-metadata-incorrectly-read-by-pix4d-mapper/15461/10 "2020-11-26T12:54:55Z")

</div>

Hi,

Thank you for the dataset. I’ll come back to you at the beginning of next week. I need additional time to check the issue with our developers.

Best!

---

<div class="post-metadata">

**Author:** ![Beata](https://sea2.discourse-cdn.com/pix4d/user_avatar/community.pix4d.com/beata/32/187_2.png) [@Beata](https://community.pix4d.com/u/Beata)\
**Post date:** [December 8, 2020, 9:03am UTC](https://community.pix4d.com/t/correct-altitude-in-image-metadata-incorrectly-read-by-pix4d-mapper/15461/11 "2020-12-08T09:03:44Z")

</div>

Hi @chinouichanco,

My apologies for the delay. However, I finally got an answer to your question. To our knowledge the Xmp.drone-dji.AbsoluteAltitude can be wrong (ex: 1.5 m) due to the bad firmware. Therefore, this issue can be considered as a bug to which we don’t have any other solution than correct altitudes manually or re-tagged them. It looks like our hands are tied. I’m sorry about this situation.

Regards

---

<div class="post-metadata">

**Author:** ![chinouichanco](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@chinouichanco](https://community.pix4d.com/u/chinouichanco)\
**Post date:** [December 8, 2020, 12:39pm UTC](https://community.pix4d.com/t/correct-altitude-in-image-metadata-incorrectly-read-by-pix4d-mapper/15461/12 "2020-12-08T12:39:53Z")

</div>

Hi @Beata,

No problem, thank you for getting back to me. This is firmware on the drone that you’re referring to, right? In which case, perfectly understandable that a fix isn’t available from your end. Will try to look around the internet for a fix, or reset the drone maybe?

Either way, the camera on the DJI Mavic Air is rather inadequate for DSMs anyway. We fly it as backup to a Mavic Pro 2 which has better output. Retagging won’t be too much of a problem.

Thanks again!
