The Symmetric Difference Creator Processor is used to clip or remove the intersecting portion of an event record’s geometry and a geofence from the union of the two geometries. The symmetric difference of two geometries is essentially an exclusive OR statement.
Example
Use the Symmetric Difference Creator Processor to union and clip the intersection of a tornado and a zone of interest. As the tornado travels through the zone, the areas directly impacted can be clipped and removed from the zone. The remaining parts of the zone can be used to show areas not directly impacted by the tornado.
Usage notes
Keep the following in mind when working with the Symmetric Difference Creator Processor:
- The Symmetric Difference Creator Processor requires two discrete geometries be specified. For example, a regular expression cannot be used to specify several different geofences to obtain a symmetric difference for the collection of geometries.
- The processor requires geometries have the same type. For example, the symmetric difference between a point and a polyline as a union of the two cannot be computed.
- The processor requires the field containing the event record’s geometry be specified. A geometry field's name can be specified or a field tagged with the GEOMETRY tag in a GeoEvent Definition can be used to identify the geometry field.
- The Geometry Field parameter displays the name of every field from every GeoEvent Definition with a geometry data type. When selecting the geometry field by name, choose the name of the correct geometry field that corresponds to the event record’s GeoEvent Definition.
- The processor can be configured to replace the event record's geometry with the computed symmetric difference or place the symmetric difference geometry into a new geometry field using the Replace Geometry parameter. Adding a new field to an event record alters the event record's schema, which requires GeoEvent Server to create a new GeoEvent Definition. The new GeoEvent Definition will be managed by GeoEvent Server and deleted if changes are made to the processor or the GeoEvent Service in which the processor is used.
- Choosing Yes for the Tag the New Geometry Field as Geometry parameter explicitly tells GeoEvent Server which geometry field should be treated as the event record’s realized geometry for subsequent processing or output.
Parameters
The following are the parameters for the Symmetric Difference Creator Processor:
Parameter | Description |
---|---|
Name |
A descriptive name for the processor used for reference in GeoEvent Manager. |
Processor |
Specifies the processor selected. |
Geometry Field | The name of the geometry field or the field tagged with the GEOMETRY tag from the inbound event record the processor uses to calculate the symmetric difference with an intersecting geofence. |
Replace Geometry | Specifies whether to replace the current event record geometry with the symmetric difference of the event record and geofence geometries. The default is Yes.
|
New Geometry Field Name (Conditional) | The name of the new geometry field where the geometry of the calculated symmetric difference is stored. The parameter is shown when Replace Geometry is set to No and is hidden when set to Yes. |
Tag the New Geometry Field as Geometry (Conditional) | Specifies whether the new geometry field created by the processor is tagged with the GEOMETRY tag. The GEOMETRY tag is used by GeoEvent Server to identify the event record’s realized geometry when multiple geometry fields are present. The default is No. The parameter is shown when Replace Geometry is set to No and is hidden when set to Yes. |
New GeoEvent Definition Name (Conditional) | The name assigned to the new GeoEvent Definition. The new GeoEvent Definition will combine the schema of the inbound event record with the new geometry field. The parameter is shown when Replace Geometry is set to No and is hidden when set to Yes. |
Geofence | The category and name of the geofence registered with GeoEvent Server. The processor uses the geofence to calculate the symmetric difference with the geometry of the intersecting event record. The resulting geometry is the portion outside the intersection with the intersecting area clipped (or removed). The required format is category/name, specified as a pair of regular expression patterns. For example, Pavilions/Alpha uses the geofence Alpha in the category Pavilions with the event record geometry. Note:Multiple geofence category/name expressions cannot be specified as a comma separated list. For example, specifying Countries/France, Countries/Germany cannot be used to specify the geofences France or Germany. Note:Regular expressions are used for both the category and the name. Because the expression .*/.* includes all geofences in all categories, and this processor only works with two geofences, this pattern is unlikely to be used. Remember, regular expression pattern matches are case-sensitive. |
Considerations and limitations
Consider replacing the existing event record geometry with the geometry representing the symmetric difference prior to sending the event data to a feature service. Feature services only support one geometry type field, and therefore, whichever field is not tagged with the GEOMETRY tag will be converted and kept as a string.