INTGeoServer provides a set of web services to retrieve geo data for web and standalone applications. It reads a plethora of seismic file formats including SEG-Y, SEG2, Promax, SU, SEP, JavaSeis and SEGD. There is no limit on the size of the seismic datasets the user can provide from this service. In addition it supports different formats of horizons, faults, well logs, microseismic, and reservoir data. GeoToolkit includes an API to read data from INTGeoServer. This tutorial demonstrates the remote reader of the seismic data.
# Create a Reader
First, provide a location of the GeoServer and a file to visualize. Specify the version of INTGeoServer API to be called. In the current example, a demo server and the last version of API is used. The code below creates a RemoteSeismicDataSource that returns information from remote server about the specified seismic data source. It includes meta information and a collection of keys, which can be utilized to make a query like INLINE and XLINE as shown below. Call the method open to receive information from the server. This call is asynchronous and one of two methods will be called in case of success or failure. Next, create a query from server using the method select. In the current example, it will be the first INLINE and all XLINE. This method returns an instance of the RemoteSeismicReader to be provided as parameter for a visualization pipeline. The reader retrieves groups of traces from the server through requests from pipeline. The reader never loads all traces to memory; as a rule it keeps some traces in the memory cache and retrieves groups of traces to be visible in the specified widget.
# Create a Pipeline
Create a simple pipeline, which contains normalization by RMS, interpolation, and rendering routines. Specify color map and plot type to render interpolated density. Seismic data statistics like rms, min, and max of sample values will be provided from the remote server.
# Create a Widget
The last step is to create a seismic widget that uses the pipeline created earlier. Use SeismicWidget (which has a center part to display a seismic data and a set of annotations on each side) to display axes, titles, or a colorbar. In addition, display two axes with trace headers values (INLINE and XLINE) and hide the default trace number header.
# Result
The following example uses RemoteSeismicReader to read data from the server. A slice of one inline is retrieved from the server and displayed with SeismicWidget. The canvas below shows a result of the visualization. The following steps explain how to set up the Remote Reader.
import { Plot } from "@int/geotoolkit/plot/Plot.ts";
import { SeismicWidget } from "@int/geotoolkit/seismic/widgets/SeismicWidget.ts";
import { SeismicColors } from "@int/geotoolkit/seismic/util/SeismicColors.ts";
import { NormalizationType } from "@int/geotoolkit/seismic/pipeline/NormalizationType.ts";
import { SeismicPipeline } from "@int/geotoolkit/seismic/pipeline/SeismicPipeline.ts";
import { RemoteSeismicDataSource } from "@int/geotoolkit/seismic/data/RemoteSeismicDataSource.ts";
const createSectionQuery = (position, key, oppositeKey) => {
const selectKeys = [];
selectKeys[0] = {
"name": key["key"],
"min": position,
"max": position,
"step": key["increment"],
"order": "asc"
};
selectKeys[1] = {
"name": oppositeKey["key"],
"min": oppositeKey["min"],
"max": oppositeKey["max"],
"step": oppositeKey["increment"],
"order": "asc"
};
return {
"keys": selectKeys,
"options": null,
"emptyTracesKey": {
"name": oppositeKey["key"],
"min": oppositeKey["min"],
"max": oppositeKey["max"]
}
};
};
const createReader = function(onready, onfailure) {
const host = "https://demo.int.com/INTGeoServer/json";
const data = new RemoteSeismicDataSource({
"host": host,
"file": "data/seismic/Gullfaks_Amplitude.xgy",
"version": 2
});
data.open(
() => {
const keys = data.getKeys();
const key = keys[0];
const oppositeKey = keys[1];
const query = createSectionQuery(key["min"], key, oppositeKey);
data.select(query, (reader) => {
onready(reader);
});
},
(err) => {
onfailure(err);
}
);
};
const createPipeline = function(reader) {
const pipeline = new SeismicPipeline({
"name": "Seismic",
"reader": reader,
"statistics": reader.getStatistics()
});
pipeline.setOptions({
"normalization": {
"type": NormalizationType.RMS,
"scale": 1
},
"plot": {
"type": {
"wiggle": false,
"interpolateddensity": true
},
"decimationspacing": 5
},
"colors": {
"colormap": SeismicColors.getDefault().createNamedColorMap("WhiteBlack", 32)
}
});
return pipeline;
};
function createScene(canvas) {
const widget = new SeismicWidget({
"colorbar": {
"axis": {
"tickgenerator": {
"edge": {
"tickvisible": false,
"labelvisible": false
}
}
}
},
"layouttype": "inside",
"statusbar": {
"visible": false
},
"table": {
"size": 100,
"visible": false
}
});
createReader((reader) => {
const pipeline = createPipeline(reader);
widget.setPipeline(pipeline);
widget.setScaleOptions({
"tracescale": 20,
"samplescale": 200,
"deviceunit": "in",
"sampleunit": "ft"
});
const headerFields = pipeline.getReader().getTraceHeaderFields();
let headerInfo;
for (let i = 0; i < headerFields.length; i++) {
const header = headerFields[i];
if (header.getName() === "INLINE" || header.getName() === "XLINE") {
widget.setTraceHeaderVisible(header, true);
} else if (header.getName() === "TraceNumber") {
widget.setTraceHeaderVisible(header, false);
}
headerInfo = widget.getTraceHeaderAxis(header);
if (headerInfo) {
headerInfo["label"].getTextStyle().setColor("#6b6b6b");
}
}
}, (msg) => {
alert(msg);
});
return new Plot({
"canvaselement": canvas,
"root": widget
});
}
export { createScene };
createScene(document.querySelector('[ref="plot"]'));