public static List <LayerGeoJson> GetPriorityLandscapeMapLayers(LayerInitialVisibility layerInitialVisibility)
        {
            var layerGeoJsons = new List <LayerGeoJson>
            {
                PriorityLandscape.GetPriorityLandscapeWmsLayerGeoJson("#59ACFF", 0.2m, layerInitialVisibility)
            };

            return(layerGeoJsons);
        }
Exemple #2
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public PriorityLandscapeFileResource(PriorityLandscape priorityLandscape, FileResource fileResource, string displayName) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.PriorityLandscapeFileResourceID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.PriorityLandscapeID             = priorityLandscape.PriorityLandscapeID;
     this.PriorityLandscape = priorityLandscape;
     priorityLandscape.PriorityLandscapeFileResources.Add(this);
     this.FileResourceID = fileResource.FileResourceID;
     this.FileResource   = fileResource;
     this.DisplayName    = displayName;
 }
Exemple #3
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public ProjectPriorityLandscape(Project project, PriorityLandscape priorityLandscape) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.ProjectPriorityLandscapeID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.ProjectID = project.ProjectID;
     this.Project   = project;
     project.ProjectPriorityLandscapes.Add(this);
     this.PriorityLandscapeID = priorityLandscape.PriorityLandscapeID;
     this.PriorityLandscape   = priorityLandscape;
     priorityLandscape.ProjectPriorityLandscapes.Add(this);
 }
        public static List <LayerGeoJson> GetAllGeospatialAreaMapLayers(LayerInitialVisibility layerInitialVisibility)
        {
            var layerGeoJsons = new List <LayerGeoJson>
            {
                GetAllSimpleProjectLocations(),
                GetAllDetailedProjectLocations(),
                GetAllProjectTreatments(),
                PriorityLandscape.GetPriorityLandscapeWmsLayerGeoJson("#59ACFF", 0.2m, layerInitialVisibility),
                DNRUplandRegion.GetRegionWmsLayerGeoJson("#59ACFF", 0.2m, layerInitialVisibility)
            };

            return(layerGeoJsons);
        }
Exemple #5
0
        public static List <LayerGeoJson> GetPriorityLandscapeAndAssociatedProjectLayers(PriorityLandscape priorityLandscape, List <Project> projects)
        {
            var projectLayerGeoJson = new LayerGeoJson($"{FieldDefinition.ProjectLocation.GetFieldDefinitionLabel()} - Simple",
                                                       Project.MappedPointsToGeoJsonFeatureCollection(projects, true, false),
                                                       "#ffff00", 1, LayerInitialVisibility.Show);
            var priorityLandscapeLayerGeoJson = new LayerGeoJson(priorityLandscape.DisplayName,
                                                                 new List <PriorityLandscape> {
                priorityLandscape
            }.ToGeoJsonFeatureCollection(), "#2dc3a1", 1,
                                                                 LayerInitialVisibility.Show);
            var projectDetailedLocationsLayerGeoJson =
                Project.ProjectDetailedLocationsToGeoJsonFeatureCollection(projects);
            var projectTreatmentAreasLayerGeoJson = Project.ProjectTreatmentAreasToGeoJsonFeatureCollection(projects);

            var layerGeoJsons = new List <LayerGeoJson>
            {
                projectLayerGeoJson,
                priorityLandscapeLayerGeoJson,
                GetPriorityLandscapeWmsLayerGeoJson("#59ACFF", 0.6m,
                                                    LayerInitialVisibility.Show),
                projectDetailedLocationsLayerGeoJson,
                projectTreatmentAreasLayerGeoJson
            };

            return(layerGeoJsons);
        }
Exemple #6
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static PriorityLandscapeFileResource CreateNewBlank(PriorityLandscape priorityLandscape, FileResource fileResource)
 {
     return(new PriorityLandscapeFileResource(priorityLandscape, fileResource, default(string)));
 }
Exemple #7
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static ProjectPriorityLandscape CreateNewBlank(Project project, PriorityLandscape priorityLandscape)
 {
     return(new ProjectPriorityLandscape(project, priorityLandscape));
 }
Exemple #8
0
 public static void DeletePriorityLandscape(this IQueryable <PriorityLandscape> priorityLandscapes, PriorityLandscape priorityLandscapeToDelete)
 {
     DeletePriorityLandscape(priorityLandscapes, new List <PriorityLandscape> {
         priorityLandscapeToDelete
     });
 }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static ProjectPriorityLandscapeUpdate CreateNewBlank(ProjectUpdateBatch projectUpdateBatch, PriorityLandscape priorityLandscape)
 {
     return(new ProjectPriorityLandscapeUpdate(projectUpdateBatch, priorityLandscape));
 }