Skip to main content
Solved

excel manipulate

  • September 13, 2021
  • 2 replies
  • 6 views

mr_fme
Enthusiast
Forum|alt.badge.img+8

I have a table that i managed to extract 2 coordinates, but the coordinates don't show up for all rows how can i do this? Another question is that I'm going to process several files with different values ​​for these two fields, how can I repeat the values ​​for each different file too?

 

 

 

Thanks

 

Best answer by caracadrian

Set up the Reader Parameters:

  • Delimiter Character ,
  • Field Names Line 15
  • Data Start Line 1

CSV Line 15Use a Tester to split the feature flow in 2. Test Clause: Year, Type Is, Numeric.

Passed features go to a FeatureMerger Requestor port.

Failed features go to another Tester to isolate Location. Test Clause: Year, Contains, Location

Use Attribute Splitter on YEAR attribute with Delimiter ser to " " (space) and Drop Empty Parts: Yes

Send them to AttributeManager to create Latitude=_list{2} and Longitude=_list(4)

You can either send that to VertexCreator to Replace with Point X=Long, Y=Lat or just skip it

This feature will go to the Supplier port of the FeatureMerger you sent the features from the first Tester, set to joint 1 to 1 and Merge Type Attributes and Geometry, if you used VertexCreator, or Attributes Only if you didn't.

I have attached a workspace that does this on the sample you provided.

 

To process multiple files use a PATH Reader with Path Filter Parameter set to *.csv and send the flow to a FeatureReader set as CSV, Accumulatin Mode set to Merge Initiator and Result and the settings from above followed by an AttributeExposer in which you insert the Column Names from row 15 then continue to the workflow above with the minor change that in Feature Merger you use the filemane attribute.

View original
Did this help you find an answer to your question?

2 replies

caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • Best Answer
  • September 14, 2021

Set up the Reader Parameters:

  • Delimiter Character ,
  • Field Names Line 15
  • Data Start Line 1

CSV Line 15Use a Tester to split the feature flow in 2. Test Clause: Year, Type Is, Numeric.

Passed features go to a FeatureMerger Requestor port.

Failed features go to another Tester to isolate Location. Test Clause: Year, Contains, Location

Use Attribute Splitter on YEAR attribute with Delimiter ser to " " (space) and Drop Empty Parts: Yes

Send them to AttributeManager to create Latitude=_list{2} and Longitude=_list(4)

You can either send that to VertexCreator to Replace with Point X=Long, Y=Lat or just skip it

This feature will go to the Supplier port of the FeatureMerger you sent the features from the first Tester, set to joint 1 to 1 and Merge Type Attributes and Geometry, if you used VertexCreator, or Attributes Only if you didn't.

I have attached a workspace that does this on the sample you provided.

 

To process multiple files use a PATH Reader with Path Filter Parameter set to *.csv and send the flow to a FeatureReader set as CSV, Accumulatin Mode set to Merge Initiator and Result and the settings from above followed by an AttributeExposer in which you insert the Column Names from row 15 then continue to the workflow above with the minor change that in Feature Merger you use the filemane attribute.


mr_fme
Enthusiast
Forum|alt.badge.img+8
  • Author
  • Enthusiast
  • September 14, 2021

Hi, @caracadrian​ 

 

Thank´s for your attention. Solved my problem.

 

Sorato


Reply


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