Working with 2D Horizon Layers

Note: you will need to include HorizonData and Horizon2D in your Module Dependencies list in addition to Viewer2D.

Creating a horizon 2D layer for a XSection window

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.

NamedProps layerProperties = new NamedProps();
layerProperties.putProperty(IHorizonLayer.LINE_COLOR, Color.RED);
IHorizonLayer layer = IHorizonLayer.factory.createLayer(xsectionWindow, horizonData, layerProperties, false);

Creating a horizon 2D layer for a Map window

In this example, we assume you have already created a horizon dataset horizonData and a Map window mapWindow.

NamedProps layerProperties = new NamedProps();
layerProperties.putProperty(IMapHorizonLayer.IS_INTERPOLATED, false);
IMapHorizonLayer layer = IMapHorizonLayer.factory.createLayer(mapWindow, horizonData, layerProperties, false);