Skip to main content

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

 

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

 


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.

 


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.


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


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.


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


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

Hi @mdk and @kailinatsafe !

Can you send me a link to that documentation please ? I don’t see anything about EXIF in the JPEG writer or Raster documentations…

And do you think the Z can be integrated in the EXIF attributes ? That would be useful in a software like Google Earth.

Thanks !


Hello @philippeb, thank you for commenting! Sorry you’ve been unable to find the documentation, are you able to access it here? The information is found in the Feature Representation section of the documentation.

I don’t think JPEG supports z values, only x & y. Are you looking to store the elevation value at which the JPEG image was captured? If so, would the jpeg_exif_gpsaltitude work? This format attribute stores the altitude, based on the reference (in meters). Happy to help, Kailin.


Hello @philippeb, thank you for commenting! Sorry you’ve been unable to find the documentation, are you able to access it here? The information is found in the Feature Representation section of the documentation.

I don’t think JPEG supports z values, only x & y. Are you looking to store the elevation value at which the JPEG image was captured? If so, would the jpeg_exif_gpsaltitude work? This format attribute stores the altitude, based on the reference (in meters). Happy to help, Kailin.

Thanks for that doc! There should be a link pointing there in the JPEG writer’s doc, I think.

jpeg_exif_gpsaltitude is perfect!

Have a nice day!


Reply