Skip to main content
Is is possible to expose a jpeg attribute on a dynamic writer?  I have a workbench that extracts the GPS coordinates from jpeg exif data (taken with a GPS camera) and plots the positions as a points feature class.  I need certain attributes exposed, e.g. exif_gps_latittude. Can the set the dynamic writer to expose them?

 

 

Also, liking the new forum!
We had the same problem with AutoCAD. In this case we added a plein autocad writer to set all the parameters for the gerneric writer - don't know if you need settings as well.

 

 

then we added an attributecreator to manually add the format specific attributes. for acad it worked so it should work for you as well...

 

 


Thanks for the reply Heinz.  

 

 

I have a generic writer, with the source datatype set to jpeg, however, I'm not clear on using the AttributeCreator.  I put this after the Generic Writer, and set up a new attribute with the same name an as attribute in the jpeg with a blank value (k), is this what you meant?
The easiest might be to expose the needed attributes (such as exif_gps_latittude) in the Reader, and then use an AttributeRenamer in your workspace to rename them into something that has been defined in the Generic Writer.

 

 

David
Amit - on a related note,

 

How did you manage to extract the GPS information from the JPEG to create points? Do you remember what transformers you used?
Hi,

 

 

The photos did not have GPS attributes, they were collected along a rail track and had a meterage.  I created a Route Event workspace to plot them along the line based on this value.

 

 

To export out GPS photos there is a JPEGGPSPointReplacer transformer in the FME store, but if you want to build it yourself, I've done it using below:

 

 

Expose jpeg_exif_gpslatitude + latitude, and gpsimgdirection (if camera has a compass)

 

Tester to check if Lat or Long has zero value, which fail/write out to spreadsheet

 

Geometry Remover (removes photo, you are just generating points)

 

String Replacers to remove brackets for example, e.g. (30) (25) (16) becomes 30 25 16 for lat and long

 

AttributeSplitters, split on space to create lat_list and long_list

 

ExpressionEvaluators to calculate decimal values, e.g. lat_list(0) + lat_list(1)/60 + lat_list(2)/36000

 

AttributeReprojecter

 

2DPointReplacer.

 

 

If you want to generate drive links, use a Stringconcatenator or you could use a File and Pathnames reader and FeatureMerge on the fme_basename.

 

 

Hope that makes sense!

 

 

 

 

 

 

 

 

 

 

 

 

 


Reply