Skip to main content
Hi

 

 

I have a project that converts a GML file into 6 individual shapefiles. I have mapped all the attributes from the GML file to different names in the shapefile in order to comply with the 10 character limit e.g -

 

 

featurecode > featcode

 

versiondate > date

 

 

Now I want to name the shapefile dynamically from a publish parameter so I used the attribute creator to create a new attribute called "feature_name" with the value:

 

 

$(name)_TopographicArea

 

 

and this outputs a shapefile with the correct name. so far so good......

 

 

The problem is the shapefile now contains multiple additional attributes that I didn't select or want in the resulting shapefile. How do i retain the schema mappings that I made?

 

 

Any ideas?

 

 

Mike

 

 

Hi Mike,

 

 

I guess you are using fanout option on the Shape writer and there are differences among schemas of the 6 writer feature types. If so, I think there are two possible ways. 1) Not use fanout. Create 6 writer feature types and configure schemas (user attributes) separately. 2) Use Dynamic Schema functionality with a schema definition table. You can set "fme_feature_type" to distinguish each destination feature type.   To learn more about the 2nd way, see Examle 3 in this documentation. Dynamic Schema Examples http://fmepedia.safe.com/articles/Samples_and_Demos/Dynamic-Schema-Examples-FME2011

 

 

Takashi
Would an AttributeRemover before the writer work?

Reply