Skip to main content
Question

Split text


Hi,

 

i have dgn with text  28 362 49 5036 in one layer, and i need to get four layer, so number 28 goes to layer 1, nuber 362 goes to layer 2, number goes to layer 3, and number 5036 goes to layer 4. Have any idea? TNx

 

 

4 replies

  • Author
  • April 8, 2014
i use attribute spliter, with paramters:

 

atribute to split: fme_text:string

 

deliminter: space

 

but, i dont know how to get layers from that.

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • April 8, 2014
Hi,

 

 

If the numbers are orderd in coliumns, that is 1st number always goes to same layer etc..

 

U can us a stringsearcher and capture (coorect term for tcl is "report") the numebers:

 

 

in stringsearcher , use regexp : (\\d)\\s(\\d)\\s(\\d)\\s(\\d)

 

on the stringsearcher expose _matched_parts{} 0-3

 

 

You can then rename the features ("layers" as you called them)

 

 

You can also use a splitter (like Nika said), delimitter is a space. The atributes wil recide in a list after this.

 

expose thes :_list{} 0-3 etc. 

 

 

 

Gio

takashi
Influencer
  • April 9, 2014
Hi,

 

 

You can use the AttributeMapper to create desired layer name attribute (1, 2, 3, 4) corresponding to each text value (28, 362, 49, 5036). And then use fanout option of the writer to write them seperately into different layers of destination dataset.

 

 

Takashi

takashi
Influencer
  • April 9, 2014
typo...

 

AttributeValueMapper

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