Syntax FACTORY_DEF DensityFactory [FACTORY_NAME ] [INPUT (REQUESTOR|REFERENCE) FEATURE_TYPE [ ]* []*]+ DENS_TYPE (LINE_DENS|AREA_DENS|NUMBER_DENS) ATTR_NAME [GROUP_BY []+]* [REJECT_INVALID_GEOM (Yes|No)] [VECTOR_ONLY (Yes|No)] [OUTPUT (REFERENCE|REQUESTOR) FEATURE_TYPE [ ]* []*]* Overview This factory is used for calculating the density of features based on a reference area. For example we could calculate the density of all the rivers in British Columbia (the requestor features) based on the area of British Columbia (the reference feature). The input features may be grouped based on attribute values specified in the GROUP_BY clause. The DENS_TYPE clause specifies which method we will use when calculating the density. LINE_DENS is used when you would like to calculate the density based on the length of the lines in each group of requestors. AREA_DENS is used when you would like to calculate the density based on the total area of a group of requestors. NUMBER_DENS is used when you want to calculate the density based on the number of features in a group of requestors. The ATTR_NAME clause specifies what the name of the attribute will be that holds the density which is calculated. The factory does not make any assumptions about whether or not objects used as the REFERENCE are inside of the REQUESTOR feature. If this behavior is what is desired then a SpatialRelator transformer can be used in conjunction. When REJECT_INVALID_PARAMS is Yes, the factory will output invalid features to Rejected port. When VECTOR_ONLY is set to Yes, only vector geometries (nulls/points/lines/areas) will contribute to the length and area modes. Only collections containing a non-null vector, or exclusively containing nulls will be allowed. Geometries will no longer be rejected/discarded based on length, and will instead be discarded based on geometry type. Input Tags The DensityFactory uses the following input tags. REFERENCE All features which we want to use as a reference to calculate the density are placed in this port. REQUESTOR All features which we would like to calculate the density of are placed in this port. Output Tags The DensityFactory supports the following output tags. REFERENCE All features which originally came through the REFERENCE port are placed here. REQUESTOR All features which originally came through the REQUESTOR port are placed here.