Syntax FACTORY_DEF ClippingFactory [FACTORY_NAME ] [INPUT CLIPPER FEATURE_TYPE [ ]* []*]+ [INPUT CLIPPEE FEATURE_TYPE [ ]* []*]+ [REJECT_INVALID_GEOM ] [MODE (QUICK|COMPLETE)] [DISABLE_RASTER_CACHE [(YES|NO)]] [MULTICLIP (YES|NO|CLIPPERS_FIRST)] [CONNECT_Z_MODE (EXTEND|AVERAGE|FIRST_WINS|LAST_WINS|IGNORE_Z)] [MISSING_VAL_MODE (REMOVE_NANS|FLAG_NANS|COMPUTE_NANS)] [MISSING_VAL_SENTINEL ] [COMPUTE_MEASURES_MODE (CONTINUOUS|DISCRETE)] [MEASURES_AND_Z_FROM (CLIPPEE|CLIPPER|CLIPPER_AND_CLIPPEE)] [CLIPPER_ATTR_PREFIX ] [CLIPPEE_ON_BOUNDARY (INSIDE|OUTSIDE|BOTH)] [MERGE_CLIPPER_ATTRIBUTES [(YES|NO)]] [DO_NOT_AGGREGATE [(YES|NO)]] [GROUP_BY []+] [FLUSH_WHEN_GROUPS_CHANGE (Yes|No)] [ATTR_ACCUM_MODE (HANDLE_CONFLICT|PREFIX_CLIPPER|CLIPPER_ONLY)] [ATTR_CONFLICT_RES (CLIPPEE_IF_CONFLICT|CLIPPER_IF_CONFLICT)] [CLIPPER_PREFIX ] [HANDLE_ARCS_ELLIPSES_AND_TEXT [(YES|NO)]] [OUTPUT_NO_CLIPPERS_AS_OUTSIDE] [OUTSIDE_NO_CLIPPERS_ATTR ] [CLEANING_TOLERANCE (NONE|AUTO|)] [OUTPUT (CLIPPED_INSIDE|CLIPPED_OUTSIDE| NONPOLY_CLIPPER|EXTRA_CLIPPER| INSIDE|OUTSIDE|OUTSIDE_NO_CLIPPER|REJECTED) FEATURE_TYPE [ ]* []*]* Overview This factory is used to perform a geometric clipping operation on input features. It takes two types of features identified by the CLIPPER and CLIPPEE input tags. Clipping features are identified by the tag CLIPPER. These features identify the areas against which all CLIPPEE features are clipped. The CLIPPER can be a polygon, donut, or aggregate feature. Any non-area clipping features that are encountered are output by the REJECTED tag. In the case of an aggregate CLIPPER, any non-polygonal parts it contains will be output as an aggregate by the REJECTED tag. The "clippee" features are identified by the tag CLIPPEE. All features that are entirely within the CLIPPER features are output via the INSIDE tagged output clause. Raster features that enter the factory via the CLIPPEE tag may only be clipped by non-aggregate, rectangular features. If a non-rectangular feature is used to clip a raster feature, the "clipper" will be readjusted to the bounding box of the non-rectangular feature. When REJECT_INVALID_GEOM is Yes, the factory will output invalid features to Rejected port. The ClippingFactory operates in one of three ways according to the value of the tag MULTICLIP. If NO is selected, only one input clipper will be accepted. For each instance of the factory, the first polygonal feature that matches the CLIPPER specification is used as the clipping polygon, and other polygonal features are output immediately via the REJECTED tag. The EXTRA_CLIPPER tag will be used if the REJECTED tag is not present. Tip: Since CLIPPEE features must be held by the factory until the CLIPPER feature arrives, take care wherever possible to ensure that the CLIPPER feature arrives before any CLIPPEE features. If the YES option for the MULTICLIP tag is selected, multiple CLIPPER features may be given to the clipping factory. The CLIPPERs will be applied to all the CLIPPEEs in the order that they are input. In this mode, all the CLIPPEE features are held in a cache until all the CLIPPERs and CLIPPEEs have arrived into the clipping factory. Then, when we are sure that all clippers have arrived, clipping begins. The CLIPPERS_FIRST option for the MULTICLIP tag is the third and final mode which is a modification of the YES option that allows for better efficiency. If selected, the ClippingFactory will expect the first features input to be CLIPPERs. Once the first CLIPPEE feature is received, all subsequent CLIPPER features will be output immediately via the REJECTED tag. The EXTRA_CLIPPER tag will be used if the REJECTED tag is not present. In this mode, no CLIPPEE features are held, and clipping begins when the first CLIPPEE arrives. CLIPPEE features that intersect the CLIPPER features are broken up into pieces, with those pieces on the inside of the CLIPPER features being output via the CLIPPED_INSIDE output tag. Pieces outside the clipping areas are output via the CLIPPED_OUTSIDE tag. If a CLIPPEE feature is found to be inside a CLIPPER, or is partially inside a CLIPPER, the inside pieces are no longer clipped by other CLIPPERs. As such, results may vary depending on the order that the CLIPPERs are given to the ClippingFactory. Features completely outside all of the CLIPPER features are output via the OUTSIDE tag. Features that are clipped outside of a CLIPPER will have their outside parts clipped by any subsequent CLIPPERs. The optional output tag OUTSIDE_NO_CLIPPER, if present, will receive all clippee features in the case that no clippers are received. If absent, clippee features will be output via the OUTSIDE tag. If MERGE_CLIPPER_ATTRIBUTES is specified, then whenever a clippee is found to be inside or clipped inside a CLIPPER, the attributes of the clipper will be merged onto the inside parts of the output features. If attributes of the same name already exist on the CLIPPEE, they will be merged based on the ATTR_ACCUM_MODE, ATTR_CONFLICT_RES, and CLIPPER_PREFIX parameters. In DEFAULT_MERGEMODE, for backwards compatibility, the CLIPPER_ATTR_PREFIX directive specifies a string prefix to be added to the attributes of a CLIPPER that are copied to a CLIPPEE. If attributes of the same name already exist on the CLIPPEE, they will be overwritten. If this prefix is not specified or is empty, the attributes will still be copied to the output features, but they will not overwrite any existing attributes of the same name. The CLIPPEE_ON_BOUNDARY directive directs what action should be taken on clippee features that lie entirely on the boundary of the clipper. If the value INSIDE is given, then these features are output via the INSIDE tag. If the value OUTSIDE is given, then these features are output via the OUTSIDE tag. If BOTH is given, points and line segments on the boundary are duplicated and output as both the INSIDE and OUTSIDE tags. If the CLIPPEE_ON_BOUNDARY directive is not specified, the default behavior is INSIDE. This factory is most commonly used when an input data source covers an area much greater than the area of interest for the destination data set. This factory enables FME to perform some rudimentary spatial selection operations, in addition to its attribution selection capabilities. All of the output tags are optional. The dimensionality of input features is maintained, with an exception noted in the following paragraph. This means that features resulting from input points are returned as points, features resulting from input lines are returned as lines, and features resulting from input polygons are returned as polygons. As well, features resulting from input aggregates are returned as aggregates, with their correct nesting depth (and relative order) preserved in the case of nested aggregates. The factory may output aggregates and aggregates may be output in cases where a non-aggregate feature is input. Imagine a winding river crossing into and out of the clipping region several times. The portion of the river inside the clipping region would be output as one aggregate of linear geometries and the portion outside the clipping region would be output as another aggregate of linear pieces. Specify the DO_NOT_AGGREGATE clause if you do not want aggregates generated where they did not previously exist. If the DO_NOT_AGGREGATE clause is used, then multiple pieces that result from a single CLIPPEE feature will be output as separate features with identical attributes. If the GROUP_BY clause is given, then each CLIPPEE will only be clipped by CLIPPERs that contain the same values as itself in the attributes specified by this clause. If FLUSH_WHEN_GROUPS_CHANGE is set to Yes, clipping results will be flushed whenever a feature from a different group is encountered. Any clipping feature which is not a polygon is output via the NONPOLY_CLIPPER tag unless the REJECTED tag is present. The DISABLE_RASTER_CACHE clause is unused. The MODE clause is always set to COMPLETE regardless of the value specified in the factory. If the CLEANING_TOLERANCE keyword does not exist or has the value "NONE", no cleaning will be performed. If the CLEANING_TOLERANCE directive specifies a non-negative number, geometries within this tolerance will be merged. If the CLEANING_TOLERANCE is AUTO, a cleaning tolerance will be automatically generated based on the input geometries. At the end the factory outputs the following statistics. Total clippee features input. Total features clipped. Total features totally inside. Total features totally outside. TO BE RESOLVED OUTPUT_NO_CLIPPERS_AS_OUTSIDE and OUTSIDE_NO_CLIPPERS_ATTR clauses added to Syntax section above, but not documented.