Skip to main content
Question

How to filter single elements of a string and save as shp-file?


Forum|alt.badge.img

Hi, I have a shp-file with 99 buslines. the Attribute is line and the Features are 141,166,171..etc.(devided by a comma) my output should be 99 shp-files whose each includes one single line. The problem is on the inspector i can find any single value, but with the attributefilter i only find some where my value is at the beginning or stands alone. Any ideas how i can manage that issue? Thx

4 replies

takashi
Influencer
  • March 13, 2018
If a line feature has "141,166,171" as its attribute (bus-line numbers?), for example, do you need to create three copies of the line and write them into different Shapfile files according to each line number?

 


Forum|alt.badge.img

yes exactly. this are the bus numbers and i need for each number(line) an extra shapefile. i got a big table with 99buses.. if i use the attribute filter it won't recognize the number when it's written in the middel of the string.. 141,151 would work! but 131,141,151 don't work with attribute filter.. but it works on the inspect table search :) any ideas?


takashi
Influencer
  • March 13, 2018

If I understand the requirement correctly, this would be a solution.

  1. AttributeSplitter: Split the comma-separated value and create a list attribute, each element of the list is a single bus line number.
  2. ListExploder: Explode the feature on the list. After that, each feature has a single bus-line number.
  3. Shapefile writer feature type: Configure destination file name using the bus-line number attribute, so that resulting files will be created for each bus-line (Feature Type Fanout).

Forum|alt.badge.img
takashi wrote:

If I understand the requirement correctly, this would be a solution.

  1. AttributeSplitter: Split the comma-separated value and create a list attribute, each element of the list is a single bus line number.
  2. ListExploder: Explode the feature on the list. After that, each feature has a single bus-line number.
  3. Shapefile writer feature type: Configure destination file name using the bus-line number attribute, so that resulting files will be created for each bus-line (Feature Type Fanout).
Thank you for the solution. It works with the splitting of the lines..

 

 


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