Working with 2D Grid Surface Layers

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

Creating a grid surface 2D layer for a XSection window

Grid surface 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 grid surface dataset gridSurfaceData and a XSection window xsectionWindow.

NamedProps layerProperties = new NamedProps();
layerProperties.putProperty( IXSectionGridSurfaceLayer.LINE_COLOR, Color.RED);
IGridSurfaceLayer layer = IGridSurfaceLayer.factory.createLayer(xsectionWindow,  gridSurfaceData, layerProperties, false);

Creating a grid surface 2D layer for a Map window

In this example, we assume you have already created a grid surface dataset gridSurfaceData and a Map window mapWindow.

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