Exemple #1
0
        public void AddMask(GCDCore.Project.Masks.AttributeFieldMask mask)
        {
            IGroupLayer pProjLyr      = AddProjectGroupLayer();
            IGroupLayer pGrpLayer     = ArcMapUtilities.GetGroupLayer(MasksGroupLayer, pProjLyr);
            short       dTransparency = GCDCore.Properties.Settings.Default.TransparencyAssociatedLayers ? GCDCore.Properties.Settings.Default.AutoTransparencyValue : (short)-1;

            IFeatureRenderer pRenderer   = null;
            string           queryFilter = string.Empty;
            string           labelField  = string.Empty;

            if (mask is GCDCore.Project.Masks.RegularMask)
            {
                GCDCore.Project.Masks.RegularMask rMask = mask as GCDCore.Project.Masks.RegularMask;

                pRenderer = VectorSymbolization.GetRegularMaskRenderer(rMask) as IFeatureRenderer;

                // Create a definition query if some features are not included

                if (rMask._Items.Any(x => !x.Include))
                {
                    queryFilter = string.Format("\"{0}\" IN ('{1}')", mask._Field, string.Join("','", rMask._Items.Where(x => x.Include).Select(y => y.FieldValue)));
                }
            }
            else if (mask is GCDCore.Project.Masks.DirectionalMask)
            {
                GCDCore.Project.Masks.DirectionalMask dirMask = mask as GCDCore.Project.Masks.DirectionalMask;
                // Directional mask. Black outline with labels
                pRenderer = VectorSymbolization.GetDirectionalMaskRenderer(dirMask) as IFeatureRenderer;

                labelField = string.IsNullOrEmpty(dirMask.LabelField) ? dirMask._Field : dirMask.LabelField;
            }

            VectorSymbolization.AddToMapVector(mask.Vector.GISFileInfo, mask.Name, pGrpLayer, mask._Field, pRenderer, queryFilter, labelField, dTransparency);
        }
Exemple #2
0
        public void AddProfileRoute(GCDCore.Project.ProfileRoutes.ProfileRoute route)
        {
            IGroupLayer pProjLyr  = AddProjectGroupLayer();
            IGroupLayer pGrpLayer = ArcMapUtilities.GetGroupLayer(ProfileRouteGroupLayer, pProjLyr);

            IFeatureRenderer pRenderer = null;// VectorSymbolization.GetAOIRenderer(mask) as IFeatureRenderer;

            VectorSymbolization.AddToMapVector(route.Vector.GISFileInfo, route.Name, pGrpLayer, string.Empty, pRenderer, string.Empty, string.Empty);
        }
Exemple #3
0
        public void AddAOI(GCDCore.Project.Masks.AOIMask mask)
        {
            IGroupLayer pProjLyr  = AddProjectGroupLayer();
            IGroupLayer pGrpLayer = ArcMapUtilities.GetGroupLayer(MasksGroupLayer, pProjLyr);

            IFeatureRenderer pRenderer = VectorSymbolization.GetAOIRenderer(mask) as IFeatureRenderer;

            VectorSymbolization.AddToMapVector(mask.Vector.GISFileInfo, mask.Name, pGrpLayer, string.Empty, pRenderer, string.Empty, string.Empty);
        }