Skip to main content
Question

Exposing jpeg attributes on a generic writer

  • November 14, 2012
  • 5 replies
  • 17 views

Forum|alt.badge.img
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!

5 replies

Forum|alt.badge.img+1
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...

 

 


Forum|alt.badge.img
  • Author
  • November 14, 2012
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?

david_r
Celebrity
  • November 14, 2012
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

  • December 13, 2013
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?

Forum|alt.badge.img
  • Author
  • December 16, 2013
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!

 

 

 

 

 

 

 

 

 

 

 

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings