Exemple #1
0
        /// <summary>
        ///     Locates the polygon features along the route and writes the result to a new line event table.
        /// </summary>
        /// <param name="locatePolygonsAlongRouteName">Name of the locate polygons along route.</param>
        /// <param name="polygons">The polygons to locate.</param>
        /// <param name="keepZeroLengthEvents">
        ///     if set to <c>true</c> allows you to keep or not keep the zero length line events in
        ///     the output event table.  The zero length line events result from a case where the geometric intersection of the
        ///     route (line) and the polygon is a point.
        /// </param>
        /// <param name="properties">
        ///     Parameter consisting of the route location fields and the type of events that will be written
        ///     to the output event table.
        /// </param>
        /// <param name="filter">An optional filter used to use a subset of the polygon data.</param>
        /// <param name="keepAllFields">
        ///     Allows you to include or disinclude the attributes of the point feature class.  If this is
        ///     set to False, the output event table will only contain the route event properties.
        /// </param>
        /// <param name="workspace">The workspace that will contain the event data table.</param>
        /// <returns>
        ///     Returns a <see cref="ITable" /> representing the event table of the results.
        /// </returns>
        public ITable Locate(string locatePolygonsAlongRouteName, IFeatureClass polygons, bool keepZeroLengthEvents, IRouteMeasureLineProperties properties, IQueryFilter filter, bool keepAllFields, IWorkspace workspace)
        {
            var locator = this.GetRouteLocatorOperations(filter, polygons);

            var outputClassName = workspace.Define(locatePolygonsAlongRouteName, new TableNameClass());

            workspace.Delete(outputClassName);

            return(locator.LocatePolygonFeatures((IRouteEventProperties)properties, keepAllFields, keepZeroLengthEvents, outputClassName, "", null));
        }
Exemple #2
0
        /// <summary>
        ///     Locate line features along the route and writes the result to a new line event table.
        /// </summary>
        /// <param name="locateLinesAlongRouteName">The name of the event table of the located features.</param>
        /// <param name="lines">The lines to locate.</param>
        /// <param name="clusterTolerance">
        ///     The cluster tolerance which is a numeric value
        ///     representing the maximum tolerated distance between the input lines and the target routes.
        /// </param>
        /// <param name="properties">
        ///     Parameter consisting of the route location fields and the type of events that will be written
        ///     to the output event table.
        /// </param>
        /// <param name="filter">An optional filter used to use a subset of the line data.</param>
        /// <param name="keepAllFields">
        ///     Allows you to include or disinclude the attributes of the point feature class.  If this is
        ///     set to False, the output event table will only contain the route event properties.
        /// </param>
        /// <param name="workspace">The workspace that will contain the event data table.</param>
        /// <returns>
        ///     Returns a <see cref="ITable" /> representing the event table of the results.
        /// </returns>
        public ITable Locate(string locateLinesAlongRouteName, IFeatureClass lines, double clusterTolerance, IRouteMeasureLineProperties properties, IQueryFilter filter, bool keepAllFields, IWorkspace workspace)
        {
            var locator = this.GetRouteLocatorOperations(filter, lines);

            var outputClassName = workspace.Define(locateLinesAlongRouteName, new TableNameClass());

            workspace.Delete(outputClassName);

            return(locator.LocateLineFeatures(clusterTolerance, (IRouteEventProperties)properties, keepAllFields, outputClassName, "", null));
        }