Skip to main content

Hi,

I am new to FME.
My question is simple and easy.

I have a field that has multiple lines, FME is not able to read it.
FME Version: 2025.1.1.0
Data set has 5500 records, of those 300 gets rejected as it has multiple lines.

I am trying to create lines. 

 

Sample:

LINESTRING (-122.47510883224778 37.72569214605437, -122.47549442640992 37.72569240767212, -122.47591818521782 37.72543361304484, -122.47615044826871 37.725435814791524, -122.47635018879221 37.72551472908074, -122.4768917047572 37.72596114891507, -122.47722446641976 37.72606220923341, -122.47809062309513 37.726088801447176, -122.47840706343166 37.72604796879034, -122.4788330330602 37.72589235538119, -122.47914970916452 37.72593694003075, -122.47935639456331 37.72605991382738, -122.47998774607001 37.72692786951861, -122.4801298766873 37.727219718364864, -122.4800482518362 37.72746956663917, -122.47983883659106 37.72763905162748, -122.47914598242949 37.72796883327165, -122.47869796921809 37.72821056418619)

 

LINESTRING (-122.49346993299433 37.729596663122, -122.49321579571232 37.72943971440162, -122.49259909667032 37.72909498468726, -122.49223831060141 37.72894065060152, -122.49191228943923 37.72890142577098, -122.4915211778905 37.72894406638576, -122.4910849574167 37.72918061470287, -122.49066273176516 37.729608823948546, -122.49054678472676 37.729652016414136)

 

Thx

NM

 


Hi ​@nmandal ,

It's hard to find the reason for the rejection and a solution unless information about your workspace. Can you elaborate how you are attempting to read the records? It would be better if you would post a screenshot illustrating the workflow on the Workbench Canvas, including the question part.


Your linestrings are in 'OGC Well Known Text’ format.

Use a GeometryReplacer to get the geometry.

 


Hi,
thank you and appreciate your time for me.
I am using WKT and GeometryReplacer.
All works fine except 288 feature has multiple line in a column (line breaker) as given above sample.
I do not know how to handle this issue.

 

 


Use a StringReplacer to remove the Newline character from the attribute.

Text To Replace: Newline (\n), shown as  LF 

Replacement text is empty.


Hi ​@geomancer
thank you again.
I am still getting same issue:
 

 


Thank you for sharing the screenshot.

I believe that the GeometryReplacer (Geometry Encoding: OGC Well Known Text) should work to convert a WKT to a geometry. And, as far as I can see the screenshot below, it's a valid LINESTRING text, unless it contains invalid spetial caracters such as a new line as ​@geomancer mentioned.

Is it true that the transformer rejected this one?

 


Can you provide an example linestring that doesn't work?

Or maybe the linestring is split over several features in your input data?


I am trying to attach rejected data that I load in excel, is being attached here.
Let me figure out how to upload here 


That you ​@takashi and ​@geomancer 
Here is attached zip file with rejected data.
I have formatted name and e-mail addresses for security reason but linestring data is as is ( column Z).
 

@takashi 
Is it true that the transformer rejected this one? ==> Yes


Thank you for providing the data.

Please see the attached workspace.

I'm not sure what I am doing different, but replacing Newline (\n) with nothing works in this workspace, processing your Excel file.

 


Thank you, ​@geomancer ,
It is working for you, Not sure what is wrong with my workSpace.

Let me keep trying with this.

 


@nmandal , thank you for sharing the Excel data, but I wasn’t able to reproduce the issue too.

A possible reason why ​@geomancer ‘s solution didn't work is, the invalid character could be any other whitespace character than \n. If so, this setting in the StringReplacer could be a workaround.

  • Mode: Regular Expression Replace
  • Text to Replace: \s+
  • Replacement Text: <a space>

The regex \s+ matches one or more any whitespace character(s) including <space>, \t, \n, and \r etc.


 

Still not working for me. I am re checking entire data. 

 


The excel file you shared doesn’t actually have line breaks in the line string data. It’s just wrapped for display


Process was:

Pull data into table ‘A’ using API call
Use Table ‘A’ as source to split data for 3 feature class, point, line and polygon.

Now, pulling data directly from API for line, same data, it works.
Looks like moving data to table might have create some kind of issue.
Any way it works now.
Thank you ​@takashi and ​@geomancer for your attentioon.