{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Working With 2D Horizon Layers","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":false}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"working-with-2d-horizon-layers","__idx":0},"children":["Working With 2D Horizon Layers"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note"]},": you will need to include HorizonData and Horizon2D in your ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Module Dependencies"]}," list in addition to Viewer2D."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"creating-a-horizon-2d-layer-for-a-xsection-window","__idx":1},"children":["Creating a horizon 2D layer for a XSection window"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Horizon layers can only be added to a XSection window if that window already contains a seismic layer. In this example, we assume you have already created a horizon dataset horizonData and a XSection window xsectionWindow."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"NamedProps layerProperties = new NamedProps();\nlayerProperties.putProperty(IHorizonLayer.LINE_COLOR, Color.RED);\nIHorizonLayer layer = IHorizonLayer.factory.createLayer(xsectionWindow, horizonData, layerProperties, false);\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"creating-a-horizon-2d-layer-for-a-map-window","__idx":2},"children":["Creating a horizon 2D layer for a Map window"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In this example, we assume you have already created a horizon dataset horizonData and a Map window mapWindow."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"NamedProps layerProperties = new NamedProps();\nlayerProperties.putProperty(IMapHorizonLayer.IS_INTERPOLATED, false);\nIMapHorizonLayer layer = IMapHorizonLayer.factory.createLayer(mapWindow, horizonData, layerProperties, false);\n"},"children":[]}]},"headings":[{"value":"Working With 2D Horizon Layers","id":"working-with-2d-horizon-layers","depth":1},{"value":"Creating a horizon 2D layer for a XSection window","id":"creating-a-horizon-2d-layer-for-a-xsection-window","depth":3},{"value":"Creating a horizon 2D layer for a Map window","id":"creating-a-horizon-2d-layer-for-a-map-window","depth":3}],"frontmatter":{"title":"Working With 2D Horizon Layers","pageId":"intviewer-api-for-layers/working-with-2d-horizon-layers","seo":{"title":"Working With 2D Horizon Layers"}},"lastModified":"2026-10-22T14:32:05.573Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/intviewer/intviewer-api-for-layers/working-with-2d-horizon-layers","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}