Ejemplo n.º 1
0
        public void AddAssociatedSurface(AssocSurface assocRow)
        {
            IGroupLayer pAssocGrpLyr = AddAssociatedSurfaceGroupLayer(assocRow.DEM);

            short dTransparency = GCDCore.Properties.Settings.Default.TransparencyAssociatedLayers ? GCDCore.Properties.Settings.Default.AutoTransparencyValue : (short)-1;

            IRasterRenderer rasterRenderer = null;

            switch (assocRow.AssocSurfaceType)
            {
            case AssocSurface.AssociatedSurfaceTypes.InterpolationError:

                if (!GCDCore.Properties.Settings.Default.ApplyComparativeSymbology)
                {
                    rasterRenderer = RasterSymbolization.CreateClassifyRenderer(assocRow.Raster, 11, "Slope");
                }
                break;

            case AssocSurface.AssociatedSurfaceTypes.PointQuality3D:

                if (!GCDCore.Properties.Settings.Default.ApplyComparativeSymbology)
                {
                    rasterRenderer = RasterSymbolization.CreateClassifyRenderer(assocRow.Raster, 11, "Precipitation", true);
                }
                break;

            case AssocSurface.AssociatedSurfaceTypes.PointDensity:
                assocRow.Raster.ComputeStatistics();
                decimal rasterMax = assocRow.Raster.GetStatistics()["max"];

                if (rasterMax <= 2 & rasterMax > 0.25m)
                {
                    rasterRenderer = RasterSymbolization.CreateClassifyRenderer(assocRow.Raster, 11, "Green to Blue", 1.1, true);
                }
                else
                {
                    rasterRenderer = RasterSymbolization.CreateClassifyRenderer(assocRow.Raster, 11, "Green to Blue", true);
                }
                break;

            case AssocSurface.AssociatedSurfaceTypes.GrainSizeStatic:

                rasterRenderer = RasterSymbolization.CreateGrainSizeStatisticColorRamp(assocRow.Raster, ProjectManager.Project.Units.VertUnit);
                break;

            case AssocSurface.AssociatedSurfaceTypes.Roughness:
                rasterRenderer = RasterSymbolization.CreateRoughnessColorRamp(assocRow.Raster);
                break;

            case AssocSurface.AssociatedSurfaceTypes.SlopeDegree:
                rasterRenderer = RasterSymbolization.CreateSlopeDegreesColorRamp(assocRow.Raster);
                break;

            case AssocSurface.AssociatedSurfaceTypes.SlopePercent:
                rasterRenderer = RasterSymbolization.CreateSlopePrecentRiseColorRamp(assocRow.Raster);
                break;
            }

            AddRasterLayer(assocRow.Raster, rasterRenderer, assocRow.Name, pAssocGrpLyr, assocRow.LayerHeader, dTransparency);
        }
Ejemplo n.º 2
0
        public void AddReferenceSurface(Surface surf)
        {
            short       fDEMTransparency = (short)-1;
            IGroupLayer pSurveyLyr       = AddReferenceSurfaceGroupLayer(surf);

            if (surf.Hillshade != null && surf.Hillshade.Raster.GISFileInfo.Exists)
            {
                AddRasterLayer(surf.Hillshade.Raster, null, surf.Name + " Hillshade", pSurveyLyr, "Aspect", -1, ExpandLegend: false);
                fDEMTransparency = DefaultTransparency;
            }

            IRasterRenderer demRenderer = RasterSymbolization.CreateDEMColorRamp(surf.Raster);

            AddRasterLayer(surf.Raster, demRenderer, surf.Name, pSurveyLyr, surf.LayerHeader, fDEMTransparency);
        }
Ejemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="demRow"></param>
        /// <returns></returns>
        /// <remarks>Note: Add the hillshade first so that it appear UNDER the DEM in the TOC</remarks>
        public void AddDEM(DEMSurvey dem)
        {
            short       fDEMTransparency = (short)-1;
            IGroupLayer pSurveyLyr       = AddSurveyGroupLayer(dem);

            if (dem.Hillshade != null && dem.Hillshade.Raster.GISFileInfo.Exists)
            {
                AddRasterLayer(dem.Hillshade.Raster, null, dem.Name + " Hillshade", pSurveyLyr, "Aspect", -1, ExpandLegend: false);
                fDEMTransparency = DefaultTransparency;
            }

            IRasterRenderer demRenderer = RasterSymbolization.CreateDEMColorRamp(dem.Raster);

            AddRasterLayer(dem.Raster, demRenderer, dem.Name, pSurveyLyr, dem.LayerHeader, fDEMTransparency);
        }
Ejemplo n.º 4
0
        public void AddDoD(GCDProjectRasterItem dod)
        {
            Raster gDoDRaster = dod.Raster;

            IGroupLayer pAnalGrpLayer = AddAnalysesGroupLayer();
            short       dTransparency = -1;

            if (GCDCore.Properties.Settings.Default.TransparencyAnalysesLayers)
            {
                dTransparency = GCDCore.Properties.Settings.Default.AutoTransparencyValue;
            }

            IRasterRenderer rasterRenderer = RasterSymbolization.CreateDoDClassifyRenderer(gDoDRaster, 20, GCDCore.Properties.Settings.Default.DoDSymbologyRange);
            string          sHeader        = string.Format("Elevation Difference ({0})", UnitsNet.Length.GetAbbreviation(ProjectManager.Project.Units.VertUnit));

            AddRasterLayer(gDoDRaster, rasterRenderer, dod.Name, pAnalGrpLayer, sHeader, dTransparency);
        }
Ejemplo n.º 5
0
        public void AddErrSurface(ErrorSurface errRow)
        {
            IGroupLayer pErrGrpLyr = null;

            if (errRow.Surf is DEMSurvey)
            {
                pErrGrpLyr = AddErrorSurfacesGroupLayer(errRow.Surf as DEMSurvey);
            }
            else
            {
                pErrGrpLyr = AddReferenceErrorSurfacesGroupLayer(errRow.Surf);
            }

            string sHeader = string.Format("Error ({0})", UnitsNet.Length.GetAbbreviation(ProjectManager.Project.Units.VertUnit));

            short dTransparency = -1;

            if (GCDCore.Properties.Settings.Default.TransparencyErrorLayers)
            {
                dTransparency = GCDCore.Properties.Settings.Default.AutoTransparencyValue;
            }

            errRow.Raster.ComputeStatistics();
            Dictionary <string, decimal> stats = errRow.Raster.GetStatistics();
            double rMin = (double)stats["min"];
            double rMax = (double)stats["max"];

            if (rMin == rMax)
            {
                IRasterRenderer rasterRenderer = RasterSymbolization.CreateESRIDefinedContinuousRenderer(errRow.Raster, 1, "Partial Spectrum");
                AddRasterLayer(errRow.Raster, rasterRenderer, errRow.Name, pErrGrpLyr, sHeader, dTransparency);
            }
            else if (rMax <= 1 & rMax > 0.25)
            {
                IRasterRenderer rasterRenderer = RasterSymbolization.CreateClassifyRenderer(errRow.Raster, 11, "Partial Spectrum", 1.1);
                AddRasterLayer(errRow.Raster, rasterRenderer, errRow.Name, pErrGrpLyr, sHeader, dTransparency);
            }
            else
            {
                IRasterRenderer rasterRenderer = RasterSymbolization.CreateClassifyRenderer(errRow.Raster, 11, "Partial Spectrum");
                AddRasterLayer(errRow.Raster, rasterRenderer, errRow.Name, pErrGrpLyr, sHeader, dTransparency);
            }
        }