Skip to content

Commit

Permalink
Update layer names
Browse files Browse the repository at this point in the history
  • Loading branch information
HansKallekleiv committed Jun 7, 2022
1 parent 5026607 commit 27abaed
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/subsurface.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ jobs:
pip install .
# Testing against our latest release (including pre-releases)
# Temporarily do not use prerelase of wsc due to https://github.com/equinor/webviz-subsurface-components/issues/1007
pip install --pre --upgrade webviz-config webviz-core-components # webviz-subsurface-components
pip install --pre --upgrade webviz-config webviz-core-components webviz-subsurface-components
- name: 📦 Install test dependencies
run: |
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [UNRELEASED] - YYYY-MM-DD

### Fixed

- [#1046](https://github.com/equinor/webviz-subsurface/pull/1046) - `MapViewerFMU` - Fixed an issue related to upstream changes in prop specification for the DeckGLMap component.

### Changed

- [#1020](https://github.com/equinor/webviz-subsurface/pull/1020) - `WellAnalysis` - Several improvements and bug fixes. F.ex a well attribute filter in the well overview plots and the possibility to see production only after a given date.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"flaky",
"isort",
"mypy",
"pylint",
"pylint<=2.13.9", # Locked due to https://github.com/equinor/webviz-subsurface/issues/1052
"pytest-mock",
"pytest-xdist",
"selenium>=3.141",
Expand Down
12 changes: 12 additions & 0 deletions webviz_subsurface/plugins/_map_viewer_fmu/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,23 @@ class LayerTypes(str, Enum):
MAP3D = "Map3DLayer"
COLORMAP = "ColormapLayer"
WELL = "WellsLayer"
WELLTOPSLAYER = "GeoJsonLayer"
DRAWING = "DrawingLayer"
FAULTPOLYGONS = "FaultPolygonsLayer"
GEOJSON = "GeoJsonLayer"


class LayerNames(str, Enum):
HILLSHADING = "Surface (hillshading)"
MAP3D = "3D Map"
COLORMAP = "Surface (color)"
WELL = "Wells"
WELLTOPSLAYER = "Well tops"
DRAWING = "Drawings"
FAULTPOLYGONS = "Fault polygons"
GEOJSON = "GeoJsonLayer"


class SurfaceMode(str, Enum):
MEAN = "Mean"
REALIZATION = "Single realization"
Expand Down
10 changes: 7 additions & 3 deletions webviz_subsurface/plugins/_map_viewer_fmu/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from dash import dcc, html
from webviz_subsurface_components import DeckGLMap # type: ignore

from ._types import LayerTypes, SurfaceMode
from ._types import LayerTypes, SurfaceMode, LayerNames


@unique
Expand Down Expand Up @@ -255,6 +255,7 @@ def __init__(self, tab: Tabs, get_uuid: Callable, color_tables: List[Dict]) -> N
layers=update_map_layers(1),
zoom=-4,
colorTables=color_tables,
bounds=[0, 0, 1000, 1000],
),
style={"height": LayoutStyle.MAPHEIGHT},
),
Expand Down Expand Up @@ -638,13 +639,14 @@ def update_map_layers(
for idx in range(views):
layers.extend(
[
# Map3DLayer(uuid=f"{LayoutElements.MAP3D_LAYER}-{idx}"),
{
"@@type": LayerTypes.COLORMAP,
"name": LayerNames.COLORMAP,
"id": f"{LayoutElements.COLORMAP_LAYER}-{idx}",
},
{
"@@type": LayerTypes.HILLSHADING,
"name": LayerNames.HILLSHADING,
"id": f"{LayoutElements.HILLSHADING_LAYER}-{idx}",
"visible": visible_hillshading_layer,
},
Expand All @@ -654,6 +656,7 @@ def update_map_layers(
layers.append(
{
"@@type": LayerTypes.FAULTPOLYGONS,
"name": LayerNames.FAULTPOLYGONS,
"id": f"{LayoutElements.FAULTPOLYGONS_LAYER}-{idx}",
"visible": visible_fault_polygons_layer,
}
Expand All @@ -662,7 +665,8 @@ def update_map_layers(
if include_well_layer:
layers.append(
{
"@@type": LayerTypes.GEOJSON,
"@@type": LayerTypes.WELLTOPSLAYER,
"name": LayerNames.WELLTOPSLAYER,
"id": f"{LayoutElements.WELLS_LAYER}-{idx}",
"data": {"type": "FeatureCollection", "features": []},
"visible": visible_well_layer,
Expand Down

0 comments on commit 27abaed

Please sign in to comment.