This example contains an implementation of custom Azure SEG-Y Reader. You need to apply Azure credentials and SEG-Y file location inside your Azure blob container to see results.
Account name
SAS string
Container
File
Apply
import { Text } from "@int/geotoolkit/scene/shapes/Text.ts";
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 { AzureSegyReader } from "/src/code/Seismic/Readers/AzureReader/AzureSegyReader.ts";
const createReader = function(onready, onfailure, creds) {
const reader = new AzureSegyReader({
"file": creds.file,
"accountName": creds.accountName,
"sasString": creds.sasString,
"container": creds.container
});
reader.loadMetaData((err) => {
if (err instanceof Error) {
onfailure(err.message);
return;
}
reader.readDataSetStatistics(() => {
onready(reader);
});
});
};
const createPipeline = function(reader) {
const pipeline = new SeismicPipeline({
"name": "Seismic",
"reader": reader,
"statistics": reader.getStatistics()
});
pipeline.setOptions({
"normalization": {
"type": NormalizationType.RMS,
"scale": 0.4
},
"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
}
});
widget.setNoDataStrategy(
() => new Text({
"text": "Apply credentials",
"ax": widget.getModel().getModelLimits().getWidth() / 2,
"ay": widget.getModel().getModelLimits().getHeight() / 2
})
);
return new Plot({
"canvaselement": canvas,
"root": widget
});
}
function applyCreds(plot, creds, error) {
createReader((reader) => {
const pipeline = createPipeline(reader);
const widget = plot.getRoot();
widget.setPipeline(pipeline);
widget.setScaleOptions({
"tracescale": 48,
"samplescale": 2,
"deviceunit": "in",
"sampleunit": "ft"
});
}, (msg) => {
error.show = true;
error.text = msg;
}, creds);
}
export { applyCreds, createScene };
createScene(document.querySelector('[ref="plot"]'));
Close