Syntax FACTORY_DEF * GQueryFactory [FACTORY_NAME ] [INPUT FEATURE_TYPE [ ]* []*]* [GQUERY ] [ACTION (RENAME_TRAITS|RENAME_GEOMNAME|SET_GEOMNAME|REMOVE_TRAITS| REMOVE_GEOMNAME|EXTRACT_TRAITS|EXTRACT_TRAITS_PREFIXED| EXTRACT_GEOMNAME|SET_APPEARANCE)] [PARAMETER *] [ORIG_XML_ATTR ] [ROUTE_UNMATCHED_FEATURES (YES|NO)] [OUTPUT (RESULT|UNTOUCHED|UNMATCHED) FEATURE_TYPE [ ]* []*]* Overview This factory uses specific XQuery expressions to select portions of geometry on a feature and then applies a specified action to the selected geometries. Supported actions include renaming, setting, removing, and extracting geometry names and traits. The factory creates an in-memory representation of the geometry of the input feature, with a numeric ID tag assigned to each level of the geometry. The GQUERY is an XQuery syntax query with a specific return clause that selects the ID tags of the selected geometries. The parameters passed on the PARAMETER clause are specific to the action selected. Clauses GQUERY If specified, the query should return the IDs of the selected geometries. If empty, all geometries at all levels will be selected. Default: None ACTION Specific keyword which indicates what action is to be performed on the selected geometry. Only one action may be specified. PARAMETER When the action requires input, it is supplied by this generic clause. For instance, when renaming geometry names, old name/new name pairs are supplied using comma separated values. ORIG_XML_ATTR For internal use, specifies the name of a new attribute which will be populated with the XML representation of the geometry, followed by the XML nodes for each appearance that might be returned from calls to fme:appearance-front() or fme:appearance-back(). ROUTE_UNMATCHED_FEATURES If yes, routes unmatched features (features where the query doesn't select any geometries to apply an action to) to the UNMATCHED output port. If no, unmatched features are output via the UNTOUCHED port. Geometry Representation The virtual XML representation of complex geometry uses elements named geometry to represent each level of geometry. For instance, an aggregate will contain one child element of type geometry for each child geometry belonging to the aggregate. Traits, geometry type and geometry names are stored as attributes on the geometry element. For instance, a geometry named 600Block of type IFMEPolygon, with a trait area with value 100 would be represented by the following element in XML: Output Tags The GQueryFactory supports the following output tags. RESULT Modified features with at least one geometry part having been selected by the specified query. UNTOUCHED Features which have been selected by the query, but not modified, are output via this port. If ROUTE_UNMATCHED_FEATURES is no, features that have no parts selected by the query are also output via this port. UNMATCHED If ROUTE_UNMATCHED_FEATURES is yes, features with no parts matched by the query are output via this port. If ROUTE_UNMATCHED_FEATURES is no, no features are output via this port.