예제 #1
0
        /// <summary>
        /// Constructs a cell profile analyzer that analyzes cells in a cell profile vector
        /// </summary>
        /// <param name="siteModel"></param>
        /// <param name="pDExistenceMap"></param>
        /// <param name="filterSet"></param>
        /// <param name="cellLiftBuilder"></param>
        /// <param name="overrides"></param>
        public CellProfileAnalyzer(ISiteModel siteModel,
                                   ISubGridTreeBitMask pDExistenceMap,
                                   IFilterSet filterSet,
                                   ICellLiftBuilder cellLiftBuilder,
                                   IOverrideParameters overrides,
                                   ILiftParameters liftParams)
            : base(siteModel, pDExistenceMap, filterSet, overrides, liftParams)
        {
            CellLiftBuilder = cellLiftBuilder;

            PassFilter = filterSet.Filters[0].AttributeFilter;
            if (PassFilter.HasElevationRangeFilter && PassFilter.ElevationRangeDesign.DesignID != Guid.Empty)
            {
                var design = siteModel.Designs.Locate(PassFilter.ElevationRangeDesign.DesignID);
                if (design == null)
                {
                    Log.LogError($"ElevationRangeDesign {PassFilter.ElevationRangeDesign.DesignID} is unknown in project {siteModel.ID}");
                }
                else
                {
                    PassFilterElevationRangeDesign = new DesignWrapper(PassFilter.ElevationRangeDesign, design);
                }
            }
            PassFilterAnnex = new CellPassAttributeFilterProcessingAnnex();
            CellFilter      = filterSet.Filters[0].SpatialFilter;
        }
예제 #2
0
 /// <summary>
 /// Constructs a profile lift builder that analyzes cells in a cell profile vector
 /// </summary>
 public SummaryVolumesCellProfileAnalyzer(ISiteModel siteModel,
                                          ISubGridTreeBitMask pDExistenceMap,
                                          IFilterSet filterSet,
                                          IDesignWrapper referenceDesignWrapper,
                                          ICellLiftBuilder cellLiftBuilder,
                                          VolumeComputationType volumeType,
                                          IOverrideParameters overrides,
                                          ILiftParameters liftParams)
     : base(siteModel, pDExistenceMap, filterSet, overrides, liftParams)
 {
     svDesignWrapper = referenceDesignWrapper;
     VolumeType      = volumeType;
 }
예제 #3
0
        /// <summary>
        /// Configures a new profile builder that provides the three core builders used in profiling: construction of cell vector from profile line,
        /// profile analysis orchestration and per cell layer/statistics calculation
        /// </summary>
        public void Configure(ProfileStyle profileStyle,
                              ISiteModel siteModel,
                              ISubGridTreeBitMask productionDataExistenceMap,
                              GridDataType gridDataType,
                              IFilterSet filterSet,
                              IDesignWrapper referenceDesignWrapper,
                              IFilteredValuePopulationControl PopulationControl,
                              ICellPassFastEventLookerUpper CellPassFastEventLookerUpper,
                              VolumeComputationType volumeType,
                              IOverrideParameters overrides,
                              ILiftParameters liftParams,
                              bool slicerToolUsed = true)
        {
            CellLiftBuilder = factory.NewCellLiftBuilder(siteModel, gridDataType, PopulationControl, filterSet, CellPassFastEventLookerUpper);

            CellProfileBuilder = factory.NewCellProfileBuilder(siteModel, filterSet, referenceDesignWrapper, slicerToolUsed);

            CellProfileAnalyzer = factory.NewCellProfileAnalyzer(
                profileStyle, siteModel, productionDataExistenceMap, filterSet,
                referenceDesignWrapper, CellLiftBuilder, volumeType, overrides, liftParams);
        }
예제 #4
0
        /// <summary>
        /// Creates a new builder responsible for analyzing profile information for a cell or cells identified along a profile line
        /// </summary>
        public ICellProfileAnalyzer <T> NewCellProfileAnalyzer(ProfileStyle profileStyle,
                                                               ISiteModel siteModel,
                                                               ISubGridTreeBitMask pDExistenceMap,
                                                               IFilterSet filterSet,
                                                               IDesignWrapper referenceDesignWrapper,
                                                               ICellLiftBuilder cellLiftBuilder,
                                                               VolumeComputationType volumeComputationType,
                                                               IOverrideParameters overrides,
                                                               ILiftParameters liftParams)
        {
            switch (profileStyle)
            {
            case ProfileStyle.CellPasses:
                return(DIContext.Obtain <Func <ISiteModel, ISubGridTreeBitMask, IFilterSet, ICellLiftBuilder, IOverrideParameters, ILiftParameters, ICellProfileAnalyzer <T> > >()
                           (siteModel, pDExistenceMap, filterSet, cellLiftBuilder, overrides, liftParams));

            case ProfileStyle.SummaryVolume:
                return(DIContext.Obtain <Func <ISiteModel, ISubGridTreeBitMask, IFilterSet, IDesignWrapper, ICellLiftBuilder, VolumeComputationType, IOverrideParameters, ILiftParameters, ICellProfileAnalyzer <T> > >()
                           (siteModel, pDExistenceMap, filterSet, referenceDesignWrapper, cellLiftBuilder, volumeComputationType, overrides, liftParams));

            default:
                throw new ArgumentOutOfRangeException(nameof(profileStyle), profileStyle, null);
            }
        }