I've got some features and one of their attribute is a sequence of number or number with letter such as A001, A002... Now some of numbers are miss from sequence due to editting was performed. Is there a way to find out miss numbers and asign them to newly created feature from North to South, West to East?
How to find miss values from a sequence of number and asign them to other feature?
Best answer by dellerbeck
So if you are looking to "fill in the gaps" yes, there are TONS of options for doing this. I find that most people are comfortable with direct FME approach but lists, inline querier and python caller are very simple ways to accomplish this. But for this example here is a direct FME approach that is readable and will most likely be acceptable on performance.
This has 2 examples The Original_Code and New_Code is an example of filling in the gaps. It looks at a previous value based on sorting then does some math and cloning. The Sequenced simply replaces the existing values with an "in order" value but that would require updating the existing values.
If you are trying to manage the "A","B",etc. as well you could easily convert the split out text (see workspace) and convert it to the ASCII numeric value. This would let you re-index or fill in much simpler than trying to find the missing letter.
Hope this helps!! I would really look into the Python caller, you could do a very simple while statement that would fill in the gaps and create a new object. This would replace almost all of the transformers and would be tons more efficient if you have a lot of data.
ENJOY!!
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.