コード例 #1
0
        protected override int ExecuteCore(IRow row, int tableIndex)
        {
            var feature = row as IFeature;

            var multiPatch = feature?.Shape as IMultiPatch;

            if (multiPatch == null)
            {
                return(NoError);
            }

            if (_reducedResolutionSpatialReference == null && _resolutionFactor > 1)
            {
                _reducedResolutionSpatialReference =
                    SpatialReferenceUtils.CreateSpatialReferenceWithMinimumTolerance(
                        _spatialReference, _resolutionFactor);

                // for eliminating vertical walls, don't use the resolution factor,
                // but the original resolution with the minimum tolerance (2x) for it
                _minimumToleranceSpatialReference =
                    SpatialReferenceUtils.CreateSpatialReferenceWithMinimumTolerance(
                        _spatialReference);
            }

            return(CheckRings(multiPatch, feature));
        }
コード例 #2
0
        protected override int ExecuteCore(IRow row, int tableIndex)
        {
            var feature = row as IFeature;

            if (feature == null)
            {
                return(NoError);
            }

            if (_bufferFactory == null)
            {
                // initialize

                if (_resolutionFactor > 1 && _highResolutionSpatialReference == null)
                {
                    _highResolutionSpatialReference =
                        SpatialReferenceUtils.CreateSpatialReferenceWithMinimumTolerance(
                            _spatialReference, _resolutionFactor);
                }

                ISpatialReference spatialReference = _highResolutionSpatialReference ??
                                                     _spatialReference;

                _xyTolerance         = ((ISpatialReferenceTolerance)spatialReference).XYTolerance;
                _originalXyTolerance =
                    ((ISpatialReferenceTolerance)_spatialReference).XYTolerance;

                double densifyDeviation = _xyTolerance / 2;
                _bufferFactory = CreateBufferFactory(densifyDeviation);
            }

            IMultiPatch multiPatch;

            if (_highResolutionSpatialReference == null)
            {
                multiPatch = (IMultiPatch)feature.Shape;
            }
            else
            {
                multiPatch = (IMultiPatch)feature.ShapeCopy;
                multiPatch.SpatialReference = _highResolutionSpatialReference;
            }

            return(CheckMultiPatch(feature, multiPatch));
        }
コード例 #3
0
        protected override int ExecuteCore(IRow row, int tableIndex)
        {
            var feature = row as IFeature;

            if (feature == null)
            {
                return(NoError);
            }

            var multiPatch = feature.Shape as IMultiPatch;

            if (multiPatch == null)
            {
                return(NoError);
            }

            if (_resolutionFactor > 1 && _minimumToleranceSpatialReference == null)
            {
                _minimumToleranceSpatialReference =
                    SpatialReferenceUtils.CreateSpatialReferenceWithMinimumTolerance(
                        _spatialReference, _resolutionFactor);
            }

            ICollection <SegmentProxy> verticalFaceSegments;
            IPolygon footprint = GetFootprint(feature, _minimumToleranceSpatialReference,
                                              out verticalFaceSegments);

            int errorCount = 0;

            if (footprint != null &&
                footprint.ExteriorRingCount !=
                ((IGeometryCollection)footprint).GeometryCount)
            {
                errorCount += ReportError(footprint, multiPatch, row);
            }

            if (verticalFaceSegments.Count > 0)
            {
                errorCount +=
                    ValidateVerticalFaces(feature, verticalFaceSegments, footprint);
            }

            return(errorCount);
        }