@webviz/subsurface-viewer 0.0.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DashSubsurfaceViewer.d.ts +56 -0
- package/dist/DashSubsurfaceViewer.js +160 -0
- package/dist/DashSubsurfaceViewer.js.map +1 -0
- package/dist/SubsurfaceViewer.d.ts +65 -0
- package/dist/SubsurfaceViewer.js +208 -0
- package/dist/SubsurfaceViewer.js.map +1 -0
- package/dist/assets/glTF/north_arrow/scene.bin +0 -0
- package/dist/assets/glTF/north_arrow/scene.gltf +315 -0
- package/dist/assets/glTF/north_arrow/textures/Arrow5_baseColor.png +0 -0
- package/dist/assets/glTF/north_arrow/textures/Arrow5_metallicRoughness.png +0 -0
- package/dist/assets/glTF/north_arrow/textures/Arrow5_normal.png +0 -0
- package/dist/components/ColorLegend.d.ts +26 -0
- package/dist/components/ColorLegend.js +19 -0
- package/dist/components/ColorLegend.js.map +1 -0
- package/dist/components/ColorLegends.d.ts +12 -0
- package/dist/components/ColorLegends.js +10 -0
- package/dist/components/ColorLegends.js.map +1 -0
- package/dist/components/DistanceScale.d.ts +12 -0
- package/dist/components/DistanceScale.js +45 -0
- package/dist/components/DistanceScale.js.map +1 -0
- package/dist/components/InfoCard.d.ts +11 -0
- package/dist/components/InfoCard.js +149 -0
- package/dist/components/InfoCard.js.map +1 -0
- package/dist/components/Map.d.ts +158 -0
- package/dist/components/Map.js +867 -0
- package/dist/components/Map.js.map +1 -0
- package/dist/components/StatusIndicator.d.ts +8 -0
- package/dist/components/StatusIndicator.js +20 -0
- package/dist/components/StatusIndicator.js.map +1 -0
- package/dist/components/ViewAnnotation.d.ts +7 -0
- package/dist/components/ViewAnnotation.js +13 -0
- package/dist/components/ViewAnnotation.js.map +1 -0
- package/dist/components/ViewFooter.d.ts +6 -0
- package/dist/components/ViewFooter.js +21 -0
- package/dist/components/ViewFooter.js.map +1 -0
- package/dist/components/settings/DrawModeSelector.d.ts +18 -0
- package/dist/components/settings/DrawModeSelector.js +20 -0
- package/dist/components/settings/DrawModeSelector.js.map +1 -0
- package/dist/components/settings/LayerProperty.d.ts +6 -0
- package/dist/components/settings/LayerProperty.js +39 -0
- package/dist/components/settings/LayerProperty.js.map +1 -0
- package/dist/components/settings/LayerSettingsButton.d.ts +7 -0
- package/dist/components/settings/LayerSettingsButton.js +51 -0
- package/dist/components/settings/LayerSettingsButton.js.map +1 -0
- package/dist/components/settings/LayersButton.d.ts +8 -0
- package/dist/components/settings/LayersButton.js +45 -0
- package/dist/components/settings/LayersButton.js.map +1 -0
- package/dist/components/settings/NumericInput.d.ts +20 -0
- package/dist/components/settings/NumericInput.js +25 -0
- package/dist/components/settings/NumericInput.js.map +1 -0
- package/dist/components/settings/Settings.d.ts +7 -0
- package/dist/components/settings/Settings.js +39 -0
- package/dist/components/settings/Settings.js.map +1 -0
- package/dist/components/settings/SliderInput.d.ts +29 -0
- package/dist/components/settings/SliderInput.js +21 -0
- package/dist/components/settings/SliderInput.js.map +1 -0
- package/dist/components/settings/ToggleButton.d.ts +17 -0
- package/dist/components/settings/ToggleButton.js +19 -0
- package/dist/components/settings/ToggleButton.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/inputSchema/ColorTables.json +51 -0
- package/dist/inputSchema/FaultPolygons.json +80 -0
- package/dist/inputSchema/Grid.json +39 -0
- package/dist/inputSchema/PieChart.json +72 -0
- package/dist/inputSchema/WellLog.json +126 -0
- package/dist/inputSchema/WellLogTemplate.json +136 -0
- package/dist/inputSchema/WellLogs.json +5 -0
- package/dist/inputSchema/Wells.json +106 -0
- package/dist/inputSchema/schemaValidationUtil.d.ts +5 -0
- package/dist/inputSchema/schemaValidationUtil.js +48 -0
- package/dist/inputSchema/schemaValidationUtil.js.map +1 -0
- package/dist/inputSchema/validator.d.ts +1 -0
- package/dist/inputSchema/validator.js +64 -0
- package/dist/inputSchema/validator.js.map +1 -0
- package/dist/inputSchema/wellCompletions.json +108 -0
- package/dist/layers/BoxSelectionLayer/boxSelectionLayer.d.ts +37 -0
- package/dist/layers/BoxSelectionLayer/boxSelectionLayer.js +86 -0
- package/dist/layers/BoxSelectionLayer/boxSelectionLayer.js.map +1 -0
- package/dist/layers/axes/axes-fragment.glsl.d.ts +2 -0
- package/dist/layers/axes/axes-fragment.glsl.js +15 -0
- package/dist/layers/axes/axes-fragment.glsl.js.map +1 -0
- package/dist/layers/axes/axesLayer.d.ts +38 -0
- package/dist/layers/axes/axesLayer.js +485 -0
- package/dist/layers/axes/axesLayer.js.map +1 -0
- package/dist/layers/axes/boxLayer.d.ts +20 -0
- package/dist/layers/axes/boxLayer.js +52 -0
- package/dist/layers/axes/boxLayer.js.map +1 -0
- package/dist/layers/axes/grid-vertex.glsl.d.ts +2 -0
- package/dist/layers/axes/grid-vertex.glsl.js +14 -0
- package/dist/layers/axes/grid-vertex.glsl.js.map +1 -0
- package/dist/layers/axes2d/axes2DLayer.d.ts +58 -0
- package/dist/layers/axes2d/axes2DLayer.js +613 -0
- package/dist/layers/axes2d/axes2DLayer.js.map +1 -0
- package/dist/layers/axes2d/font-atlas.png +0 -0
- package/dist/layers/axes2d/label-fragment.glsl.d.ts +2 -0
- package/dist/layers/axes2d/label-fragment.glsl.js +38 -0
- package/dist/layers/axes2d/label-fragment.glsl.js.map +1 -0
- package/dist/layers/axes2d/label-vertex.glsl.d.ts +2 -0
- package/dist/layers/axes2d/label-vertex.glsl.js +21 -0
- package/dist/layers/axes2d/label-vertex.glsl.js.map +1 -0
- package/dist/layers/axes2d/line-fragment.glsl.d.ts +2 -0
- package/dist/layers/axes2d/line-fragment.glsl.js +15 -0
- package/dist/layers/axes2d/line-fragment.glsl.js.map +1 -0
- package/dist/layers/axes2d/line-vertex.glsl.d.ts +2 -0
- package/dist/layers/axes2d/line-vertex.glsl.js +14 -0
- package/dist/layers/axes2d/line-vertex.glsl.js.map +1 -0
- package/dist/layers/colormap/colormap.fs.glsl.d.ts +2 -0
- package/dist/layers/colormap/colormap.fs.glsl.js +42 -0
- package/dist/layers/colormap/colormap.fs.glsl.js.map +1 -0
- package/dist/layers/colormap/colormapLayer.d.ts +24 -0
- package/dist/layers/colormap/colormapLayer.js +150 -0
- package/dist/layers/colormap/colormapLayer.js.map +1 -0
- package/dist/layers/drawing/drawingLayer.d.ts +17 -0
- package/dist/layers/drawing/drawingLayer.js +202 -0
- package/dist/layers/drawing/drawingLayer.js.map +1 -0
- package/dist/layers/fault_polygons/faultPolygonsLayer.d.ts +9 -0
- package/dist/layers/fault_polygons/faultPolygonsLayer.js +43 -0
- package/dist/layers/fault_polygons/faultPolygonsLayer.js.map +1 -0
- package/dist/layers/grid3d/fragment.fs.glsl.d.ts +2 -0
- package/dist/layers/grid3d/fragment.fs.glsl.js +109 -0
- package/dist/layers/grid3d/fragment.fs.glsl.js.map +1 -0
- package/dist/layers/grid3d/fragment_lines.glsl.d.ts +2 -0
- package/dist/layers/grid3d/fragment_lines.glsl.js +21 -0
- package/dist/layers/grid3d/fragment_lines.glsl.js.map +1 -0
- package/dist/layers/grid3d/grid3dLayer.d.ts +73 -0
- package/dist/layers/grid3d/grid3dLayer.js +134 -0
- package/dist/layers/grid3d/grid3dLayer.js.map +1 -0
- package/dist/layers/grid3d/privateLayer.d.ts +73 -0
- package/dist/layers/grid3d/privateLayer.js +174 -0
- package/dist/layers/grid3d/privateLayer.js.map +1 -0
- package/dist/layers/grid3d/vertex.glsl.d.ts +2 -0
- package/dist/layers/grid3d/vertex.glsl.js +43 -0
- package/dist/layers/grid3d/vertex.glsl.js.map +1 -0
- package/dist/layers/grid3d/vertex_lines.glsl.d.ts +2 -0
- package/dist/layers/grid3d/vertex_lines.glsl.js +16 -0
- package/dist/layers/grid3d/vertex_lines.glsl.js.map +1 -0
- package/dist/layers/grid3d/webworker.d.ts +4 -0
- package/dist/layers/grid3d/webworker.js +140 -0
- package/dist/layers/grid3d/webworker.js.map +1 -0
- package/dist/layers/hillshading2d/hillshading2d.fs.glsl.d.ts +2 -0
- package/dist/layers/hillshading2d/hillshading2d.fs.glsl.js +62 -0
- package/dist/layers/hillshading2d/hillshading2d.fs.glsl.js.map +1 -0
- package/dist/layers/hillshading2d/hillshading2dLayer.d.ts +22 -0
- package/dist/layers/hillshading2d/hillshading2dLayer.js +101 -0
- package/dist/layers/hillshading2d/hillshading2dLayer.js.map +1 -0
- package/dist/layers/index.d.ts +34 -0
- package/dist/layers/index.js +19 -0
- package/dist/layers/index.js.map +1 -0
- package/dist/layers/intersection/unfoldedGeoJsonLayer.d.ts +10 -0
- package/dist/layers/intersection/unfoldedGeoJsonLayer.js +64 -0
- package/dist/layers/intersection/unfoldedGeoJsonLayer.js.map +1 -0
- package/dist/layers/map/fragment.fs.glsl.d.ts +2 -0
- package/dist/layers/map/fragment.fs.glsl.js +127 -0
- package/dist/layers/map/fragment.fs.glsl.js.map +1 -0
- package/dist/layers/map/fragment_lines.glsl.d.ts +2 -0
- package/dist/layers/map/fragment_lines.glsl.js +21 -0
- package/dist/layers/map/fragment_lines.glsl.js.map +1 -0
- package/dist/layers/map/mapLayer.d.ts +120 -0
- package/dist/layers/map/mapLayer.js +275 -0
- package/dist/layers/map/mapLayer.js.map +1 -0
- package/dist/layers/map/privateMapLayer.d.ts +76 -0
- package/dist/layers/map/privateMapLayer.js +190 -0
- package/dist/layers/map/privateMapLayer.js.map +1 -0
- package/dist/layers/map/vertex.glsl.d.ts +2 -0
- package/dist/layers/map/vertex.glsl.js +45 -0
- package/dist/layers/map/vertex.glsl.js.map +1 -0
- package/dist/layers/map/vertex_lines.glsl.d.ts +2 -0
- package/dist/layers/map/vertex_lines.glsl.js +16 -0
- package/dist/layers/map/vertex_lines.glsl.js.map +1 -0
- package/dist/layers/map/webworker.d.ts +4 -0
- package/dist/layers/map/webworker.js +362 -0
- package/dist/layers/map/webworker.js.map +1 -0
- package/dist/layers/northarrow/northArrow3DLayer.d.ts +20 -0
- package/dist/layers/northarrow/northArrow3DLayer.js +144 -0
- package/dist/layers/northarrow/northArrow3DLayer.js.map +1 -0
- package/dist/layers/northarrow/northarrow-fragment.glsl.d.ts +2 -0
- package/dist/layers/northarrow/northarrow-fragment.glsl.js +15 -0
- package/dist/layers/northarrow/northarrow-fragment.glsl.js.map +1 -0
- package/dist/layers/northarrow/northarrow-vertex.glsl.d.ts +2 -0
- package/dist/layers/northarrow/northarrow-vertex.glsl.js +14 -0
- package/dist/layers/northarrow/northarrow-vertex.glsl.js.map +1 -0
- package/dist/layers/piechart/fragment.glsl.d.ts +2 -0
- package/dist/layers/piechart/fragment.glsl.js +43 -0
- package/dist/layers/piechart/fragment.glsl.js.map +1 -0
- package/dist/layers/piechart/pieChartLayer.d.ts +40 -0
- package/dist/layers/piechart/pieChartLayer.js +174 -0
- package/dist/layers/piechart/pieChartLayer.js.map +1 -0
- package/dist/layers/piechart/vertex.glsl.d.ts +2 -0
- package/dist/layers/piechart/vertex.glsl.js +43 -0
- package/dist/layers/piechart/vertex.glsl.js.map +1 -0
- package/dist/layers/points/pointsLayer.d.ts +34 -0
- package/dist/layers/points/pointsLayer.js +78 -0
- package/dist/layers/points/pointsLayer.js.map +1 -0
- package/dist/layers/polylines/polylinesLayer.d.ts +50 -0
- package/dist/layers/polylines/polylinesLayer.js +157 -0
- package/dist/layers/polylines/polylinesLayer.js.map +1 -0
- package/dist/layers/selectable_geojson/selectableGeoJsonLayer.d.ts +6 -0
- package/dist/layers/selectable_geojson/selectableGeoJsonLayer.js +22 -0
- package/dist/layers/selectable_geojson/selectableGeoJsonLayer.js.map +1 -0
- package/dist/layers/shader_modules/decoder.d.ts +15 -0
- package/dist/layers/shader_modules/decoder.fs.glsl.d.ts +2 -0
- package/dist/layers/shader_modules/decoder.fs.glsl.js +40 -0
- package/dist/layers/shader_modules/decoder.fs.glsl.js.map +1 -0
- package/dist/layers/shader_modules/decoder.js +29 -0
- package/dist/layers/shader_modules/decoder.js.map +1 -0
- package/dist/layers/shader_modules/index.d.ts +1 -0
- package/dist/layers/shader_modules/index.js +2 -0
- package/dist/layers/shader_modules/index.js.map +1 -0
- package/dist/layers/terrain/map3DLayer.d.ts +42 -0
- package/dist/layers/terrain/map3DLayer.js +324 -0
- package/dist/layers/terrain/map3DLayer.js.map +1 -0
- package/dist/layers/terrain/terrainMapLayer.d.ts +45 -0
- package/dist/layers/terrain/terrainMapLayer.js +183 -0
- package/dist/layers/terrain/terrainMapLayer.js.map +1 -0
- package/dist/layers/terrain/terrainmap.fs.glsl.d.ts +2 -0
- package/dist/layers/terrain/terrainmap.fs.glsl.js +134 -0
- package/dist/layers/terrain/terrainmap.fs.glsl.js.map +1 -0
- package/dist/layers/triangle/fragment.fs.glsl.d.ts +2 -0
- package/dist/layers/triangle/fragment.fs.glsl.js +126 -0
- package/dist/layers/triangle/fragment.fs.glsl.js.map +1 -0
- package/dist/layers/triangle/fragment_lines.glsl.d.ts +2 -0
- package/dist/layers/triangle/fragment_lines.glsl.js +21 -0
- package/dist/layers/triangle/fragment_lines.glsl.js.map +1 -0
- package/dist/layers/triangle/privateTriangleLayer.d.ts +70 -0
- package/dist/layers/triangle/privateTriangleLayer.js +108 -0
- package/dist/layers/triangle/privateTriangleLayer.js.map +1 -0
- package/dist/layers/triangle/test_data/surfacePoints.d.ts +2 -0
- package/dist/layers/triangle/test_data/surfacePoints.js +4345 -0
- package/dist/layers/triangle/test_data/surfacePoints.js.map +1 -0
- package/dist/layers/triangle/test_data/surfaceTriangles.d.ts +2 -0
- package/dist/layers/triangle/test_data/surfaceTriangles.js +7393 -0
- package/dist/layers/triangle/test_data/surfaceTriangles.js.map +1 -0
- package/dist/layers/triangle/triangleLayer.d.ts +60 -0
- package/dist/layers/triangle/triangleLayer.js +170 -0
- package/dist/layers/triangle/triangleLayer.js.map +1 -0
- package/dist/layers/triangle/vertex.glsl.d.ts +2 -0
- package/dist/layers/triangle/vertex.glsl.js +35 -0
- package/dist/layers/triangle/vertex.glsl.js.map +1 -0
- package/dist/layers/triangle/vertex_lines.glsl.d.ts +2 -0
- package/dist/layers/triangle/vertex_lines.glsl.js +16 -0
- package/dist/layers/triangle/vertex_lines.glsl.js.map +1 -0
- package/dist/layers/triangle/webworker.d.ts +4 -0
- package/dist/layers/triangle/webworker.js +132 -0
- package/dist/layers/triangle/webworker.js.map +1 -0
- package/dist/layers/utils/layerTools.d.ts +52 -0
- package/dist/layers/utils/layerTools.js +91 -0
- package/dist/layers/utils/layerTools.js.map +1 -0
- package/dist/layers/utils/propertyMapTools.d.ts +8 -0
- package/dist/layers/utils/propertyMapTools.js +21 -0
- package/dist/layers/utils/propertyMapTools.js.map +1 -0
- package/dist/layers/wells/utils/spline.d.ts +28 -0
- package/dist/layers/wells/utils/spline.js +236 -0
- package/dist/layers/wells/utils/spline.js.map +1 -0
- package/dist/layers/wells/wellsLayer.d.ts +89 -0
- package/dist/layers/wells/wellsLayer.js +939 -0
- package/dist/layers/wells/wellsLayer.js.map +1 -0
- package/dist/package.json +35 -0
- package/dist/redux/actions.d.ts +1 -0
- package/dist/redux/actions.js +3 -0
- package/dist/redux/actions.js.map +1 -0
- package/dist/redux/reducer.d.ts +11 -0
- package/dist/redux/reducer.js +28 -0
- package/dist/redux/reducer.js.map +1 -0
- package/dist/redux/store.d.ts +4 -0
- package/dist/redux/store.js +10 -0
- package/dist/redux/store.js.map +1 -0
- package/dist/redux/types.d.ts +43 -0
- package/dist/redux/types.js +79 -0
- package/dist/redux/types.js.map +1 -0
- package/dist/storybook/SubsurfaceViewer.stories.d.ts +455 -0
- package/dist/storybook/SubsurfaceViewer.stories.js +537 -0
- package/dist/storybook/SubsurfaceViewer.stories.js.map +1 -0
- package/dist/storybook/components/InfoCard.stories.d.ts +48 -0
- package/dist/storybook/components/InfoCard.stories.js +36 -0
- package/dist/storybook/components/InfoCard.stories.js.map +1 -0
- package/dist/storybook/components/colorLegends/ContinuousLegend.stories.d.ts +31 -0
- package/dist/storybook/components/colorLegends/ContinuousLegend.stories.js +30 -0
- package/dist/storybook/components/colorLegends/ContinuousLegend.stories.js.map +1 -0
- package/dist/storybook/components/colorLegends/DiscreteLegend.stories.d.ts +31 -0
- package/dist/storybook/components/colorLegends/DiscreteLegend.stories.js +30 -0
- package/dist/storybook/components/colorLegends/DiscreteLegend.stories.js.map +1 -0
- package/dist/storybook/components/colorLegends/IndividualScaleForMap.stories.d.ts +20 -0
- package/dist/storybook/components/colorLegends/IndividualScaleForMap.stories.js +66 -0
- package/dist/storybook/components/colorLegends/IndividualScaleForMap.stories.js.map +1 -0
- package/dist/storybook/components/colorLegends/SingleScaleForMap.stories.d.ts +65 -0
- package/dist/storybook/components/colorLegends/SingleScaleForMap.stories.js +94 -0
- package/dist/storybook/components/colorLegends/SingleScaleForMap.stories.js.map +1 -0
- package/dist/storybook/components/settings/LayerSettingsButton.stories.d.ts +34 -0
- package/dist/storybook/components/settings/LayerSettingsButton.stories.js +31 -0
- package/dist/storybook/components/settings/LayerSettingsButton.stories.js.map +1 -0
- package/dist/storybook/components/settings/NumericInput.stories.d.ts +14 -0
- package/dist/storybook/components/settings/NumericInput.stories.js +15 -0
- package/dist/storybook/components/settings/NumericInput.stories.js.map +1 -0
- package/dist/storybook/components/settings/ToggleButton.stories.d.ts +13 -0
- package/dist/storybook/components/settings/ToggleButton.stories.js +14 -0
- package/dist/storybook/components/settings/ToggleButton.stories.js.map +1 -0
- package/dist/storybook/schemaValidation/sampleData.d.ts +122 -0
- package/dist/storybook/schemaValidation/sampleData.js +172 -0
- package/dist/storybook/schemaValidation/sampleData.js.map +1 -0
- package/dist/storybook/schemaValidation/schemaValidation.stories.d.ts +31 -0
- package/dist/storybook/schemaValidation/schemaValidation.stories.js +42 -0
- package/dist/storybook/schemaValidation/schemaValidation.stories.js.map +1 -0
- package/dist/utils/configuration.d.ts +631 -0
- package/dist/utils/configuration.js +36 -0
- package/dist/utils/configuration.js.map +1 -0
- package/dist/utils/fit-bounds.d.ts +15 -0
- package/dist/utils/fit-bounds.js +66 -0
- package/dist/utils/fit-bounds.js.map +1 -0
- package/dist/utils/measurement.d.ts +6 -0
- package/dist/utils/measurement.js +47 -0
- package/dist/utils/measurement.js.map +1 -0
- package/dist/utils/northArrow.d.ts +113 -0
- package/dist/utils/northArrow.js +5 -0
- package/dist/utils/northArrow.js.map +1 -0
- package/dist/utils/specExtractor.d.ts +3 -0
- package/dist/utils/specExtractor.js +24 -0
- package/dist/utils/specExtractor.js.map +1 -0
- package/dist/viewports/index.d.ts +1 -0
- package/dist/viewports/index.js +2 -0
- package/dist/viewports/index.js.map +1 -0
- package/dist/viewports/intersectionViewport.d.ts +35 -0
- package/dist/viewports/intersectionViewport.js +65 -0
- package/dist/viewports/intersectionViewport.js.map +1 -0
- package/dist/views/index.d.ts +1 -0
- package/dist/views/index.js +2 -0
- package/dist/views/index.js.map +1 -0
- package/dist/views/intersectionView.d.ts +18 -0
- package/dist/views/intersectionView.js +17 -0
- package/dist/views/intersectionView.js.map +1 -0
- package/package.json +35 -0
- package/src/DashSubsurfaceViewer.tsx +270 -0
- package/src/SubsurfaceViewer.stories.tsx +449 -0
- package/src/SubsurfaceViewer.test.tsx +98 -0
- package/src/SubsurfaceViewer.tsx +356 -0
- package/src/__snapshots__/SubsurfaceViewer.test.tsx.snap +178 -0
- package/src/assets/glTF/north_arrow/scene.bin +0 -0
- package/src/assets/glTF/north_arrow/scene.gltf +315 -0
- package/src/assets/glTF/north_arrow/textures/Arrow5_baseColor.png +0 -0
- package/src/assets/glTF/north_arrow/textures/Arrow5_metallicRoughness.png +0 -0
- package/src/assets/glTF/north_arrow/textures/Arrow5_normal.png +0 -0
- package/src/components/ColorLegend.test.tsx +32 -0
- package/src/components/ColorLegend.tsx +80 -0
- package/src/components/ColorLegends.test.tsx +97 -0
- package/src/components/ColorLegends.tsx +46 -0
- package/src/components/DistanceScale.stories.tsx +28 -0
- package/src/components/DistanceScale.test.tsx +36 -0
- package/src/components/DistanceScale.tsx +84 -0
- package/src/components/InfoCard.test.tsx +110 -0
- package/src/components/InfoCard.tsx +263 -0
- package/src/components/Map.test.tsx +142 -0
- package/src/components/Map.tsx +1435 -0
- package/src/components/StatusIndicator.test.tsx +14 -0
- package/src/components/StatusIndicator.tsx +38 -0
- package/src/components/ViewAnnotation.tsx +16 -0
- package/src/components/ViewFooter.test.tsx +12 -0
- package/src/components/ViewFooter.tsx +30 -0
- package/src/components/__snapshots__/ColorLegends.test.tsx.snap +15 -0
- package/src/components/__snapshots__/DistanceScale.test.tsx.snap +33 -0
- package/src/components/__snapshots__/InfoCard.test.tsx.snap +561 -0
- package/src/components/__snapshots__/Map.test.tsx.snap +119 -0
- package/src/components/__snapshots__/StatusIndicator.test.tsx.snap +3 -0
- package/src/components/__snapshots__/ViewFooter.test.tsx.snap +7 -0
- package/src/components/settings/DrawModeSelector.test.tsx +45 -0
- package/src/components/settings/DrawModeSelector.tsx +58 -0
- package/src/components/settings/DrawModeSelector_performance.test.tsx +35 -0
- package/src/components/settings/LayerProperty.test.tsx +35 -0
- package/src/components/settings/LayerProperty.tsx +153 -0
- package/src/components/settings/LayerProperty_performance.test.tsx +39 -0
- package/src/components/settings/LayerSettingsButton.test.tsx +133 -0
- package/src/components/settings/LayerSettingsButton.tsx +95 -0
- package/src/components/settings/LayersButton.test.tsx +102 -0
- package/src/components/settings/LayersButton.tsx +97 -0
- package/src/components/settings/NumericInput.test.tsx +25 -0
- package/src/components/settings/NumericInput.tsx +67 -0
- package/src/components/settings/Settings.tsx +71 -0
- package/src/components/settings/SliderInput.test.tsx +28 -0
- package/src/components/settings/SliderInput.tsx +71 -0
- package/src/components/settings/ToggleButton.test.tsx +25 -0
- package/src/components/settings/ToggleButton.tsx +53 -0
- package/src/components/settings/__snapshots__/DrawModeSelector.test.tsx.snap +124 -0
- package/src/components/settings/__snapshots__/LayerProperty.test.tsx.snap +124 -0
- package/src/components/settings/__snapshots__/LayerSettingsButton.test.tsx.snap +36 -0
- package/src/components/settings/__snapshots__/LayersButton.test.tsx.snap +83 -0
- package/src/components/settings/__snapshots__/NumericInput.test.tsx.snap +123 -0
- package/src/components/settings/__snapshots__/SliderInput.test.tsx.snap +244 -0
- package/src/components/settings/__snapshots__/ToggleButton.test.tsx.snap +182 -0
- package/src/custom.d.ts +9 -0
- package/src/index.ts +5 -0
- package/src/inputSchema/ColorTables.json +51 -0
- package/src/inputSchema/FaultPolygons.json +80 -0
- package/src/inputSchema/Grid.json +39 -0
- package/src/inputSchema/PieChart.json +72 -0
- package/src/inputSchema/WellLog.json +126 -0
- package/src/inputSchema/WellLogTemplate.json +136 -0
- package/src/inputSchema/WellLogs.json +5 -0
- package/src/inputSchema/Wells.json +106 -0
- package/src/inputSchema/schemaValidationUtil.tsx +55 -0
- package/src/inputSchema/validator.tsx +72 -0
- package/src/inputSchema/wellCompletions.json +108 -0
- package/src/layers/BoxSelectionLayer/boxSelectionLayer.stories.tsx +172 -0
- package/src/layers/BoxSelectionLayer/boxSelectionLayer.tsx +136 -0
- package/src/layers/axes/axes-fragment.glsl.ts +15 -0
- package/src/layers/axes/axesLayer.stories.tsx +87 -0
- package/src/layers/axes/axesLayer.ts +692 -0
- package/src/layers/axes/boxLayer.ts +71 -0
- package/src/layers/axes/grid-vertex.glsl.ts +14 -0
- package/src/layers/axes2d/axes2DLayer.stories.tsx +150 -0
- package/src/layers/axes2d/axes2DLayer.ts +841 -0
- package/src/layers/axes2d/font-atlas.png +0 -0
- package/src/layers/axes2d/label-fragment.glsl.js +37 -0
- package/src/layers/axes2d/label-vertex.glsl.js +20 -0
- package/src/layers/axes2d/line-fragment.glsl.js +14 -0
- package/src/layers/axes2d/line-vertex.glsl.js +13 -0
- package/src/layers/colormap/colormap.fs.glsl.ts +42 -0
- package/src/layers/colormap/colormapLayer.ts +247 -0
- package/src/layers/drawing/drawingLayer.tsx +256 -0
- package/src/layers/fault_polygons/faultPolygonsLayer.ts +54 -0
- package/src/layers/grid3d/fragment.fs.glsl.ts +109 -0
- package/src/layers/grid3d/fragment_lines.glsl.ts +21 -0
- package/src/layers/grid3d/grid3dLayer.stories.tsx +172 -0
- package/src/layers/grid3d/grid3dLayer.ts +248 -0
- package/src/layers/grid3d/privateLayer.ts +292 -0
- package/src/layers/grid3d/vertex.glsl.ts +43 -0
- package/src/layers/grid3d/vertex_lines.glsl.ts +15 -0
- package/src/layers/grid3d/webworker.ts +173 -0
- package/src/layers/hillshading2d/hillshading2d.fs.glsl.ts +62 -0
- package/src/layers/hillshading2d/hillshading2dLayer.ts +172 -0
- package/src/layers/index.ts +35 -0
- package/src/layers/intersection/intersectionView.stories.tsx +294 -0
- package/src/layers/intersection/unfoldedGeoJsonLayer.ts +92 -0
- package/src/layers/map/fragment.fs.glsl.ts +127 -0
- package/src/layers/map/fragment_lines.glsl.ts +21 -0
- package/src/layers/map/mapLayer.stories.tsx +1369 -0
- package/src/layers/map/mapLayer.ts +470 -0
- package/src/layers/map/privateMapLayer.ts +317 -0
- package/src/layers/map/vertex.glsl.ts +45 -0
- package/src/layers/map/vertex_lines.glsl.ts +15 -0
- package/src/layers/map/webworker.ts +479 -0
- package/src/layers/northarrow/northArrow.stories.tsx +108 -0
- package/src/layers/northarrow/northArrow3DLayer.ts +204 -0
- package/src/layers/northarrow/northarrow-fragment.glsl.js +14 -0
- package/src/layers/northarrow/northarrow-vertex.glsl.js +13 -0
- package/src/layers/piechart/fragment.glsl.js +42 -0
- package/src/layers/piechart/pieChartLayer.ts +246 -0
- package/src/layers/piechart/vertex.glsl.js +42 -0
- package/src/layers/points/pointsLayer.stories.tsx +141 -0
- package/src/layers/points/pointsLayer.ts +143 -0
- package/src/layers/polylines/polylinesLayer.stories.tsx +144 -0
- package/src/layers/polylines/polylinesLayer.ts +263 -0
- package/src/layers/selectable_geojson/selectableGeoJsonLayer.ts +25 -0
- package/src/layers/shader_modules/decoder.fs.glsl.ts +41 -0
- package/src/layers/shader_modules/decoder.ts +46 -0
- package/src/layers/shader_modules/index.ts +1 -0
- package/src/layers/terrain/map3DLayer.stories.tsx +340 -0
- package/src/layers/terrain/map3DLayer.ts +556 -0
- package/src/layers/terrain/terrainMapLayer.ts +334 -0
- package/src/layers/terrain/terrainmap.fs.glsl.ts +134 -0
- package/src/layers/triangle/fragment.fs.glsl.ts +126 -0
- package/src/layers/triangle/fragment_lines.glsl.ts +21 -0
- package/src/layers/triangle/privateTriangleLayer.ts +203 -0
- package/src/layers/triangle/test_data/surfacePoints.ts +4344 -0
- package/src/layers/triangle/test_data/surfaceTriangles.ts +7392 -0
- package/src/layers/triangle/triangleLayer.stories.tsx +191 -0
- package/src/layers/triangle/triangleLayer.ts +273 -0
- package/src/layers/triangle/vertex.glsl.ts +35 -0
- package/src/layers/triangle/vertex_lines.glsl.ts +15 -0
- package/src/layers/triangle/webworker.ts +165 -0
- package/src/layers/utils/glsl.d.ts +4 -0
- package/src/layers/utils/layerTools.ts +182 -0
- package/src/layers/utils/propertyMapTools.ts +43 -0
- package/src/layers/wells/utils/spline.ts +318 -0
- package/src/layers/wells/wellsLayer.stories.tsx +625 -0
- package/src/layers/wells/wellsLayer.ts +1377 -0
- package/src/redux/actions.ts +8 -0
- package/src/redux/reducer.ts +43 -0
- package/src/redux/store.ts +15 -0
- package/src/redux/types.ts +114 -0
- package/src/storybook/SubsurfaceViewer.stories.jsx +644 -0
- package/src/storybook/components/InfoCard.stories.jsx +39 -0
- package/src/storybook/components/colorLegends/ContinuousLegend.stories.jsx +32 -0
- package/src/storybook/components/colorLegends/DiscreteLegend.stories.jsx +33 -0
- package/src/storybook/components/colorLegends/IndividualScaleForMap.stories.jsx +99 -0
- package/src/storybook/components/colorLegends/SingleScaleForMap.stories.jsx +120 -0
- package/src/storybook/components/settings/LayerSettingsButton.stories.jsx +34 -0
- package/src/storybook/components/settings/NumericInput.stories.jsx +17 -0
- package/src/storybook/components/settings/ToggleButton.stories.jsx +16 -0
- package/src/storybook/schemaValidation/sampleData.js +177 -0
- package/src/storybook/schemaValidation/schemaValidation.stories.jsx +91 -0
- package/src/test/TestWrapper.tsx +13 -0
- package/src/utils/configuration.ts +61 -0
- package/src/utils/fit-bounds.js +85 -0
- package/src/utils/measurement.ts +61 -0
- package/src/utils/northArrow.ts +4 -0
- package/src/utils/specExtractor.ts +36 -0
- package/src/viewports/index.js +1 -0
- package/src/viewports/intersectionViewport.ts +137 -0
- package/src/views/index.js +1 -0
- package/src/views/intersectionView.ts +38 -0
- package/tsconfig.json +7 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { PickingInfo } from "@deck.gl/core/typed";
|
|
2
|
+
import { Color } from "@deck.gl/core/typed";
|
|
3
|
+
import { Layer, LayersList, LayerManager, CompositeLayerProps } from "@deck.gl/core/typed";
|
|
4
|
+
import { Matrix4 } from "math.gl";
|
|
5
|
+
import { ContinuousLegendDataType, DiscreteLegendDataType } from "../../components/ColorLegend";
|
|
6
|
+
export type Position3D = [number, number, number];
|
|
7
|
+
export type colorMapFunctionType = (x: number) => [number, number, number];
|
|
8
|
+
export interface ExtendedLayerProps<D> extends CompositeLayerProps<D> {
|
|
9
|
+
"@@type"?: string;
|
|
10
|
+
name: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ExtendedLayer<D> extends Layer<D> {
|
|
13
|
+
getLegendData?: () => DiscreteLegendDataType | ContinuousLegendDataType;
|
|
14
|
+
}
|
|
15
|
+
export interface PropertyDataType {
|
|
16
|
+
name: string;
|
|
17
|
+
value: string | number;
|
|
18
|
+
color?: Color;
|
|
19
|
+
}
|
|
20
|
+
export interface LayerPickInfo extends PickingInfo {
|
|
21
|
+
propertyValue?: number;
|
|
22
|
+
properties?: PropertyDataType[];
|
|
23
|
+
}
|
|
24
|
+
export declare function createPropertyData(name: string, value: string | number, color?: Color): PropertyDataType;
|
|
25
|
+
export declare function getModelMatrix(deg: number, x: number, y: number): Matrix4;
|
|
26
|
+
export declare function getModelMatrixScale(scaleZ: number): Matrix4;
|
|
27
|
+
export declare function getLayersInViewport(layers: Record<string, unknown>[] | LayersList, layerIds: string[] | undefined): Record<string, unknown>[] | LayersList;
|
|
28
|
+
export declare function getLayersByType(layers: LayersList, type: string): LayersList;
|
|
29
|
+
export type NewLayersList = LayersList & {
|
|
30
|
+
id: string;
|
|
31
|
+
props: prop;
|
|
32
|
+
};
|
|
33
|
+
type prop = {
|
|
34
|
+
data: wellData;
|
|
35
|
+
visible: boolean;
|
|
36
|
+
};
|
|
37
|
+
type wellData = {
|
|
38
|
+
features: feature[];
|
|
39
|
+
type: string;
|
|
40
|
+
unit?: string;
|
|
41
|
+
};
|
|
42
|
+
type feature = {
|
|
43
|
+
properties: {
|
|
44
|
+
name: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export declare function getWellLayerByTypeAndSelectedWells(layers: LayersList, type: string, selectedWell: string): LayersList;
|
|
48
|
+
export declare function getLayersById(layers: LayersList, id: string): LayersList;
|
|
49
|
+
export declare function isDrawingEnabled(layer_manager: LayerManager): boolean;
|
|
50
|
+
export declare function invertZCoordinate(dataArray: Float32Array): void;
|
|
51
|
+
export declare function defineBoundingBox(dataArray: Float32Array): [number, number, number, number, number, number];
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Matrix4 } from "math.gl";
|
|
2
|
+
// Creates property object which will be used to display layer property
|
|
3
|
+
// in the info card.
|
|
4
|
+
export function createPropertyData(name, value, color) {
|
|
5
|
+
return {
|
|
6
|
+
name: name,
|
|
7
|
+
value: value,
|
|
8
|
+
color: color,
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
// Return a model matrix representing a rotation of "deg" degrees around the point x, y
|
|
12
|
+
export function getModelMatrix(deg, x, y) {
|
|
13
|
+
const rad = deg * 0.017453;
|
|
14
|
+
const IDENTITY = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
15
|
+
const m1 = new Matrix4(IDENTITY).translate([-x, -y, 0, 1]); // translate to origin
|
|
16
|
+
const mRot = new Matrix4(IDENTITY).rotateZ(rad); // rotate
|
|
17
|
+
const m2 = new Matrix4(IDENTITY).translate([x, y, 0, 1]); // translate back
|
|
18
|
+
// Make m2*mRot*m1
|
|
19
|
+
mRot.multiplyRight(m1);
|
|
20
|
+
const m2mRotm1 = m2.multiplyRight(mRot);
|
|
21
|
+
return m2mRotm1;
|
|
22
|
+
}
|
|
23
|
+
// Return a model matrix representing a rotation of "deg" degrees around the point x, y
|
|
24
|
+
export function getModelMatrixScale(scaleZ) {
|
|
25
|
+
const IDENTITY = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
26
|
+
const mScaleZ = new Matrix4(IDENTITY).scale([1, 1, scaleZ]);
|
|
27
|
+
return mScaleZ;
|
|
28
|
+
}
|
|
29
|
+
export function getLayersInViewport(layers, layerIds) {
|
|
30
|
+
if (layerIds && layerIds.length > 0 && layers) {
|
|
31
|
+
const layers_in_view = layers.filter((layer) => layerIds.includes(layer["id"]));
|
|
32
|
+
return layers_in_view;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
return layers;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export function getLayersByType(layers, type) {
|
|
39
|
+
if (!layers)
|
|
40
|
+
return [];
|
|
41
|
+
return layers.filter((l) => (l === null || l === void 0 ? void 0 : l.constructor.name) === type);
|
|
42
|
+
}
|
|
43
|
+
export function getWellLayerByTypeAndSelectedWells(layers, type, selectedWell) {
|
|
44
|
+
if (!layers)
|
|
45
|
+
return [];
|
|
46
|
+
return layers.filter((l) => {
|
|
47
|
+
return ((l === null || l === void 0 ? void 0 : l.constructor.name) === type &&
|
|
48
|
+
l.props.data.features.find((item) => item.properties.name === selectedWell));
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
export function getLayersById(layers, id) {
|
|
52
|
+
if (!layers)
|
|
53
|
+
return [];
|
|
54
|
+
return layers.filter((l) => l.id === id);
|
|
55
|
+
}
|
|
56
|
+
export function isDrawingEnabled(layer_manager) {
|
|
57
|
+
var _a;
|
|
58
|
+
const drawing_layer = (_a = layer_manager.getLayers({
|
|
59
|
+
layerIds: ["drawing-layer"],
|
|
60
|
+
})) === null || _a === void 0 ? void 0 : _a[0];
|
|
61
|
+
return (drawing_layer &&
|
|
62
|
+
drawing_layer.props.visible &&
|
|
63
|
+
drawing_layer.props.mode != "view");
|
|
64
|
+
}
|
|
65
|
+
export function invertZCoordinate(dataArray) {
|
|
66
|
+
for (let i = 2; i < dataArray.length; i += 3) {
|
|
67
|
+
dataArray[i] *= -1;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export function defineBoundingBox(dataArray) {
|
|
71
|
+
const length = dataArray.length;
|
|
72
|
+
let minX = Number.POSITIVE_INFINITY;
|
|
73
|
+
let minY = Number.POSITIVE_INFINITY;
|
|
74
|
+
let minZ = Number.POSITIVE_INFINITY;
|
|
75
|
+
let maxX = Number.NEGATIVE_INFINITY;
|
|
76
|
+
let maxY = Number.NEGATIVE_INFINITY;
|
|
77
|
+
let maxZ = Number.NEGATIVE_INFINITY;
|
|
78
|
+
for (let i = 0; i < length; i += 3) {
|
|
79
|
+
const x = dataArray[i];
|
|
80
|
+
const y = dataArray[i + 1];
|
|
81
|
+
const z = dataArray[i + 2];
|
|
82
|
+
minX = x < minX ? x : minX;
|
|
83
|
+
minY = y < minY ? y : minY;
|
|
84
|
+
minZ = z < minZ ? z : minZ;
|
|
85
|
+
maxX = x > maxX ? x : maxX;
|
|
86
|
+
maxY = y > maxY ? y : maxY;
|
|
87
|
+
maxZ = z > maxZ ? z : maxZ;
|
|
88
|
+
}
|
|
89
|
+
return [minX, minY, minZ, maxX, maxY, maxZ];
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=layerTools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layerTools.js","sourceRoot":"","sources":["../../../src/layers/utils/layerTools.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAiClC,uEAAuE;AACvE,oBAAoB;AACpB,MAAM,UAAU,kBAAkB,CAC9B,IAAY,EACZ,KAAs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AAC,iBAAiB,CAAC;IAEpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;QAChC,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAC3B,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAC3B,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC3B,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC3B,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAE3B,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC3B,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC3B,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;KAC9B;IACD,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Color } from "@deck.gl/core/typed";
|
|
2
|
+
export interface ValueDecoder {
|
|
3
|
+
rgbScaler: [number, number, number];
|
|
4
|
+
floatScaler: number;
|
|
5
|
+
offset: number;
|
|
6
|
+
step: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function decodeRGB([r, g, b]: Color, decoder: ValueDecoder, remapToRange?: [number, number]): number;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Decode an RGB pixel to a float value. Same operation the one performed in decoder.fs.glsl,
|
|
2
|
+
// but this time performed in the js world.
|
|
3
|
+
// Optionally, this function can also remap an [0, 1] value to a different range, [min, max].
|
|
4
|
+
export function decodeRGB([r, g, b], decoder, remapToRange) {
|
|
5
|
+
const { rgbScaler, floatScaler, offset, step } = decoder;
|
|
6
|
+
const [rScale, gScale, bScale] = rgbScaler;
|
|
7
|
+
r *= rScale * 256.0 * 256.0;
|
|
8
|
+
g *= gScale * 256.0;
|
|
9
|
+
b *= bScale;
|
|
10
|
+
let decodedValue = (r + g + b + offset) * floatScaler;
|
|
11
|
+
if (step > 0) {
|
|
12
|
+
decodedValue = Math.floor(decodedValue / step + 0.5) * step;
|
|
13
|
+
}
|
|
14
|
+
if (remapToRange) {
|
|
15
|
+
const [min, max] = remapToRange;
|
|
16
|
+
// If we know the min and max values, remap the [0, 1] decoded value to [min, max]
|
|
17
|
+
decodedValue = decodedValue * (max - min) + min;
|
|
18
|
+
}
|
|
19
|
+
return decodedValue;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=propertyMapTools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"propertyMapTools.js","sourceRoot":"","sources":["../../../src/layers/utils/propertyMapTools.ts"],"names":[],"mappings":"AAcA,6FAA6F;AAC7F,2CAA2C;AAC3C,6FAA6F;AAC7F,MAAM,UAAU,SAAS,CACrB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAQ,EAChB,OAAqB,EACrB,YAA+B;IAE/B,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IACzD,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IAE3C,CAAC,IAAI,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;IAC5B,CAAC,IAAI,MAAM,GAAG,KAAK,CAAC;IACpB,CAAC,IAAI,MAAM,CAAC;IAEZ,IAAI,YAAY,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,WAAW,CAAC;IAEtD,IAAI,IAAI,GAAG,CAAC,EAAE;QACV,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,IAAI,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC;KAC/D;IAED,IAAI,YAAY,EAAE;QACd,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,YAAY,CAAC;QAChC,kFAAkF;QAClF,YAAY,GAAG,YAAY,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;KACnD;IAED,OAAO,YAAY,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FeatureCollection } from "geojson";
|
|
2
|
+
import { Position3D } from "../../utils/layerTools";
|
|
3
|
+
/**
|
|
4
|
+
* Given four points P0, P1, P2, P4 and a argument t in the interval [0,1].
|
|
5
|
+
* returns function value at t. t == 0 corresponds to P1 and t == 1 corrsponds to P2
|
|
6
|
+
*
|
|
7
|
+
* See https://qroph.github.io/2018/07/30/smooth-paths-using-catmull-rom-splines.html
|
|
8
|
+
*/
|
|
9
|
+
export declare function CatmullRom1D(P0: number, P1: number, P2: number, P3: number, t: number): number;
|
|
10
|
+
/**
|
|
11
|
+
* Given four 3D points P0, P1, P2, P4 and a scalar argument t in the interval [0,1].
|
|
12
|
+
* returns function value (3D) at t. t == 0 corresponds to P1 and t == 1 corrsponds to P2
|
|
13
|
+
*
|
|
14
|
+
* See https://qroph.github.io/2018/07/30/smooth-paths-using-catmull-rom-splines.html
|
|
15
|
+
*/
|
|
16
|
+
export declare function CatmullRom(P0: Position3D, P1: Position3D, P2: Position3D, P3: Position3D, t: number): Position3D;
|
|
17
|
+
/**
|
|
18
|
+
* Will interpolate and refine wellpaths using spline interploation resulting
|
|
19
|
+
* in smoother curves with more points.
|
|
20
|
+
* Assumes 3D data.
|
|
21
|
+
*/
|
|
22
|
+
export declare function splineRefine(data_in: FeatureCollection): FeatureCollection;
|
|
23
|
+
export declare function flattenPath(data_in: FeatureCollection): FeatureCollection;
|
|
24
|
+
export declare function invertPath(data_in: FeatureCollection): FeatureCollection;
|
|
25
|
+
/**
|
|
26
|
+
* Calculates bounding box of all wells.
|
|
27
|
+
*/
|
|
28
|
+
export declare function GetBoundingBox(data: FeatureCollection): [number, number, number, number, number, number];
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { cloneDeep } from "lodash";
|
|
2
|
+
/**
|
|
3
|
+
* Given four points P0, P1, P2, P4 and a argument t in the interval [0,1].
|
|
4
|
+
* returns function value at t. t == 0 corresponds to P1 and t == 1 corrsponds to P2
|
|
5
|
+
*
|
|
6
|
+
* See https://qroph.github.io/2018/07/30/smooth-paths-using-catmull-rom-splines.html
|
|
7
|
+
*/
|
|
8
|
+
export function CatmullRom1D(P0, P1, P2, P3, t) {
|
|
9
|
+
const alpha = 0.5;
|
|
10
|
+
const tt = t * t;
|
|
11
|
+
const ttt = t * t * t;
|
|
12
|
+
const dist_p0_p1 = Math.sqrt((P1 - P0) * (P1 - P0) + (P1 - P0) * (P1 - P0) + (P1 - P0) * (P1 - P0));
|
|
13
|
+
const dist_p1_p2 = Math.sqrt((P1 - P2) * (P1 - P2) + (P1 - P2) * (P1 - P2) + (P1 - P2) * (P1 - P2));
|
|
14
|
+
const dist_p2_p3 = Math.sqrt((P3 - P2) * (P3 - P2) + (P3 - P2) * (P3 - P2) + (P3 - P2) * (P3 - P2));
|
|
15
|
+
const t01 = Math.pow(dist_p0_p1, alpha);
|
|
16
|
+
const t12 = Math.pow(dist_p1_p2, alpha);
|
|
17
|
+
const t23 = Math.pow(dist_p2_p3, alpha);
|
|
18
|
+
const m1 = P2 - P1 + t12 * ((P1 - P0) / t01 - (P2 - P0) / (t01 + t12));
|
|
19
|
+
const m2 = P2 - P1 + t12 * ((P3 - P2) / t23 - (P3 - P1) / (t12 + t23));
|
|
20
|
+
const a_x = 2 * (P1 - P2) + m1 + m2;
|
|
21
|
+
const b_x = -3 * (P1 - P2) - m1 - m1 - m2;
|
|
22
|
+
const c_x = m1;
|
|
23
|
+
const d_x = P1;
|
|
24
|
+
const x = a_x * ttt + b_x * tt + c_x * t + d_x;
|
|
25
|
+
return x;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Given four 3D points P0, P1, P2, P4 and a scalar argument t in the interval [0,1].
|
|
29
|
+
* returns function value (3D) at t. t == 0 corresponds to P1 and t == 1 corrsponds to P2
|
|
30
|
+
*
|
|
31
|
+
* See https://qroph.github.io/2018/07/30/smooth-paths-using-catmull-rom-splines.html
|
|
32
|
+
*/
|
|
33
|
+
export function CatmullRom(P0, P1, P2, P3, t) {
|
|
34
|
+
const alpha = 0.5;
|
|
35
|
+
const tt = t * t;
|
|
36
|
+
const ttt = t * t * t;
|
|
37
|
+
// disable eslint for some lines due to readability.
|
|
38
|
+
const dist_p0_p1 = Math.sqrt((P1[0] - P0[0]) * (P1[0] - P0[0]) + (P1[1] - P0[1]) * (P1[1] - P0[1]) + (P1[2] - P0[2]) * (P1[2] - P0[2])); // eslint-disable-line
|
|
39
|
+
const dist_p1_p2 = Math.sqrt((P1[0] - P2[0]) * (P1[0] - P2[0]) + (P1[1] - P2[1]) * (P1[1] - P2[1]) + (P1[2] - P2[2]) * (P1[2] - P2[2])); // eslint-disable-line
|
|
40
|
+
const dist_p2_p3 = Math.sqrt((P3[0] - P2[0]) * (P3[0] - P2[0]) + (P3[1] - P2[1]) * (P3[1] - P2[1]) + (P3[2] - P2[2]) * (P3[2] - P2[2])); // eslint-disable-line
|
|
41
|
+
const t01 = Math.pow(dist_p0_p1, alpha);
|
|
42
|
+
const t12 = Math.pow(dist_p1_p2, alpha);
|
|
43
|
+
const t23 = Math.pow(dist_p2_p3, alpha);
|
|
44
|
+
const m1_x = (P2[0] - P1[0] + t12 * ((P1[0] - P0[0]) / t01 - (P2[0] - P0[0]) / (t01 + t12))); // eslint-disable-line
|
|
45
|
+
const m1_y = (P2[1] - P1[1] + t12 * ((P1[1] - P0[1]) / t01 - (P2[1] - P0[1]) / (t01 + t12))); // eslint-disable-line
|
|
46
|
+
const m1_z = (P2[2] - P1[2] + t12 * ((P1[2] - P0[2]) / t01 - (P2[2] - P0[2]) / (t01 + t12))); // eslint-disable-line
|
|
47
|
+
const m2_x = (P2[0] - P1[0] + t12 * ((P3[0] - P2[0]) / t23 - (P3[0] - P1[0]) / (t12 + t23))); // eslint-disable-line
|
|
48
|
+
const m2_y = (P2[1] - P1[1] + t12 * ((P3[1] - P2[1]) / t23 - (P3[1] - P1[1]) / (t12 + t23))); // eslint-disable-line
|
|
49
|
+
const m2_z = (P2[2] - P1[2] + t12 * ((P3[2] - P2[2]) / t23 - (P3[2] - P1[2]) / (t12 + t23))); // eslint-disable-line
|
|
50
|
+
const a_x = 2 * (P1[0] - P2[0]) + m1_x + m2_x;
|
|
51
|
+
const a_y = 2 * (P1[1] - P2[1]) + m1_y + m2_y;
|
|
52
|
+
const a_z = 2 * (P1[2] - P2[2]) + m1_z + m2_z;
|
|
53
|
+
const b_x = -3 * (P1[0] - P2[0]) - m1_x - m1_x - m2_x;
|
|
54
|
+
const b_y = -3 * (P1[1] - P2[1]) - m1_y - m1_y - m2_y;
|
|
55
|
+
const b_z = -3 * (P1[2] - P2[2]) - m1_z - m1_z - m2_z;
|
|
56
|
+
const c_x = m1_x;
|
|
57
|
+
const c_y = m1_y;
|
|
58
|
+
const c_z = m1_z;
|
|
59
|
+
const d_x = P1[0];
|
|
60
|
+
const d_y = P1[1];
|
|
61
|
+
const d_z = P1[2];
|
|
62
|
+
const x = a_x * ttt + b_x * tt + c_x * t + d_x;
|
|
63
|
+
const y = a_y * ttt + b_y * tt + c_y * t + d_y;
|
|
64
|
+
const z = a_z * ttt + b_z * tt + c_z * t + d_z;
|
|
65
|
+
return [x, y, z];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Will interpolate and refine wellpaths using spline interploation resulting
|
|
69
|
+
* in smoother curves with more points.
|
|
70
|
+
* Assumes 3D data.
|
|
71
|
+
*/
|
|
72
|
+
export function splineRefine(data_in) {
|
|
73
|
+
var _a, _b;
|
|
74
|
+
const data = cloneDeep(data_in);
|
|
75
|
+
const no_wells = data.features.length;
|
|
76
|
+
for (let well_no = 0; well_no < no_wells; well_no++) {
|
|
77
|
+
const mds = (_a = data.features[well_no].properties) === null || _a === void 0 ? void 0 : _a["md"];
|
|
78
|
+
if (mds === undefined) {
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
const geometryCollection = data.features[well_no]
|
|
82
|
+
.geometry;
|
|
83
|
+
const lineString = geometryCollection === null || geometryCollection === void 0 ? void 0 : geometryCollection.geometries[1];
|
|
84
|
+
if (((_b = lineString.coordinates) === null || _b === void 0 ? void 0 : _b.length) === undefined) {
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
const coords = lineString.coordinates;
|
|
88
|
+
const n = coords.length;
|
|
89
|
+
const ts = n > 3 ? [0.2, 0.4, 0.6, 0.8] : [];
|
|
90
|
+
// Point before first.
|
|
91
|
+
const x0 = coords[0][0] - coords[1][0] + coords[0][0];
|
|
92
|
+
const y0 = coords[0][1] - coords[1][1] + coords[0][1];
|
|
93
|
+
const z0 = coords[0][2] - coords[1][2] + coords[0][2];
|
|
94
|
+
const P_first = [x0, y0, z0];
|
|
95
|
+
const md_first = mds[0][0] - mds[0][1] + mds[0][0];
|
|
96
|
+
// Point after last.
|
|
97
|
+
const xn = coords[n - 1][0] - coords[n - 2][0] + coords[n - 1][0];
|
|
98
|
+
const yn = coords[n - 1][1] - coords[n - 2][1] + coords[n - 1][1];
|
|
99
|
+
const zn = coords[n - 1][2] - coords[n - 2][2] + coords[n - 1][2];
|
|
100
|
+
const P_n = [xn, yn, zn];
|
|
101
|
+
const md_n = mds[0][n - 1] - mds[0][n - 2] + mds[0][n - 1];
|
|
102
|
+
const newCoordinates = [];
|
|
103
|
+
const newMds = [];
|
|
104
|
+
newMds.push([]);
|
|
105
|
+
for (let i = 0; i < n - 1; i += 1) {
|
|
106
|
+
let P0, P1, P2, P3;
|
|
107
|
+
let md0, md1, md2, md3;
|
|
108
|
+
if (i === 0) {
|
|
109
|
+
P0 = P_first;
|
|
110
|
+
P1 = coords[i + 0];
|
|
111
|
+
P2 = coords[i + 1];
|
|
112
|
+
P3 = coords[i + 2];
|
|
113
|
+
md0 = md_first;
|
|
114
|
+
md1 = mds[0][i + 0];
|
|
115
|
+
md2 = mds[0][i + 1];
|
|
116
|
+
md3 = mds[0][i + 2];
|
|
117
|
+
}
|
|
118
|
+
else if (i === n - 2) {
|
|
119
|
+
P0 = coords[n - 3];
|
|
120
|
+
P1 = coords[n - 2];
|
|
121
|
+
P2 = coords[n - 1];
|
|
122
|
+
P3 = P_n;
|
|
123
|
+
md0 = mds[0][n - 3];
|
|
124
|
+
md1 = mds[0][n - 2];
|
|
125
|
+
md2 = mds[0][n - 1];
|
|
126
|
+
md3 = md_n;
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
P0 = coords[i - 1];
|
|
130
|
+
P1 = coords[i - 0];
|
|
131
|
+
P2 = coords[i + 1];
|
|
132
|
+
P3 = coords[i + 2];
|
|
133
|
+
md0 = mds[0][i - 1];
|
|
134
|
+
md1 = mds[0][i - 0];
|
|
135
|
+
md2 = mds[0][i + 1];
|
|
136
|
+
md3 = mds[0][i + 2];
|
|
137
|
+
}
|
|
138
|
+
newCoordinates.push(P1);
|
|
139
|
+
newMds[0].push(md1);
|
|
140
|
+
// Skip first leg from platform to first survey point.
|
|
141
|
+
if (i > 1) {
|
|
142
|
+
for (let t_i = 0; t_i < ts.length; t_i += 1) {
|
|
143
|
+
const t = ts[t_i];
|
|
144
|
+
const [x, y, z] = CatmullRom(P0, P1, P2, P3, t);
|
|
145
|
+
const md = CatmullRom1D(md0, md1, md2, md3, t);
|
|
146
|
+
newCoordinates.push([x, y, z]);
|
|
147
|
+
newMds[0].push(md);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
newCoordinates.push(coords[n - 1]);
|
|
152
|
+
newMds[0].push(mds[0][n - 1]);
|
|
153
|
+
data.features[well_no].geometry
|
|
154
|
+
.geometries[1].coordinates = newCoordinates;
|
|
155
|
+
if (data.features[well_no].properties) {
|
|
156
|
+
data.features[well_no].properties["md"] = newMds; // eslint-disable-line
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return data;
|
|
160
|
+
}
|
|
161
|
+
export function flattenPath(data_in) {
|
|
162
|
+
var _a;
|
|
163
|
+
const data = cloneDeep(data_in);
|
|
164
|
+
const no_wells = data.features.length;
|
|
165
|
+
for (let well_no = 0; well_no < no_wells; well_no++) {
|
|
166
|
+
const geometryCollection = data.features[well_no]
|
|
167
|
+
.geometry;
|
|
168
|
+
const lineString = geometryCollection === null || geometryCollection === void 0 ? void 0 : geometryCollection.geometries[1];
|
|
169
|
+
if (((_a = lineString.coordinates) === null || _a === void 0 ? void 0 : _a.length) === undefined) {
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
const coords = lineString.coordinates;
|
|
173
|
+
// flatten by setting z value constant.
|
|
174
|
+
const coords_flat = coords.map((e) => {
|
|
175
|
+
return [e[0], e[1], 0.0];
|
|
176
|
+
});
|
|
177
|
+
data.features[well_no].geometry
|
|
178
|
+
.geometries[1].coordinates = coords_flat;
|
|
179
|
+
}
|
|
180
|
+
return data;
|
|
181
|
+
}
|
|
182
|
+
export function invertPath(data_in) {
|
|
183
|
+
var _a;
|
|
184
|
+
const data = cloneDeep(data_in);
|
|
185
|
+
const no_wells = data.features.length;
|
|
186
|
+
for (let well_no = 0; well_no < no_wells; well_no++) {
|
|
187
|
+
const geometryCollection = data.features[well_no]
|
|
188
|
+
.geometry;
|
|
189
|
+
const lineString = geometryCollection === null || geometryCollection === void 0 ? void 0 : geometryCollection.geometries[1];
|
|
190
|
+
if (((_a = lineString.coordinates) === null || _a === void 0 ? void 0 : _a.length) === undefined) {
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
const coords = lineString.coordinates;
|
|
194
|
+
// Invert path by multiplying depth with -1.
|
|
195
|
+
const coords_inverted = coords.map((e) => {
|
|
196
|
+
return [e[0], e[1], -e[2]];
|
|
197
|
+
});
|
|
198
|
+
data.features[well_no].geometry
|
|
199
|
+
.geometries[1].coordinates = coords_inverted;
|
|
200
|
+
}
|
|
201
|
+
return data;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Calculates bounding box of all wells.
|
|
205
|
+
*/
|
|
206
|
+
export function GetBoundingBox(data) {
|
|
207
|
+
var _a;
|
|
208
|
+
let xMin = 9999999999;
|
|
209
|
+
let yMin = 9999999999;
|
|
210
|
+
let zMin = 9999999999;
|
|
211
|
+
let xMax = -9999999999;
|
|
212
|
+
let yMax = -9999999999;
|
|
213
|
+
let zMax = -9999999999;
|
|
214
|
+
const no_wells = data.features.length;
|
|
215
|
+
for (let well_no = 0; well_no < no_wells; well_no++) {
|
|
216
|
+
const geometryCollection = data.features[well_no]
|
|
217
|
+
.geometry;
|
|
218
|
+
const lineString = geometryCollection === null || geometryCollection === void 0 ? void 0 : geometryCollection.geometries[1];
|
|
219
|
+
if (((_a = lineString.coordinates) === null || _a === void 0 ? void 0 : _a.length) === undefined) {
|
|
220
|
+
continue;
|
|
221
|
+
}
|
|
222
|
+
const coords = lineString.coordinates;
|
|
223
|
+
const n = coords.length;
|
|
224
|
+
for (let i = 0; i < n; i++) {
|
|
225
|
+
const xyz = coords[i];
|
|
226
|
+
xMin = xyz[0] < xMin ? xyz[0] : xMin;
|
|
227
|
+
yMin = xyz[1] < yMin ? xyz[1] : yMin;
|
|
228
|
+
zMin = xyz[2] < zMin ? xyz[2] : zMin;
|
|
229
|
+
xMax = xyz[0] > xMax ? xyz[0] : xMax;
|
|
230
|
+
yMax = xyz[1] > yMax ? xyz[1] : yMax;
|
|
231
|
+
zMax = xyz[2] > zMax ? xyz[2] : zMax;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return [xMin, yMin, zMin, xMax, yMax, zMax];
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=spline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spline.js","sourceRoot":"","sources":["../../../../src/layers/wells/utils/spline.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAGnC;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CACxB,EAAU,EACV,EAAU,EACV,EAAU,EACV,EAAU,EACV,CAAS;IAET,MAAM,KAAK,GAAG,GAAG,CAAC;IAClB,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAEtB,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CACxB,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CACxE,CAAC;IACF,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CACxB,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CACxE,CAAC;IACF,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CACxB,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,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CAAC,CAAC,IAAI,CAAC;YACrC,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;SACxC;KACJ;IAED,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Layer, LayersList, CompositeLayer, UpdateParameters, PickingInfo } from "@deck.gl/core/typed";
|
|
2
|
+
import { ExtendedLayerProps } from "../utils/layerTools";
|
|
3
|
+
import { Color } from "@deck.gl/core/typed";
|
|
4
|
+
import { Feature, FeatureCollection, GeoJsonProperties, Geometry } from "geojson";
|
|
5
|
+
import { LayerPickInfo } from "../utils/layerTools";
|
|
6
|
+
import { ContinuousLegendDataType, DiscreteLegendDataType } from "../../components/ColorLegend";
|
|
7
|
+
type StyleAccessorFunction = (object: Feature, objectInfo?: Record<string, unknown>) => StyleData;
|
|
8
|
+
type NumberPair = [number, number];
|
|
9
|
+
type DashAccessor = boolean | NumberPair | StyleAccessorFunction | undefined;
|
|
10
|
+
type ColorAccessor = Color | StyleAccessorFunction | undefined;
|
|
11
|
+
type SizeAccessor = number | StyleAccessorFunction | undefined;
|
|
12
|
+
type StyleData = NumberPair | Color | number;
|
|
13
|
+
type LineStyleAccessor = {
|
|
14
|
+
color?: ColorAccessor;
|
|
15
|
+
dash?: DashAccessor;
|
|
16
|
+
width?: SizeAccessor;
|
|
17
|
+
};
|
|
18
|
+
type WellHeadStyleAccessor = {
|
|
19
|
+
color?: ColorAccessor;
|
|
20
|
+
size?: SizeAccessor;
|
|
21
|
+
};
|
|
22
|
+
export interface WellsLayerProps<D> extends ExtendedLayerProps<D> {
|
|
23
|
+
pointRadiusScale: number;
|
|
24
|
+
lineWidthScale: number;
|
|
25
|
+
outline: boolean;
|
|
26
|
+
selectedWell: string;
|
|
27
|
+
logData: string | LogCurveDataType[];
|
|
28
|
+
logName: string;
|
|
29
|
+
logColor: string;
|
|
30
|
+
logrunName: string;
|
|
31
|
+
logRadius: number;
|
|
32
|
+
logCurves: boolean;
|
|
33
|
+
refine: boolean;
|
|
34
|
+
wellHeadStyle: WellHeadStyleAccessor;
|
|
35
|
+
colorMappingFunction: (x: number) => [number, number, number];
|
|
36
|
+
lineStyle: LineStyleAccessor;
|
|
37
|
+
wellNameVisible: boolean;
|
|
38
|
+
wellNameAtTop: boolean;
|
|
39
|
+
wellNameSize: number;
|
|
40
|
+
wellNameColor: Color;
|
|
41
|
+
isLog: boolean;
|
|
42
|
+
depthTest: boolean;
|
|
43
|
+
/** If true means that input z values are interpreted as depths.
|
|
44
|
+
* For example depth of z = 1000 corresponds to -1000 on the z axis. Default true.
|
|
45
|
+
*/
|
|
46
|
+
ZIncreasingDownwards: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface LogCurveDataType {
|
|
49
|
+
header: {
|
|
50
|
+
name: string;
|
|
51
|
+
well: string;
|
|
52
|
+
};
|
|
53
|
+
curves: {
|
|
54
|
+
name: string;
|
|
55
|
+
description: string;
|
|
56
|
+
}[];
|
|
57
|
+
data: number[][];
|
|
58
|
+
metadata_discrete: Record<string, {
|
|
59
|
+
attributes: unknown;
|
|
60
|
+
objects: Record<string, [Color, number]>;
|
|
61
|
+
}>;
|
|
62
|
+
}
|
|
63
|
+
export interface WellsPickInfo extends LayerPickInfo {
|
|
64
|
+
featureType?: string;
|
|
65
|
+
logName: string;
|
|
66
|
+
}
|
|
67
|
+
export declare function getSize(type: string, accessor: SizeAccessor, offset?: number): number | ((object: Feature) => number);
|
|
68
|
+
export default class WellsLayer extends CompositeLayer<WellsLayerProps<FeatureCollection<Geometry, GeoJsonProperties>>> {
|
|
69
|
+
onClick(info: WellsPickInfo): boolean;
|
|
70
|
+
setSelection(well: string | undefined, _selection?: [number | undefined, number | undefined]): void;
|
|
71
|
+
setMultiSelection(wells: string[] | undefined): void;
|
|
72
|
+
shouldUpdateState({ changeFlags }: UpdateParameters<this>): boolean;
|
|
73
|
+
getLegendData(value: LogCurveDataType[]): ContinuousLegendDataType | DiscreteLegendDataType | null;
|
|
74
|
+
setLegend(value: LogCurveDataType[]): void;
|
|
75
|
+
getLogLayer(): Layer;
|
|
76
|
+
getSelectionLayer(): Layer;
|
|
77
|
+
getLogCurveData(): LogCurveDataType[] | undefined;
|
|
78
|
+
setupLegend(): void;
|
|
79
|
+
renderLayers(): LayersList;
|
|
80
|
+
getPickingInfo({ info }: {
|
|
81
|
+
info: PickingInfo;
|
|
82
|
+
}): WellsPickInfo;
|
|
83
|
+
}
|
|
84
|
+
export declare function getLogValues(d: LogCurveDataType, logrun_name: string, log_name: string): number[];
|
|
85
|
+
export declare function getLogInfo(d: LogCurveDataType, logrun_name: string, log_name: string): {
|
|
86
|
+
name: string;
|
|
87
|
+
description: string;
|
|
88
|
+
} | undefined;
|
|
89
|
+
export {};
|