Skip to main content
Solved

Calculating the percentage of registered and non-registered land in each governorate on the Area A, Area B and Area C

  • June 22, 2015
  • 8 replies
  • 28 views

Forum|alt.badge.img
Calculating the percentage of registered and non-registered land in each governorate on the Area A, Area B and Area C

 

 

 

I couldn’t figure out the best practice to calculating the percentage of registered and non-registered land in each governorate on the Area A, Area B and Area C

 

 

 

In the ArcGIS, for example, this sort of work is done as shown in the following model.

 

 

 

 

 

Which equivalent tools in FME that can be used to calculate this values?

 

 

 

The data is store in the link below:

 

http://www.mediafire.com/download/a674hybiyc7v1b8/E1.gdb.rar

 

 

Thanks in advance

Best answer by takashi

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
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

8 replies

pratap
Contributor
Forum|alt.badge.img+12
  • Contributor
  • June 22, 2015
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

takashi
Celebrity
  • Best Answer
  • June 22, 2015
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

takashi
Celebrity
  • June 22, 2015
In this case, you can replace (3) AreaCalculator and (4) BulkAttributeRenamer with this AttributeCreator.

 


Forum|alt.badge.img
  • Author
  • June 22, 2015
Thanks very much Takashi,

 

 

but it's produce only two values ,, see attached

 

 

what might be the issue here?

takashi
Celebrity
  • June 22, 2015
I suspect the "Group By" parameter of the Aggregator is improper.

 

Group By: Name  Registration_English

Forum|alt.badge.img
  • Author
  • June 22, 2015
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

 


takashi
Celebrity
  • June 22, 2015
The area attribute has been renamed already.  Set "Area_A", "Area_B" and "Area_C" to the Selected Attributes parameter.

Forum|alt.badge.img
  • Author
  • June 22, 2015
yes .. thank you very much Takashi

 

thanks alot for your help