Skip to main content

I have a number of feature classes read from a geodatabase, each FC written as a sheet in an excel spreadsheet. Using a dynamic reader/writer to do this, dynamic schema from the src geodatabase.

I'd like to add long/lat fields to all of the point features and have that in the output excel. The source data schema of course doesn't have this. I've tried adding a long and lat field to the excel file sheets that are relevant, and then using the schema reader to create a schema feature to pull the orig schema + lat/long fields to pass to the dynamic writer. FME doesn't complain but I am not getting long/lot values written out in the final data.

I feel like I'm missing something simple if anyone can imagine what that might be!

Hi @jeovis,

  1. You have to extract coordinates (lat, long) from the point geometries as feature attributes using the CoordinateExtractor.
  2. If the long/lat should always be added to the destination feature type, you can just add them to the destination schema through the User Attributes tab in the writer feature type.


Hi @jeovis,

  1. You have to extract coordinates (lat, long) from the point geometries as feature attributes using the CoordinateExtractor.
  2. If the long/lat should always be added to the destination feature type, you can just add them to the destination schema through the User Attributes tab in the writer feature type.

[Addition] If you need to derive the destination schema from an external dataset (e.g. an existing Excel file) with some reason, you can also read it as a Workspace Resource, rather than using the Schema reader. See here to learn more.

 


Hi @jeovis,

  1. You have to extract coordinates (lat, long) from the point geometries as feature attributes using the CoordinateExtractor.
  2. If the long/lat should always be added to the destination feature type, you can just add them to the destination schema through the User Attributes tab in the writer feature type.

Sorry, didn't mention but yes, using coordinate extractor to get the coordinates, have added them to the dynamic writer as attributes. I just can't get them to appear in the output excel sheets (tho they appear as I'd expect on the point feature classes when redirected to inspector).

 

Am using 'Dynamic Schema Definition' with schema sources set to the geodatabase reader. This works fine until I want to add the additional long/lat attributes not found in the source data.

 

I'll read up on workspace resources

 

 

 


Sorry, didn't mention but yes, using coordinate extractor to get the coordinates, have added them to the dynamic writer as attributes. I just can't get them to appear in the output excel sheets (tho they appear as I'd expect on the point feature classes when redirected to inspector).

 

Am using 'Dynamic Schema Definition' with schema sources set to the geodatabase reader. This works fine until I want to add the additional long/lat attributes not found in the source data.

 

I'll read up on workspace resources

 

 

 

Have you added "lat" and "long" to the dynamic writer feature type as additional user attributes?

 

 


Have you added "lat" and "long" to the dynamic writer feature type as additional user attributes?

 

 

Y, I have. It sounds like this should be working the way I'd expect it to. I'll start again with a blank workspace.

 

 


So, I started with a fresh workspace and everything worked as expected.

 

Use dynamic reader and writer, dynamic writer schema sources from the source data, add the lat and long coordinates (and those only) as user attributes. No excel template files, drop/truncate existing sheets set to yes.

 


Reply