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?
It wouldn't be easy with FME I don't think. You could do a two step process.
First step add a unique ID to each feature with a Counter. Write these out as new temporary feature classes, in the same process write out the new ID column as well as the sequence attributes to excel. Use excels sequence magic to fix the sequence.
Once you have a fixed sequence you can then read in the excel and your temp feature classes and then use a FeatureJoiner to get the fixed sequence back onto your features. remove the temp id field and you should have fixed data.
It's a little work but its probably faster than figuring out how FME can do this in one go.
I'm unclear what your desired result is. What does "newly created feature from North to South, West to East" mean?
If the input table looks like below, for example, what kind of table you need to create from this?
codeA001A002A005A006A007A010So 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!!
I'm unclear what your desired result is. What does "newly created feature from North to South, West to East" mean?
If the input table looks like below, for example, what kind of table you need to create from this?
codeA001A002A005A006A007A010Identify missing values A003, A004, A008 and A009 from the sequence, and after some editing, there're may be some feature has same value or no value, asign identified missing values to these features.
It wouldn't be easy with FME I don't think. You could do a two step process.
First step add a unique ID to each feature with a Counter. Write these out as new temporary feature classes, in the same process write out the new ID column as well as the sequence attributes to excel. Use excels sequence magic to fix the sequence.
Once you have a fixed sequence you can then read in the excel and your temp feature classes and then use a FeatureJoiner to get the fixed sequence back onto your features. remove the temp id field and you should have fixed data.
It's a little work but its probably faster than figuring out how FME can do this in one go.
Yeah, that's one way to do it, but how to asign values?
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!!
Thank you very much, I'll try this tomorrow.
I'm unclear what your desired result is. What does "newly created feature from North to South, West to East" mean?
If the input table looks like below, for example, what kind of table you need to create from this?
codeA001A002A005A006A007A010If you need to create this table from the above one, @dellerbeck's answer would help you.
codeA001A002A003A004A005A006A007A008A009A010If you need to create this table from the above one, @dellerbeck's answer would help you.
codeA001A002A003A004A005A006A007A008A009A010I'll try it tomorrow, already downloaded the attached fmw.