Question

Split text

  • 8 April 2014
  • 4 replies
  • 7 views

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

i use attribute spliter, with paramters:

 

atribute to split: fme_text:string

 

deliminter: space

 

but, i dont know how to get layers from that.
Badge +3
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
Userlevel 2
Badge +17
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
Userlevel 2
Badge +17
typo...

 

AttributeValueMapper

Reply