Question

GeoTag Photo

  • 19 February 2021
  • 6 replies
  • 38 views

Badge +3

Hello there we have Millions of JPG Photo we want to geotag

all the metadata is located in an excel file

is there a way to do this via FME

Thanks

 


6 replies

Userlevel 6
Badge +31

According to the documentation you can, using the JPEG (Joint Photographic Experts Group) writer. I think you need 2018 or higher.

 

jpeg_exif_gpslatitude

Represents the latitude.

It is expressed as three numbers giving the degrees, minutes, and seconds, respectively.

 

jpeg_exif_gpslatituderef

This indicates whether the latitude is north or south.

Value:

N – north latitude

S – south latitude

 

jpeg_exif_gpslongitude

Represents the longitude.

It is expressed as three numbers giving the degrees, minutes, and seconds, respectively.

 

jpeg_exif_gpslongituderef

This indicates whether the longitude is east or west.

Value:

E – east longitude

W – west longitude

 

Badge

According to the documentation you can, using the JPEG (Joint Photographic Experts Group) writer. I think you need 2018 or higher.

 

jpeg_exif_gpslatitude

Represents the latitude.

It is expressed as three numbers giving the degrees, minutes, and seconds, respectively.

 

jpeg_exif_gpslatituderef

This indicates whether the latitude is north or south.

Value:

N – north latitude

S – south latitude

 

jpeg_exif_gpslongitude

Represents the longitude.

It is expressed as three numbers giving the degrees, minutes, and seconds, respectively.

 

jpeg_exif_gpslongituderef

This indicates whether the longitude is east or west.

Value:

E – east longitude

W – west longitude

 

Did you ever figure out how exactly to format the exif attribute for latitude and longitude?

I have tried the following;

(@Value(lat_degrees)/1),(@Value(lat_minutes)/1),(@Value(lat_seconds)/1)

as documented here;

https://www.awaresystems.be/imaging/tiff/tifftags/privateifd/gps/gpslatitude.html

But it writes a large negative number for all three values in the actual exif jpeg writer!

How are the 3 values supposed to be presented?

What am I doing wrong? This seems to be way harder than it needs to be.

 

Userlevel 2
Badge +13

Did you ever figure out how exactly to format the exif attribute for latitude and longitude?

I have tried the following;

(@Value(lat_degrees)/1),(@Value(lat_minutes)/1),(@Value(lat_seconds)/1)

as documented here;

https://www.awaresystems.be/imaging/tiff/tifftags/privateifd/gps/gpslatitude.html

But it writes a large negative number for all three values in the actual exif jpeg writer!

How are the 3 values supposed to be presented?

What am I doing wrong? This seems to be way harder than it needs to be.

 

Hello @mdk​ , thanks for posting here. I decided to give this a go, hopefully this solution will also work well for you too! From our documentation, it looks like the 4 attributes to consider are:

  • jpeg_exif_gpslatitude
  • jpeg_exif_gpdlongitude
  • jpeg_exif_gpslatituderef
  • jpeg_exif_gpslongituderef

 

Two of these need to be formatted in DMS, and the other two are cardinal directions (eg. N, E, W, etc.) for lat/long reference. Once we use the DMSCalculator, we can combine the DMS values with a StringConcatenator. You should see the output show up at the Safe Software Headquarters.

 

PhotoLocation 

I noticed, while writing, the output isn't shown in the Visual Preview window properly, but you can validate its location with this photo location tool afterwards (like above). Let me know if you have any questions about the workspace. Happy to help, Kailin.

Badge

Did you ever figure out how exactly to format the exif attribute for latitude and longitude?

I have tried the following;

(@Value(lat_degrees)/1),(@Value(lat_minutes)/1),(@Value(lat_seconds)/1)

as documented here;

https://www.awaresystems.be/imaging/tiff/tifftags/privateifd/gps/gpslatitude.html

But it writes a large negative number for all three values in the actual exif jpeg writer!

How are the 3 values supposed to be presented?

What am I doing wrong? This seems to be way harder than it needs to be.

 

Kailin: Thanks for the reply, but that did not address my question. My question was how the 3 numbers need to be presented to the jpeg writer to be written correctly into the exif tag. By trial and error I found they need to be separated by a space, ddd mm ss.ssss

I still have not found this stated as such in any documentation which I find weird!

m

Userlevel 2
Badge +13

Did you ever figure out how exactly to format the exif attribute for latitude and longitude?

I have tried the following;

(@Value(lat_degrees)/1),(@Value(lat_minutes)/1),(@Value(lat_seconds)/1)

as documented here;

https://www.awaresystems.be/imaging/tiff/tifftags/privateifd/gps/gpslatitude.html

But it writes a large negative number for all three values in the actual exif jpeg writer!

How are the 3 values supposed to be presented?

What am I doing wrong? This seems to be way harder than it needs to be.

 

Hello @mdk​ , sorry for not addressing the initial question! I had luck setting up the following: "122; 50; 32.36280000000261" (with a semicolon and a space seperating each value, "D; M; S").

 

However, I spoke with development, values can be formatted like "D M S", a space should be good enough to delimit the values. I will create a ticket for us to update our documentation. Thanks for brining this to our attention! Here to help, Kailin.

Badge

Thanks Kailin. Yes please document that! It was not even clear in the exif documentation itself how that should be structured!

Reply