HI Sigtil,
Can you use a csv with the min and max for each range:
value,min,max
a,0,50
b,50,100
And then use a FeatureMerger to merge all csv values to the features (merge on 1 = 1).
Then use the Tester to find the records where z > min and z < max.
That should get you the d in the example.
And you only need to change the csv for other ranges.
Hi @sigtill, alternatively, the InlineQuerier could be a solution.
Source "range" table:
min,max,newattribute
0,50,a
50,100,b
100,120,c
120,175,d
SQL statement in the InlineQuerier:
select
s.*,
r.newattribute
from source as s
left outer join range as r
on r.min < s.z and s.z <= r.max
This is a spatial approach. May be less efficient than the SQL approach, but an FMEic solution?
Hi @Sigbjørn Herstad (and any others who stumble on this posting)!
We're revisiting the SchemaMapper over here, to see how we might be able to shave down it's long tooth. In digging into this transformer, it's evident there are a lot of questions about what exactly a new-n-improved SchemaMapper looks like. We're beginning to look at supporting simple functions and conditionals but still need to investigate/verify the following:
- Which functions and conditionals would be used? What would be helpful?
- Would these statements be specified in the external lookup table, the configuration fields, or apply to the incoming feature values themselves?
- What kind of UI help would the author expect for writing these statements?
Any and all feedback welcomed on these above points, if you would be game to share! I would greatly appreciate it!
Cheers,
Annabelle