Solved

excel manipulate

  • 13 September 2021
  • 2 replies
  • 1 view

Badge +6

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

 

icon

Best answer by caracadrian 14 September 2021, 07:15

View original

2 replies

Badge +20

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.

Badge +6

Hi, @caracadrian​ 

 

Thank´s for your attention. Solved my problem.

 

Sorato

Reply