Question

Using StatisticsCalculator output

  • 22 January 2014
  • 5 replies
  • 11 views

Hi,

 

I am trying to use two results from a statistics calculator (total population from a excel sheet and total area from a shapefile), in order to estimate population density.

 

 

The trouble I have is how do I use these constants (total population & total area) in the expression calculator, in order to calculate an estimate population, i.e.

 

(total pop / total area)*area (where area is the area of each polygon)

 

 

Thanks,

 

Ed

 

 

 


5 replies

Userlevel 4
Hi,

 

 

in the ExpressionEvaluator dialog box, simply double click on the "FME feature attributes" list items to insert them into your expression.

 

 

 

 

See the help text for more details.

 

 

David
Thanks David,

 

Sorry I probably wasn't very clear, the Total Population and Total Area are independant from the shapefile containing the areas.

 

 

So I want to use the outputs from the statistics calculator (Total pop and total area) as constant values in another shapefile (which doesn't have the attributes total pop and total area).

 

 

I have tried using AttributeCreator to make a new attribute with a constant value (total population) but is there a way to do this without inputting it manually.....or ideally without having to add total population and total area as a new attribute.

 

 

Sorry I hope that makes sense
Userlevel 4
Hi,

 

 

ok, I understand (I think). You can use the UnconditionalFeatureMerger (from the FME Store) to join the results from the StatisticsCalculator with each feature containing the polygons.

 

 

David
Userlevel 2
Badge +17
Hi,

 

 

If you are using FME 2013 SP2+, existing FeatureMerger can be also used to perform unconditional merging. Just specify same constant (e.g. "1") to "Join On" parameter for both Requestor and Supplier.

 

For your information.

 

 

Takashi
Thanks very much David and Takashi, that is exactly what I was after!

 

Much appreciated

Reply