Insert photo location/GPS data from android phones

Hey there,

I’m wanting to extract GPS data from photos and use them in Civil 3D like in the example below:

This is working perfectly, however it only works with photos taken on Apple phones (or at least not on the android phones I’ve tried).This is how it should look in Civil 3D
Apple GPS data

And this is what I get with uploading from my Pixel 3
image

The rotation data seems to work, but the GPS data is all the same for every picture (it’s different in picture properties).

Could I break the script down more to be able to extract GPS data from both Apple and Android phones at the same time?

New to this, so hope this makes sense :slight_smile:
Insert Photo Map Location Example.dyn (33.2 KB)

Thanks!

Your script worked fine for me :slight_smile: maybe the phone had a GPS problem. You can maybe do a spot check on the exif data and see if they all have the same coordinates. My phone didn’t record the angle for these pics but the location aspect works.

image

2 Likes

Found pictures with a newer phone which has rotation and the script works as well for me.

1 Like

That’s weird… I did check the exif and they were all different, so not sure whats happening there. I’ll give it a go with some other files and see how it goes. Seems like it’s just my phone then.

Thanks for testing this for me! :slight_smile:

This was discussed awhile ago in the Civil 3D Toolkit thread. Search ‘Android’ within the thread and you’ll see the posts.

2 Likes

Olá, boa noite. Claro, aqui está a tradução para o inglês:


Hello, good evening. How are you, my friend?

I am an extremely inexperienced Dynamo user. I am trying to apply this routine in my office to create photographic reports, but I am not succeeding.

Besides the Dynamo routine, what else do I need to do on my computer to be able to open the photos in the correct location? Please, I am very inexperienced. I know nothing about the subject.

Hi and welcome.
Are the photos georeferenced when taken? That’s all that have to be done.
What I have seen is that for photos from Android, I can’t read the direction which I can from photos taken from IOS.
Can you share your graph and then we can investigate and help you in a better way.
Best,
Patrick

Good morning, my friend!

I have two types of photos here. The first type are photos taken from a drone, model “Phantom 4 Pro.”

The second type are photos taken from cell phones, two models: one Android and one iOS.

I would like to be able to import them into Civil3D using the Dynamo routine. Since I work with topographic surveys, this would greatly help me when making drawings on the computer, having photos of the locations where the information might be more confusing.

Besides the Dynamo routine, do I need to have anything else installed on the computer? For example, some program that reads Python code to be able to read the images? Or would just the Dynamo routine be sufficient?

I apologize for my English. I don’t know how to speak it, and I am using ChatGPT to do the translations here.


Do you know if the images have GIS location data on them? Once uploaded to forums and other indirect file sharing services such data is stripped out. The original images need to be transferred directly in most cases as a result.

Good afternoon, my friend. Yes, the images do have geographic data. Here is a screenshot of the image properties.

Should be able to use the graph above in Dynamo then - what issues do you see when you try it?

Actually, I was testing the routine yesterday and couldn’t get it to work. Today, when testing the routine, everything is working fine. It is importing the photos correctly.

I only have the issue that the created block is not rotated to the direction the photo was taken. (these photos were taken with an Android phone)

I will still test with iOS to see if the block’s orientation will be correct.

And I have seen in some comments above that it is necessary to study something related to Android to make the cameras capture the rotation, right?

Perhaps, but I haven’t played with any of this as i don’t have sufficient data.

1 Like

Maybe the default camera app don’t save the angle. Also I’ve noticed in the past (I am not sure if it is still this way) that the camera app only collects the Lat and Lon when opening the app, so that all photos have the same location if you don’t close the app in between.

There are other camera apps, also open source and free, which do save the correct Lat, Lon and angle in the photo.

1 Like