Migrate from the query service to the seismic service¶
:::info Limited availability The features described in this section are currently only available to selected customers. :::
The guide helps you migrate from the query v0 service to the seismic v1 service. It provides translations for the v0 API methods. The document suggests solutions if there's no direct translation or methods are deprecated.
These concepts have changed in the seismic v1 service:
-
SeismicStore and Seismic objects. The
SeismicStore
is an object that represents an ingested SEG-Y file but isn't directly available as part of the entitlement. TheSeismic
object is a cutout of aSeismicStore
and composes an entitlement. Queries no longer reference files directly and use either theSeismic
or theSeismicStore
objects instead. -
Search, Get, and List queries. The Seismic API v1 combines the Search, Get, and List metadata queries into a single generic Search query. This query accepts a search specification. For example, searching by an identifier or a unique name will show the results of the Get query, and an empty search will behave like the List query.
-
StreamTraces
endpoint. The Seismic API v1 combines many trace access endpoints into a single, more flexiblecom.cognite.seismic.v1.SeismicService.StreamTraces
endpoint. By changing the query parameters slightly, you can produce similar results to many of the methods the endpoint replaces.
:::info To learn more about the Seismic API v1, see the documentation. :::
Metadata queries and payload examples¶
Metadata queries consist of com.cognite.seismic.Query.
+ MethodName
= com.cognite.seismic.Query.MethodName
, for example, com.cognite.seismic.Query.GetSurvey
. See below for changed and deprecated methods.
Changed methods¶
GetSurvey¶
Use com.cognite.seismic.v1.SeismicService.SearchSurveys
.
Payload example¶
ListSurveys¶
Use com.cognite.seismic.v1.SeismicService.SearchSurveys
without a surveys
search specification.
Payload example¶
ListFiles¶
Use com.cognite.seismic.v1.SeismicService.SearchFiles
without the spec
search specification.
SearchSurveys¶
Use com.cognite.seismic.v1.SeismicService.SearchSurveys
.
GetFile¶
Use com.cognite.seismic.v1.SeismicService.SearchFiles
with the spec
containing the identifier
for the file.
Payload example¶
GetBinaryHeader¶
Fetch the original SEG-Y binary headers from com.cognite.seismic.v1.SeismicService.SearchSeismicStores
by setting include_headers
to true
.
Payload example¶
com.cognite.seismic.v1.SeismicAPI/SearchSeismicStores
{
"file": {
"name": "some_name"
},
"include_headers": true
}
:::info Info
Seismic
objects also have binary headers. By default, the objects inherit the headers from the original file, but data managers can override them. You can fetch the headers from com.cognite.seismic.v1.SeismicService.SearchSeismics
.
:::
Payload example¶
com.cognite.seismic.v1.SeismicAPI/SearchSeismics
{
"seismic_store": {
"name": "some_name"
},
"include_binary_header": true
}
GetTextHeader¶
Fetch the original SEG-Y text headers from com.cognite.seismic.v1.SeismicService.SearchSeismicStores
by setting include_headers
to true
.
Payload example¶
com.cognite.seismic.v1.SeismicAPI/SearchSeismicStores
{
"seismic_store": {
"name": "some_name"
},
"include_headers": true
}
:::info Info
Seismic
objects also have binary headers. By default, the objects inherit the headers from the original file, but data managers can override them. You can fetch the headers from com.cognite.seismic.v1.SeismicService.SearchSeismics
.
:::
Payload example¶
com.cognite.seismic.v1.SeismicAPI/SearchSeismics
{
"seismic_store": {
"name": "some_name"
},
"include_text_header": true
}
GetFileDataCoverage¶
Use com.cognite.seismic.v1.SeismicService.SearchSeismicStores
specifying coverage
with the selected format
.
Payload example¶
com.cognite.seismic.v1.SeismicAPI/SearchSeismicStores
{
"file": {
"name": "some_name"
},
"coverage": {
"format": 0 // 0 indicates wkt, 1 indicates geojson
}
}
:::info Info
Seismic
objects also have coverage that you can fetch from com.cognite.seismic.v1.SeismicService.SearchSeismics
.
:::
Payload example¶
com.cognite.seismic.v1.SeismicAPI/SearchSeismics
{
"seismic_store": {
"name": "some_name"
},
"coverage": {
"format": 0
}
}
GetFileLineRange¶
Use com.cognite.seismic.v1.SeismicService.GetTraceBounds
.
:::info Note
In v1, the query is in terms of Seismic
or SeismicStore
objects. In the example below, assume that the SeismicStore
ID for the ingested file of interest is known.
:::
Payload example¶
GetCrosslinesByInline¶
Use com.cognite.seismic.v1.SeismicService.SearchSeismicStores
with include_extent
set to true
. The method returns all lines that contain the inline.
Payload example¶
com.cognite.seismic.v1.SeismicAPI/SearchSeismicStores
{
"file": {
"name": "some_name"
},
"include_extent": true
}
:::info Info
Seismic
objects also have the line range that you can fetch from com.cognite.seismic.v1.SeismicService.SearchSeismics
.
:::
Payload example¶
com.cognite.seismic.v1.SeismicAPI/SearchSeismics
{
"seismic": {
"id": "1234"
},
"include_line_range": true
}
GetInlinesByCrossline¶
See com.cognite.seismic.Query.GetCrosslinesByInline
GetTraceByCoordinates¶
To get the closest trace to a given coordinate, use com.cognite.seismic.v1.SeismicService.StreamTraces
and specify the geometry
with interpolation_method
set to NEAREST_TRACE
, and a geometry
containing the coordinate of interest.
Payload example¶
com.cognite.seismic.Query/GetTraceByCoordinates
{
"file": {
"name": "some_name",
},
"coordinates": {
"x": 10,
"y": 20
}
}
com.cognite.seismic.v1.SeismicAPI/StreamTraces
{
"seismic": {
"id": "1234"
},
"geometry": {
"geometry": {
"wkt": {
"geometry": "POINT(10 20)"
}
},
"interpolation_method": 0 // 0 indicates NEAREST_TRACE, 1 indicates INVERSE_DISTANCE_WEIGHTING
}
}
GetSliceByGeometry¶
Use com.cognite.seismic.v1.SeismicService.StreamTraces
passing in the desired geometry
.
See com.cognite.seismic.Query.GetTraceByCoordinates
.
GetCubeByGeometry¶
Use com.cognite.seismic.v1.SeismicService.StreamTraces
passing in the desired geometry
.
See com.cognite.seismic.Query.GetTraceByCoordinates
.
GetSegYFile¶
Use com.cognite.seismic.v1.SeismicService.GetSegYFile
instead.
GetTimeSliceByGeometry¶
Use com.cognite.seismic.v1.SeismicService.StreamTraces
passing in the desired geometry
with a z_range
containing the depth of interest and a desired geometry
.
See com.cognite.seismic.Query.GetSliceByGeometry
.
Payload example¶
com.cognite.seismic.Query/GetTimeSliceByGeometry
{
"file": {
"name": "some_file"
},
"geometry": {
"wkt": {
"geometry": "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))"
}
},
"z": 20
}
com.cognite.seismic.v1.SeismicAPI/StreamTraces
{
"seismic": {
"id": "1234"
},
"geometry": {
"geometry": {
"wkt": {
"geometry": "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))"
}
}
},
"z_range": {
"min": 20,
"max": 20
}
}
Query.GetVolume¶
Use com.cognite.seismic.v1.SeismicService.StreamTraces
instead.
Deprecated methods¶
GetSliceByLine¶
Use com.cognite.seismic.v1.SeismicService.StreamTraces
instead.
GetCubeByLines¶
Use com.cognite.seismic.v1.SeismicService.StreamTraces
instead.
GetSlabByLines¶
See com.cognite.seismic.Query.GetTimeSliceByGeometry
.
Next steps¶
View the documentation to learn more about the Seismic API v1.