/// <summary> /// Overlays two event tables to create an output event table that represents the union or intersection of the input. /// </summary> /// <param name="sourceTable">The input event table.</param> /// <param name="source"> /// Parameter consisting of the route location fields and the type of events in the input event /// table. /// </param> /// <param name="overlayTable">The overlay event table.</param> /// <param name="overlay"> /// Parameter consisting of the route location fields and the type of events in the overlay event /// table. /// </param> /// <param name="type">The type of overlay to be performed.</param> /// <param name="output"> /// Parameter consisting of the route location fields and the type of events in the overlay event /// table. /// </param> /// <param name="outputTableName">The table to be created.</param> /// <param name="outputWorkspace">The workspace that will contain the table that has been created.</param> /// <param name="trackCancel">Allows the operation be be cancelled.</param> /// <returns>Returns a <see cref="ITable" /> representing the table that has been created.</returns> public static ITable Overlay(this ITable sourceTable, IRouteEventProperties2 source, ITable overlayTable, IRouteEventProperties2 overlay, OverlayType type, IRouteEventProperties2 output, string outputTableName, IWorkspace outputWorkspace, ITrackCancel trackCancel) { IRouteMeasureEventGeoprocessor2 gp = new RouteMeasureGeoprocessorClass(); gp.InputEventProperties = source; gp.InputTable = sourceTable; gp.BuildOutputIndex = true; gp.OverlayEventProperties = overlay; gp.OverlayTable = overlayTable; gp.KeepZeroLengthLineEvents = false; return(OverlayImpl(gp, type, output, outputTableName, outputWorkspace, trackCancel)); }
/// <summary> /// Events will be aggregated where the to-measure of one event matches the from-measure of the next event. This option /// is applicable only for line events. /// </summary> /// <param name="table">The table whose rows will be aggregated.</param> /// <param name="source">Parameter consisting of the route location fields and the type of events in the input event table.</param> /// <param name="outputWorkspace"></param> /// <param name="outputTableName">The table to be created.</param> /// <param name="output"> /// Parameter consisting of the route location fields and the type of events in the concatenate event /// table. /// </param> /// <param name="trackCancel">The object that allows for monitoring the progress.</param> /// <param name="concatenateFields">The field(s)used to aggregate rows.</param> /// <returns>Returns a <see cref="ITable" /> representing the table that has been created.</returns> public static ITable Concatenate(this ITable table, IRouteEventProperties2 source, IWorkspace outputWorkspace, string outputTableName, IRouteEventProperties2 output, ITrackCancel trackCancel, params string[] concatenateFields) { var outputName = new TableNameClass(); outputName.WorkspaceName = (IWorkspaceName)((IDataset)outputWorkspace).FullName; outputName.Name = outputTableName; outputWorkspace.Delete(outputName); IRouteMeasureEventGeoprocessor2 gp = new RouteMeasureGeoprocessorClass(); gp.InputEventProperties = source; gp.InputTable = table; gp.KeepZeroLengthLineEvents = false; return(gp.Concatenate2(output, concatenateFields, outputName, trackCancel, "")); }