{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["tabs","tab"]},"type":"markdown"},"seo":{"title":"Remote Overlay","description":"Accelerate E&P application development and protect your innovation by consuming our Data and Domain APIs / Platform APIs.","lang":"en-US","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":true,"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"remote-overlay","__idx":0},"children":["Remote Overlay"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial demonstrates how to use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["geotoolkit/scene/shapes/TiledShape"]}," to display server-side rendered overlays. The server-side code is based on the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/Seismic/Readers/CustomRemoteReader/customRemoteReader"},"children":["Custom Remote Reader tutorial"]}," Code to read seismic data from a SEG-Y file on the server side."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"creating-remote-overlay","__idx":1},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/Seismic/ImagesAndLayers/RemoteOverlay/remoteOverlay#CreatingRemoteOverlay"},"children":["#"]}," Creating Remote Overlay"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["We created two layers, which render the same SEG-Y in the browser and in the server-side code using node.js. For demonstration purposes only we use node.js on server size and some classes from GeoToolkit to read SEG-Y format. We don't recommend using the same server-side implementation in production because it was created to show server and client communication only. The server-side layers render seismic in density mode and the client-side receives binary data and renders traces in the 'wiggle' mode. The code below shows how to create and initialize overlay."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[]},{"$$mdtype":"Tag","name":"iframe","attributes":{"src":"https://dc2-documentation.s3.amazonaws.com/documentation/slb-docs-test/5.0/examples/vue/tutorials/index.html#/Seismic/ImagesAndLayers/RemoteOverlay/remoteOverlay?section=CreatingRemoteOverlay&extract=true","width":"100%","height":"548.5px","style":{"border":"none"}},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"creating-remote-overlay-with-dynamic-model","__idx":2},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/Seismic/ImagesAndLayers/RemoteOverlay/remoteOverlay#DynamicModel"},"children":["#"]}," Creating Remote Overlay with Dynamic Model"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The second part of the example uses the same initialization as previous one to bring a tiled image from the server using a dynamic model. It depends on screen resolution."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"source-code","__idx":3},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/Seismic/ImagesAndLayers/RemoteOverlay/remoteOverlay#Source"},"children":["#"]}," Source code"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"import { Events as NodeEvents } from \"@int/geotoolkit/scene/Node.ts\";\nimport { Rect } from \"@int/geotoolkit/util/Rect.ts\";\nimport { Events as RubberBandEvents } from \"@int/geotoolkit/controls/tools/RubberBand.ts\";\nimport { Plot } from \"@int/geotoolkit/plot/Plot.ts\";\nimport { SeismicWidget } from \"@int/geotoolkit/seismic/widgets/SeismicWidget.ts\";\nimport { NormalizationType } from \"@int/geotoolkit/seismic/pipeline/NormalizationType.ts\";\nimport { SeismicColors } from \"@int/geotoolkit/seismic/util/SeismicColors.ts\";\nimport { SeismicPipeline } from \"@int/geotoolkit/seismic/pipeline/SeismicPipeline.ts\";\nimport { RemoteSeismicDataSource } from \"@int/geotoolkit/seismic/data/RemoteSeismicDataSource.ts\";\nimport { ManipulatorType } from \"@int/geotoolkit/seismic/widgets/SeismicViewWidget.ts\";\nimport { createDynamicLayer, createRemoteLayerImage } from \"/src/code/Seismic/ImagesAndLayers/RemoteOverlay/remoteSeismicLayer.ts\";\nimport \"/src/code/Seismic/ImagesAndLayers/RemoteOverlay/nodeserverdataprovider.ts\";\nconst host = \"http://localhost:3001/\";\nconst activateRubberBandZoom = function(widget) {\n  widget.setManipulatorType(ManipulatorType.RubberBand);\n};\nconst activateRubberBandZoomAll = function(plots) {\n  for (let i = 0; i < plots.length; i++) {\n    activateRubberBandZoom(plots[i].getRoot());\n  }\n};\nconst resetRubberBandZoomAll = function(resetOnly, plots) {\n  for (let i = 0; i < plots.length; i++) {\n    resetRubberBandZoom(plots[i].getRoot(), resetOnly);\n  }\n};\nfunction resetRubberBandZoom(widget, resetOnly) {\n  if (widget.getManipulatorType() === ManipulatorType.RubberBand || resetOnly === true) {\n    widget.setManipulatorType(ManipulatorType.Panning);\n    return;\n  }\n  widget.resetZoom();\n  widget.fitToBounds();\n  widget.setManipulatorType(ManipulatorType.Panning);\n}\nconst createReader = function(onready, onfailure) {\n  const data = new RemoteSeismicDataSource({\n    \"host\": host,\n    \"file\": \"data/section.segy\",\n    \"version\": \"node\"\n  });\n  data.open(\n    () => {\n      data.select({}, (reader) => {\n        onready(reader);\n      });\n    },\n    (err) => {\n      onfailure(err);\n    }\n  );\n};\nconst createPipeline = function(reader) {\n  return new SeismicPipeline({\n    \"name\": \"Seismic\",\n    \"reader\": reader,\n    \"statistics\": reader.getStatistics()\n  }).setOptions({\n    \"normalization\": {\n      \"type\": NormalizationType.RMS,\n      \"scale\": 0.4\n    },\n    \"plot\": {\n      \"type\": {\n        \"wiggle\": true\n      },\n      \"decimationspacing\": 5\n    },\n    \"colors\": {\n      \"colormap\": SeismicColors.getDefault().createNamedColorMap(\"WhiteBlack\", 32)\n    }\n  });\n};\nfunction createPlot(canvas) {\n  const widget = new SeismicWidget({\n    \"colorbar\": {\n      \"axis\": {\n        \"tickgenerator\": {\n          \"edge\": {\n            \"tickvisible\": false,\n            \"labelvisible\": false\n          }\n        }\n      }\n    },\n    \"layouttype\": \"inside\",\n    \"statusbar\": {\n      \"visible\": false\n    }\n  });\n  return new Plot({\n    \"canvaselement\": canvas,\n    \"root\": widget\n  });\n}\nconst createRemoteSeismicOverlay = function(plots, pipeline, overlay, cb) {\n  const widget = plots[0].getRoot();\n  widget.setPipeline(pipeline);\n  createRemoteLayerImage(widget, overlay[\"destination\"], overlay[\"src\"]);\n  widget.getToolByName(\"rubberband\").on(RubberBandEvents.onZoomEnd, () => {\n    resetRubberBandZoomAll(true, plots);\n    cb();\n  });\n};\nconst createDynamicVelocityOverlay = function(plots, pipeline, overlay) {\n  const widget = plots[1].getRoot();\n  widget.setPipeline(pipeline);\n  createDynamicLayer(widget, overlay[\"destination\"], overlay[\"src\"]);\n};\nfunction createScene(canvas, canvasDynamic, onError, cb) {\n  const plots = [];\n  plots.push(createPlot(canvas));\n  plots.push(createPlot(canvasDynamic));\n  createReader((reader) => {\n    const pipeline = createPipeline(reader);\n    const pipelineModelLimits = pipeline.getModelLimits();\n    createRemoteSeismicOverlay(plots, pipeline, {\n      \"destination\": pipelineModelLimits.clone(),\n      \"src\": {\n        \"host\": host,\n        \"file\": \"data/section.segy\"\n      }\n    }, cb);\n    createDynamicVelocityOverlay(plots, pipeline, {\n      \"destination\": pipelineModelLimits.clone(),\n      \"src\": {\n        \"host\": host,\n        \"limits\": new Rect(0, 0, 4e4, 1400),\n        \"dynamic\": true\n      }\n    });\n    let lockSynchronization = false;\n    const synchronizeModelLimits = function(event, sender) {\n      if (lockSynchronization) {\n        return;\n      }\n      lockSynchronization = true;\n      const visibleModelLimits = sender.getVisibleSeismicModelLimits();\n      for (let i = 0; i < plots.length; i++) {\n        const widget = plots[i].getRoot();\n        if (widget !== sender) {\n          widget.setVisibleSeismicModelLimits(visibleModelLimits);\n        }\n      }\n      lockSynchronization = false;\n    };\n    for (let i = 0; i < plots.length; i++) {\n      const widget = plots[i].getRoot();\n      widget.on(NodeEvents.VisibleLimitsChanged, synchronizeModelLimits);\n    }\n  }, (error) => {\n    onError(true);\n  });\n  return plots;\n}\nexport { activateRubberBandZoomAll, createScene, resetRubberBandZoomAll };\n\ncreateScene(document.querySelector('[ref=\"CreatingRemoteOverlay\"]'), document.querySelector('[ref=\"DynamicModel\"]'), this.inputServerWarningDialog, () => {\n            this.setRubberBandSelectionEnabled(false);\n        });\n\n","lang":"ts"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"css","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"css","header":{"controls":{"copy":{}}},"source":"\n.cg-tooltip-holder {\n  position: relative;\n}\n\n.cg-tooltip {\n  position: absolute;\n  display: block;\n  padding: 2px 12px 3px 7px;\n  overflow: visible !important;\n  font-family: Roboto, Helvetica, Arial, sans-serif;\n  font-size: 13px;\n  background: white !important;\n  opacity: 0.9;\n  color: #333333;\n  border: solid 1px gray;\n  border-radius: 5px;\n  text-align: left;\n  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);\n  border-radius: 5px;\n  margin: 0 !important;\n  z-index: 10000;\n  max-width: 400px;\n  text-wrap: normal !important;\n  white-space: normal !important;\n}\n/* Default setting for tooltip */\n.cg-tooltip-container {\n  position: absolute;\n  display: block;\n  overflow: visible !important;\n  font-family: Roboto, Helvetica, Arial, sans-serif;\n  font-size: 12px;\n  padding: 3px 7px;\n  background: #f7f7f7;\n  color: #333333;\n  border: 1px solid #938e8e;\n  opacity: 0.8;\n  text-align: left;\n  box-shadow: 3px 3px 10px #888;\n  margin: 0 !important;\n  z-index: 10000;\n  max-width: 400px;\n  text-wrap: normal !important;\n  white-space: normal !important;\n  user-select: none;\n}\n@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {\n  .cg-tooltip-container {\n    border-radius: 0;\n  }\n}\n/* Default left arrow for tooltip */\n.cg-tooltip-arrow-left::before {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  left: 0;\n  top: 50%;\n  border: 5px solid transparent;\n  border-left: 0;\n  border-right: 5px solid  #938e8e;\n  transform: translate(calc(-100%), -50%);\n}\n.cg-tooltip-arrow-left::after {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  left: 0;\n  top: 50%;\n  border: 4px solid transparent;\n  border-left: 0;\n  border-right: 4px solid #f7f7f7;\n  transform: translate(calc(-100%), -50%);\n}\n/* Default top arrow for tooltip */\n.cg-tooltip-arrow-top::before {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  left: 50%;\n  top: 0;\n  border: 5px solid transparent;\n  border-top: 0;\n  border-bottom: 5px solid #938e8e;\n  transform: translate(-50%, -100%);\n}\n.cg-tooltip-arrow-top::after {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  left: 50%;\n  top: 0;\n  border: 4px solid transparent;\n  border-top: 0;\n  border-bottom: 4px solid #f7f7f7;\n  transform: translate(-50%, -100%);\n}\n/* Default right arrow for tooltip */\n.cg-tooltip-arrow-right::before {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  right: 0;\n  top: 50%;\n  border: 5px solid transparent;\n  border-right: 0;\n  border-left: 5px solid #938e8e;\n  transform: translate(100%, -50%);\n}\n.cg-tooltip-arrow-right::after {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  right: 0;\n  top: 50%;\n  border: 4px solid transparent;\n  border-right: 0;\n  border-left: 4px solid #f7f7f7;\n  transform: translate(100%, -50%);\n}\n/* Default bottom arrow for tooltip */\n.cg-tooltip-arrow-bottom::before {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  left: 50%;\n  bottom: 0px;\n  border: 5px solid transparent;\n  border-bottom: 0;\n  border-top: 5px solid #938e8e;\n  transform: translate(-50%, 100%);\n  z-index: 10000;\n}\n.cg-tooltip-arrow-bottom::after {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  left: 50%;\n  bottom: 0;\n  border: 4px solid transparent;\n  border-bottom: 0;\n  border-top: 4px solid #f7f7f7;\n  transform: translate(-50%, 100%);\n  z-index: 10000;\n}\n/* Tooltip item name */\n/* Tooltip item value */\n/* .cg-tooltip-item-value */\n/* Tooltip item value */\n.cg-tooltip-item-unit {\n  text-transform: none;\n}\n\n.cg-tooltip-item-name {\n    text-transform: capitalize;\n    white-space: nowrap;\n    vertical-align: middle;\n    font-size: 13px;\n}\n.cg-tooltip-row {\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  white-space: pre-wrap;\n  font-size: 12px;\n  line-height: 100%;\n  margin: 1px 0;\n}\n.cg-tooltip-title {\n  font-size: 13px;\n  height: 14px;\n  text-transform: capitalize;\n}\n.cg-tooltip-title .cg-tooltip-symbol {\n  margin-right: 0 !important;\n}\n.cg-tooltip-title-name {\n  vertical-align: middle;\n}\n.cg-tooltip-row + .cg-tooltip-row {\n  margin-top: 4px;\n}\n.cg-tooltip-row.cg-tooltip-title + .cg-tooltip-row {\n  margin-top: 5px;\n}\n.cg-tooltip-item-value + .cg-tooltip-item-unit {\n    margin-left: 1px;\n}\n/* Tooltip symbol */\n.cg-tooltip-symbol-cell {\n  display: inline-flex;\n  min-width: 13px; /* 10px size + 3px margin */\n}\n.cg-tooltip-symbol {\n  margin-right: 3px;\n  background-color: transparent;\n  display: block;\n}\n.cg-tooltip-symbol > img {\n  display: block;\n}\n.cg-tooltip-list-cell {\n  display: inline-flex;\n}\n.cg-tooltip-list-symbol {\n  display: block;\n  margin-right: 3px;\n  width: 6px;\n  height: 6px;\n  vertical-align: middle;\n  border-radius: 50%;\n  border: 1px solid rgba(0,0,0,.4);\n}\n.cg-tooltip-symbol-legacy {\n  border-radius: 4px;\n  margin-right: 5px;\n  height: 8px;\n  width: 8px;\n  display: inline-block;\n}\n.cg-tooltip-title-legacy {\n  font-weight: 900;\n}\n\n/* Tooltip symbol circle */\n.cg-tooltip-symbol.circle {\n  height: 10px;\n  width: 10px;\n  display: inline-block;\n  border-radius: 50%;\n  border: 1px solid rgba(0,0,0,.4);\n}\n/* Tooltip symbol line */\n.cg-tooltip-symbol.line {\n    height: 10px;\n    width: 10px;\n    display: inline-block;\n    transform: scale(1.2, 0.2);\n}\n/* Tooltip symbol diamond */\n.cg-tooltip-symbol.diamond {\n    height: 10px;\n    width: 10px;\n    display: inline-block;\n    transform: rotate(45deg);\n    border-radius: 0px;\n}\n/* Tooltip symbol square */\n.cg-tooltip-symbol.square {\n    height: 10px;\n    width: 10px;\n    display: inline-block;\n    border-radius: 0px;\n    border: 1px solid rgba(0,0,0,.4);\n}\n\n","lang":"css"},"children":[]}]}]}]},"headings":[{"value":"Remote Overlay","id":"remote-overlay","depth":1},{"value":"Creating Remote Overlay","id":"creating-remote-overlay","depth":3},{"value":"Creating Remote Overlay with Dynamic Model","id":"creating-remote-overlay-with-dynamic-model","depth":3},{"value":"Source code","id":"source-code","depth":3}],"frontmatter":{"title":"Remote Overlay","seo":{"title":"Remote Overlay"}},"lastModified":"2026-02-11T19:54:32.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/geotoolkit/tutorials/seismic/images-and-layers/remote-overlay","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}