I have not reviewed your data as it is contains in rar format... Based on the understadning on the question, the below 3 transformers are required...
1. FeatureMerger
2. Statistics Calculator
3. Expression Evaluator
Based on the output of the data, further transformers may or may not be required
Hi,
"Area_A", "Area_B" and "Area_C" are attribute values stored in the ABC table. I think the question point is how to change the them to field names in the result table.
I would use the BulkAttributeRenamer and the Aggregator to do that.
(1) Clip the Governorates areas by the LangRegistration areas (merge attributes).
(2) Clip the resulting Inside areas by the ABC_Areas (merge attributes).
(3) Calculate the areas of the clipped areas with the AreaCalculator.
(4) Use the BulkAttributeRenamer to rename the area attribute.
- Rename: Selected Attributes
- Selected Attribute: _area (attribute that stores the area)
- Action: Regular Expression Replace
- Text To Find: .+
- String: ABC (attribute that stores "Area_A", "Area_B" or "Area_C")
(7) Aggregate the features with the Aggregato.
- Group By: Name, Registration_English
- Keep Input Attributes: Yes
(6) Expose the attribute names ("Area_A", "Area_B" and "Area_C")
(7) Use the NullAttributeMapper to replace area attribute with 0 if it was missing.
(8) Calculate percentages for "Area_A", "Area_B" and "Area_C" with the AttributeCreator.
(9) Optionally remove unnecessary attributes (AttributeRemover or AttributeKeepre); form the attribute values by the preferable format (StringFormatter); sort the features (Sorter).
The data flow looks like this.
Result
Takashi
In this case, you can replace (3) AreaCalculator and (4) BulkAttributeRenamer with this AttributeCreator.
Thanks very much Takashi,
but it's produce only two values ,, see attached
what might be the issue here?
I suspect the "Group By" parameter of the Aggregator is improper.
Group By: Name Registration_English
yes thats right but the last thing in the use of NullAttributeMapper to replace area attribute with 0 if it was missing it doesn't work with me maybe i do somthing wrong
The area attribute has been renamed already. Set "Area_A", "Area_B" and "Area_C" to the Selected Attributes parameter.
yes .. thank you very much Takashi
thanks alot for your help