REST API
Introduction
The Seismic Server REST API provides a programmatic interface to services provided by the Subsurface Portal for ArcGIS using the HTTP protocol. The Seismic Server extends an ArcGIS map service, meaning no feature service or image service is required to use it. In addition to serving seismic data the Seismic Server also serves rasters included in the map.
Using the REST API you can:
- Get metadata for Seismic 2D and 3D surveys and rasters
- Extract sub sections of seismic surveys. Once retrieved the data can be processed or displayed in a web client using the Geocap Javascript API.
- Read raster data for a given extent and resolution. The raster data can then be displayed using in the web client.
The REST API is used by the Geocap Javascript API as depicted in the following diagram.
Server information
version
URL | http://<catalog-url>/<serviceName>/MapServer/exts/SeismicServer/version |
Report seismic server version number and license expiry date.
Parameter | Details |
---|---|
f | The response format. Values: html | json |
2D Seismics
This section describes how to get data and metadata for seismic 2D lines. A seismic survey comprising several navigation lines will be stored in a single feature layer. Each feature represents one survey line. Each survey line has an associated one-band floating point raster containing the amplitude values. The dimensions of this raster and associated metadata can be read using the info REST call. The raster data itself can be retrieved using the data request documented in this section.
The URL resource scheme to address a single seismic line will refer to the feature layer containing the surveys and the feature representing a single seismic line:
http:// <seismic server> /layer/<layer id>/line/<line id>
info
URL | http://<catalog-url>/<serviceName>/MapServer/exts/SeismicServer/layer/<layerid>/line/info |
Report meta data about all seismic 2D lines contained in the given feature layer.
Parameter | Details |
---|---|
f | The response format. Values: html | json |
URL | http://<catalog-url>/<serviceName>/MapServer/exts/SeismicServer/layer/<layerid>/line/<line oid>/info |
Report meta data about the seismics 2D lines contained in the given feature layer with feature id <line oid>.
Parameter | Details |
---|---|
f | The response format. Values: html | json |
data
URL | http://<catalog-url>/<serviceName>/MapServer/exts/SeismicServer/layer/<layerid>/line/<line oid>/data |
Return amplitude data for a given seismic line. The request will return a one band floating point raster in the form of a float32 array. The desired dimensions of the output raster is set by the caller using the width and height arguments. Use the info request to read the original dimensions of the raster. If the output dimensions differ form the raster's original dimensions the raster will be resampled.
If making the data call from Javascript using an XMLHttpRequest the response data type should be set to arraybuffer. You may then convert this to a Float32Array for further processing.
var xhr_response = data; // of type arraybuffer var myfloatarray = new Float32Array (xhr_response );
Parameter | Details |
---|---|
width | The width of the resulting raster in number of pixels. |
height | The height of the resulting raster in number of pixels. |
f | The response format. Value : application/octet-stream |