Skip to main content

I have address data in CSV format. there are address number ranges, street address from number and street address to number, and sequence code (1 for odd, 2 for even, and 3 for consecutive).
I need to expand these ranges into individual addresses based on sequence code and write them in a new CSV.
Any guidance for doing this task in FME would be appreciated. Thanks

If I understand your question correctly, you would like to create a CSV entry for every address in the range specified by each row. A cloner might be a simple way to do that. Some attribute managers can handle populating the fields. I’ve attached a workspace that might help as a sample.

Start:

from_address_num    to_address_num    sequence    street    city    state    zip
1    9    1    baker st.    new york    ny    00000
2    6    2    baker st.    new york    ny    00000
101    109    3    broadway st.    new york    ny    00000

 

End:

current_address    from_address_num    to_address_num    sequence    street    city    state    zip
1    1    9    1    baker st.    new york    ny    00000
3    1    9    1    baker st.    new york    ny    00000
5    1    9    1    baker st.    new york    ny    00000
7    1    9    1    baker st.    new york    ny    00000
9    1    9    1    baker st.    new york    ny    00000
2    2    6    2    baker st.    new york    ny    00000
4    2    6    2    baker st.    new york    ny    00000
6    2    6    2    baker st.    new york    ny    00000
101    101    109    3    broadway st.    new york    ny    00000
102    101    109    3    broadway st.    new york    ny    00000
103    101    109    3    broadway st.    new york    ny    00000
104    101    109    3    broadway st.    new york    ny    00000
105    101    109    3    broadway st.    new york    ny    00000
106    101    109    3    broadway st.    new york    ny    00000
107    101    109    3    broadway st.    new york    ny    00000
108    101    109    3    broadway st.    new york    ny    00000
109    101    109    3    broadway st.    new york    ny    00000

 

workspace screenshot with cache
first attribute manager. Use “_clones” as the value for “number of copies” in the cloner
last attribute manager calculates each number to add to “from”. You might need to check that if sequences are odd that the from is odd.

 


bruttino Thank you so much. It was the best way.


Hi,

bruttino For doing this analysis, I need to do another clone and need your assistance.
I also have 2 fileds: “Street Address Number Suffix From Code” and “Street Address Number Suffix To Code”. For example, from A to D  
Do you have any idea how to handle this field? 
I need to copy based on the number of suffix between From and To, then replace the current suffix.

like A, B, C, and D for this example.

I really appreciate your assistance.


Sorry for the late reply. I didn’t see this until now. To be honest, there is a "CharacterCodeExtractor" in FME that I think should do this, but I wasn't able to get it to work. It's easy to do with a pythoncaller using the ord() and chr() functions though. I attached a sample using python this way.


Reply