From 3008f16a433bf5c718e714e819d08d8d2cba9db6 Mon Sep 17 00:00:00 2001 From: Skye Im Date: Wed, 22 Mar 2023 13:25:18 +0100 Subject: [PATCH 1/3] Delete v0-exclusive files --- cognite/seismic/protos/ingest_job.proto | 24 -- cognite/seismic/protos/ingest_service.proto | 82 ----- .../protos/ingest_service_messages.proto | 266 -------------- cognite/seismic/protos/persisted_trace.proto | 18 - cognite/seismic/protos/query_service.proto | 182 ---------- .../protos/query_service_messages.proto | 336 ------------------ 6 files changed, 908 deletions(-) delete mode 100644 cognite/seismic/protos/ingest_job.proto delete mode 100644 cognite/seismic/protos/ingest_service.proto delete mode 100644 cognite/seismic/protos/ingest_service_messages.proto delete mode 100644 cognite/seismic/protos/persisted_trace.proto delete mode 100644 cognite/seismic/protos/query_service.proto delete mode 100644 cognite/seismic/protos/query_service_messages.proto diff --git a/cognite/seismic/protos/ingest_job.proto b/cognite/seismic/protos/ingest_job.proto deleted file mode 100644 index ad44d39d..00000000 --- a/cognite/seismic/protos/ingest_job.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; -package com.cognite.seismic; - -import "cognite/seismic/protos/types.proto"; - -message IngestJob { - // To make it easier to use a new message format later - int32 message_version = 1; - - // A unique ID we generate for the file - string file_id = 2; - - // A unique ID we generate for the ingestion job - string job_id = 3; - - // [optional] Selected step to start ingestion. Leave blank to start from last completed step. - // More details on IngestFileRequest message description - FileStep start_step = 4; - - // Target storage tier to ingest file in. Tier names are tenant-specific. - // By default, if this field is empty, the file will be loaded in a bigtable-based trace store. - string target_tier_name = 5; -} - diff --git a/cognite/seismic/protos/ingest_service.proto b/cognite/seismic/protos/ingest_service.proto deleted file mode 100644 index 6385835a..00000000 --- a/cognite/seismic/protos/ingest_service.proto +++ /dev/null @@ -1,82 +0,0 @@ -syntax = "proto3"; -package com.cognite.seismic; - -import "google/protobuf/empty.proto"; -import "cognite/seismic/protos/ingest_service_messages.proto"; - -/** -Service for ingestion and metadata updates of SEG-Y files into Cognite Data Fusion (CDF) seismic datastore - -* We use the word `File` to refer to a single seismic file/dataset/cube -* Surveys can have many files attached to them, with different attributes or processing stages, and every file must -belong to a survey -* The expected order of ingestion is: - -1) Register a survey, if it does not exist - -2) Register a file -Files are expected to be previously uploaded to a Google Cloud Storage (GCS) bucket at this point, and the service needs -permission to this bucket in the form of a service account. -The RegisterFile endpoint will request the survey name or id, bucket address and the CRS used in this file -(e.g.: EDM50, WGS84), so be sure to have this information prior at hand. - -3) Ingest the file -If the RegisterFile endpoint completes successfully, and your file is found in the bucket, you can now send a request to -the IngestFile endpoint, and an asynchronous process will be started remotely to download and process the file. -You can verify the status of this process by calling the Status endpoint with the id returned in the IngestFile endpoint - -As soon as the status of the processing job is set to complete, data from the file will be available with the query service - -When a file is registered in a CDF project, this project owns the file. It is then allowed to share access with other -CDF projects -**/ -service Ingest { - /** - Registers a new survey. - **/ - rpc RegisterSurvey (RegisterSurveyRequest) returns (RegisterSurveyResponse) {} - /** - Registers a new file in a (previously registered) survey. - **/ - rpc RegisterFile (RegisterFileRequest) returns (RegisterFileResponse) {} - /** - Sends a request for the ingestion of a registered file into the queue. Will return a job id which can be queried for status. - **/ - rpc IngestFile (IngestFileRequest) returns (IngestFileResponse) {} - /** - Retrieves the status of an ingestion job. - **/ - rpc Status (StatusRequest) returns (StatusResponse) {} - /** - Deletes a file - **/ - rpc DeleteFile (DeleteFileRequest) returns (google.protobuf.Empty) {} - /** - Deletes a survey - **/ - rpc DeleteSurvey (DeleteSurveyRequest) returns (google.protobuf.Empty) {} - /** - Updates file metadata - **/ - rpc EditFile (EditFileRequest) returns (EditFileResponse) {} - /** - Updates survey metadata - **/ - rpc EditSurvey (EditSurveyRequest) returns (EditSurveyResponse) {} - /** - List projects that have access to a specific file. - Only users in the CDF project that owns the file have access to this method - DEPRECATED - multitenant file sharing is not supported anymore - **/ - rpc ListFileAccess(ListFileAccessRequest) returns (ProjectListResponse) {} - /** - Add or remove access to a file for CDF projects - Only users in the CDF project that owns the file have access to this method - DEPRECATED - multitenant file sharing is not supported anymore - **/ - rpc EditFileAccess(EditFileAccessRequest) returns (google.protobuf.Empty) {} - /** - Store a single trace to synthetic file/volume - **/ - rpc StoreTrace(StoreTraceRequest) returns (google.protobuf.Empty) {} -} diff --git a/cognite/seismic/protos/ingest_service_messages.proto b/cognite/seismic/protos/ingest_service_messages.proto deleted file mode 100644 index ec152794..00000000 --- a/cognite/seismic/protos/ingest_service_messages.proto +++ /dev/null @@ -1,266 +0,0 @@ -/** -Messages from the ingestion service of Seismic Datastore in Cognite Data Fusion -**/ -syntax = "proto3"; -package com.cognite.seismic; - -import "cognite/seismic/protos/types.proto"; - -import "google/protobuf/wrappers.proto"; - -// ----- - -/** - [Example] - {"name": "surveyname", "metadata": {"location": "underwater"}, "external_id": "surveyname-external" } -**/ -message RegisterSurveyRequest { - string name = 1; // [required] - map metadata = 2; // [optional] - ExternalId external_id = 3; // [optional] - CRS crs = 4; // [optional] new CRS used by all members - SurveyGridTransformation grid_transformation = 5; // [optional] Affine transformation from grid bins to coordinates - CustomSurveyCoverage custom_coverage = 6; -} - -message RegisterSurveyResponse { - Survey survey = 1; -} - -// ----- - -/** - [Example] - { - "survey": {"name": "surveyname"}, - "name": "ABP16M03-FMIG-OBC-PSDM-FULL-STACK-T.MIG_FIN.POST_STACK..J.segy", - "path": "gs://cognite-seismic-eu/samples/from-diskos-disks", - "crs": { "crs": "EPSG:23031"} - } -**/ -message RegisterFileRequest { - Identifier survey = 1; // [required] Either name or id of a survey previously registered with /RegisterSurvey - string path = 2; // [required if file is not synthetic] Path including protocol, bucket and directory structure. Example: "gs://cognite-seismic-eu/samples/" - string name = 3; // [required] Unique filename including extension. Example: "DN1302M03R16_MERGED_KPSDM_00-32_DEG_T.sgy". The name must be unique across buckets and can be used to identify this file in query requests - map metadata = 4; // [optional] - CRS crs = 5; // [required] Official name of the CRS used. Example: "EPSG:23031" - google.protobuf.BoolValue is_temporary = 6; // [optional] tells whether file is temporary (writeable) or not. False by default - google.protobuf.Int32Value inline_offset = 7; // [optional] Inline number field in the trace headers. Defaults to 189 as per the SEG-Y rev1 specification - google.protobuf.Int32Value crossline_offset = 8; // [optional] Crossline number field in the trace headers. Defaults to 193 as per the SEG-Y rev1 specification - google.protobuf.Int32Value cdp_x_offset = 9; // [optional] X coordinate of ensemble (CDP) position in trace headers. Defaults to 181 as per the SEG-Y rev1 specification - google.protobuf.Int32Value cdp_y_offset = 10; // [optional] Y coordinate of ensemble (CDP) position in trace headers. Defaults to 185 as per the SEG-Y rev1 specification - ExternalId external_id = 11; // [optional] An external identifier - matches service contract field - /** - [optional] Multiplier for CDP-X and CDP-Y values, overrides scalar factor obtained from trace header. - Must be in the range (0,1]. - Note that this is a floating point multiplier used directly to scale CDP-X and CDP-Y values, and it is not interpreted in the manner of the source group scalar trace header - field in the SEG-Y specification. That is: To divide by 100, specify 0.01, not -100. - Negative values, 0 and values greater than 1 are not permitted when registering a file, although 0 may be used in the EditFile call to unset this field. - **/ - google.protobuf.FloatValue source_group_scalar_override = 12; - // This can be reused all SDK and service releases referencing this field have been replaced. - reserved 13; -} - -message RegisterFileResponse { - File file = 1; -} - -// ----- - -message StoreTraceRequest { - Identifier file = 1; - int32 iline = 2; - int32 xline = 3; - google.protobuf.Int32Value x = 4; - google.protobuf.Int32Value y = 5; - repeated float trace = 6; - bytes raw_header = 7; -} - -// ----- - -/** - [Example] - {"file": {"name": "ABP16M03-FMIG-OBC-PSDM-FULL-STACK-T.MIG_FIN.POST_STACK..JS-021837.segy"} } -**/ -message IngestFileRequest { - // [required] Either name or id of a file previously registered with /RegisterFile - Identifier file = 1; - - /** - [optional] Selected step to start ingestion. Leave blank to start from last completed step. - [Accepted values] - 1 -- insert binary and text headers - 2 -- insert trace headers - 3 -- insert trace data - 4 -- compute coverage polygon and additional metadata (trace count, valid lines, etc) - 6 -- insert trace offset indices - [Use cases] - * Usual ingestion: - If the last successful step was 0 (REGISTER), the file will be fully ingested regardless of start_step - * Completing a failed ingestion: - If the last successful step was 3 (INSERT_DATA), and no start step is selected, only coverage will be - computed. Previously ingested headers and traces will be preserved in this case. - * Forcing reingestion: - If start_step is 1 (INSERT_FILE_HEADERS), regardless of previous ingestion status, all headers - and data will be deleted and the whole file will be forcefully reingested - * Forcing a single step to be rerun: - If the file is ingested (last step is COMPUTE_COVERAGE), by using start_step = 4 (COMPUTE_COVERAGE), - for example, only coverage will be computed while headers and traces will be preserved - **/ - FileStep start_step = 2; - - /** - [optional as of 2020-11-01, will be required at some later time] - Target storage tier for this file. If empty a bigtable-based storage will be used. - - A storage tier is a defined facility for storing the trace data associated with a seismic volume. - The default storage facility is based on Cloud Bigtable, but it is also possible to leave trace data stored - in SEG-Y files in Cloud Storage, only retaining a compact index of file data in fast storage to facilitate - retrieval of data from Cloud Storage in a performant manner. - - [Accepted values] - Accepted values are defined by the tenant configuration, and allow for optimizing tradeoffs between storage - cost, retrieval performance, numeric precision and sampling. - - Note that currently only one storage tier per trace store is supported, so ingesting an already ingested file - will result in the file's data being removed from the previously active storage tier. - **/ - string target_storage_tier_name = 3; -} - -message IngestFileResponse { - string job_id = 1; //job id that can be used to query for status - string file_id = 2; -} - -// ----- - -/** - [Example] - {"job_id": "1e9a4f9b-7c15-44dd-bbbb-e9e9fb83e401"} -**/ -message StatusRequest { - oneof search_by { - string job_id = 1; - string file_id = 2; - int64 seismicstore_id = 3; - } -} - -message StatusResponse { - JobStatus status = 1; - string message = 2; - string started_at = 3; - string updated_at = 4; - repeated IngestionLog logs = 5; -} - -message IngestionLog { - string timestamp = 1; - string log_line = 2; -} - -// ----- - -/** - [Example] - {"file": {"id": "97305892-d622-4425-8530-3029b740842e"} } -**/ -message DeleteFileRequest { - cognite.seismic.Identifier file = 1; // [required] Either name or id of a file previously registered with /RegisterFile - /* - If set to true, will delete contents of file (undo the ingestion), but keep the file registered. - If set to false, will completely remove the file from database. - If no option is set, default is false - */ - bool keep_registered = 2; -} - -// ----- - -/** - [Example] - {"survey": {"name": "survey_name"} } -**/ -message DeleteSurveyRequest { - cognite.seismic.Identifier survey = 1; // [required] Either name or id of a survey previously registered with /RegisterSurvey -} - -// ----- - -/** - [Example] - {"file": {"id": "97305892-d622-4425-8530-3029b740842e"} } -**/ -message EditFileRequest { - Identifier file = 1; // [required] Either name or id of a file previously registered with /RegisterFile - string path = 2; // [optional] New path. Example: "gs://cognite-seismic-eu/samples/" - string name = 3; // [optional] New (unique) filename. Example: "DN1302M03R16_MERGED_KPSDM_00-32_DEG_T.sgy" - map metadata = 4; // [optional] New metadata - CRS crs = 5; // [optional] Official name of the CRS used. Example: "EPSG:23031" - google.protobuf.Int32Value inline_offset = 6; // [optional] Inline number field in the trace headers. Defaults to 189 as per the SEG-Y rev1 specification - google.protobuf.Int32Value crossline_offset = 7; // [optional] Crossline number field in the trace headers. Defaults to 193 as per the SEG-Y rev1 specification - google.protobuf.Int32Value cdp_x_offset = 8; // [optional] X coordinate of ensemble (CDP) position in trace headers. Defaults to 181 as per the SEG-Y rev1 specification - google.protobuf.Int32Value cdp_y_offset = 9; // [optional] Y coordinate of ensemble (CDP) position in trace headers. Defaults to 185 as per the SEG-Y rev1 specification - ExternalId external_id = 10; // [optional] An external identifier - matches service contract field - /** - [optional] Multiplier for CDP-X and CDP-Y values, overrides scalar factor obtained from trace header. - Note that this is a floating point multiplier used directly to scale CDP-X and CDP-Y values, and it is not interpreted in the manner of the source group scalar trace header - field in the SEG-Y specification. That is: To divide by 100, specify 0.01, not -100. - Negative values and values greater than 1 are not permitted. - To remove the override from a file where an override has previously been set, set the source_group_scalar_override to 0 or NaN. - The next ingestion processing of a file will then use the source group scalar values found in trace headers. - **/ - google.protobuf.FloatValue source_group_scalar_override = 11; -} - -message EditFileResponse { - cognite.seismic.File file = 1; - string path = 2; - CRS crs = 3; - google.protobuf.Int32Value inline_offset = 4; // [optional] Inline number field in the trace headers. Defaults to 189 as per the SEG-Y rev1 specification - google.protobuf.Int32Value crossline_offset = 5; // [optional] Crossline number field in the trace headers. Defaults to 193 as per the SEG-Y rev1 specification - google.protobuf.Int32Value cdp_x_offset = 6; // [optional] X coordinate of ensemble (CDP) position in trace headers. Defaults to 181 as per the SEG-Y rev1 specification - google.protobuf.Int32Value cdp_y_offset = 7; // [optional] Y coordinate of ensemble (CDP) position in trace headers. Defaults to 185 as per the SEG-Y rev1 specification - google.protobuf.FloatValue source_group_scalar_override = 8; // [optional] Multiplier for CDP-X and CDP-Y values, overrides scalar factor obtained from trace header -} - -// ----- - -/** - [Example] - {"survey": {"id": "97305892-d622-4425-8530-3029b740842e"}, "name": "new name"} -**/ -message EditSurveyRequest { - Identifier survey = 1; // [required] Either name or id of a survey previously registered with /RegisterSurvey - string name = 2; // [optional] New name - map metadata = 3; // [optional] New metadata - ExternalId external_id = 4; // [optional] External id matching service contract type - CRS crs = 5; // [optional] new CRS used by all members - SurveyGridTransformation grid_transformation = 6; // [optional] Affine transformation from grid bins to coordinates - CustomSurveyCoverage custom_coverage = 7; // [optional] Customer-provided custom survey coverage -} - -message EditSurveyResponse { - Survey survey = 1; -} - -message ListFileAccessRequest { - Identifier file = 1; // [required] Either name or id of a file -} - -message EditFileAccessRequest { - Identifier file = 1; // [required] Either name or id of a file - Identifier project = 2; // [required] Either name or id of a project - /** - If neither add or remove are set, or if both are set to true, add will be assumed - **/ - bool add = 3; // Add project access to this file - bool remove = 4; // Remove project access from this file -} - -message ProjectListResponse { - repeated Project project = 1; -} diff --git a/cognite/seismic/protos/persisted_trace.proto b/cognite/seismic/protos/persisted_trace.proto deleted file mode 100644 index a5b95e24..00000000 --- a/cognite/seismic/protos/persisted_trace.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; -package com.cognite.seismic; - -/* -Version: - For trace data: - 1 - no compression of traces - 2 - zstd compression of traces - 3 - waveform compression - For trace headers: - 1 - gzip compression - 2 - no compression, storing diff bytes of base header -*/ -message PersistedTrace { - int32 version = 1; - bytes trace = 2; - bytes header = 3; -} \ No newline at end of file diff --git a/cognite/seismic/protos/query_service.proto b/cognite/seismic/protos/query_service.proto deleted file mode 100644 index cfa21da9..00000000 --- a/cognite/seismic/protos/query_service.proto +++ /dev/null @@ -1,182 +0,0 @@ -syntax = "proto3"; -package com.cognite.seismic; - -import "google/protobuf/empty.proto"; -import "cognite/seismic/protos/types.proto"; -import "cognite/seismic/protos/query_service_messages.proto"; - -/** -Service for querying data and metadata from seismic files in Cognite Data Fusion -(CDF) seismic datastore We use the word `File` to refer to a single seismic -file/dataset/cube. Queries on a file require it to have been previously ingested -into CDF using (ingest_service.proto) - -Queries are divided in: - -- Metadata: - -General information and headers for surveys and files - -- Geometry and grid: - -Information on a file's grid and positioning, such as coverage and range of -inlines and crosslines - -- Trace: - -Find a single trace in the file. A trace will include header, position -information and samples. More details about the trace format can be found on its -definition in (types.proto) - -- Vertical slice: - -Get 2D vertical slices of samples (thus 1D arrays of traces). The slices can -be based on a single defined line or in an arbitrarily defined line with -interpolation. - -- Area: - - Get 3D volumes of samples (thus 2D arrays of traces) defined by a region in -the horizontal plane - -- Horizontal slice: - - Get 2D horizontal slices of samples defined by a region in the horizontal -plane and a specific index in depth/time - -- Artificial sampling: - -Get the (calculated/interpolated) values of properties in the file/cube -given arbitrary positions -**/ -service Query { - // Metadata queries - - /** - Finds one survey given its name or id. Optionally, lists its associated - files. - **/ - rpc GetSurvey(SurveyQueryRequest) returns (GetSurveyResponse) {} - /** - Lists all surveys owned by this project. Optionally, includes their lists of - files. - **/ - rpc ListSurveys(ListSurveysQueryRequest) returns (SurveyWithFilesResponse) { - } - /** - Lists all files available, both owned by the authorized CDF project and - shared with it - **/ - rpc ListFiles(google.protobuf.Empty) returns (ListFilesResponse) {} - /** - Search surveys based on two criteria: - 1. Coverage polygon of files in the survey are within an area delimited by a - specified polygon - 2. Filters on metadata of both the survey and the file. - Both criteria are optional and can be combined for a more detailed search. - **/ - rpc SearchSurveys(SearchSurveyRequest) returns (SurveyWithFilesResponse) {} - /** - Returns file metadata given its name or id. - **/ - rpc GetFile(FileQueryRequest) returns (GetFileResponse) {} - /** - Returns a binary header given its file name or id. - **/ - rpc GetBinaryHeader(HeaderFileQueryRequest) - returns (GetBinaryHeaderResponse) {} - /** - Returns a text header given its file name or id. - **/ - rpc GetTextHeader(HeaderFileQueryRequest) returns (GetTextHeaderResponse) {} - - // Geometry and grid queries - - /** - Returns the coverage for a given file identified by its id or name. - The coverage is represented by a polygon either in WKT or geojson and - represents the area covered by traces in the file. There can be holes in the - polygon if traces do not exist in an area inside of it. DEPRECATE in favor - of Geospatial APIs. - **/ - rpc GetFileDataCoverage(FileCoverageRequest) - returns (DataCoverageResponse) {} - /** - Returns the full range of the inlines and crosslines in the file, i.e. the - minimum and maximum inline and crossline - **/ - rpc GetFileLineRange(FileQueryRequest) returns (LineRangeResponse) {} - /** - Returns the set of valid crossline indices for a specific inline, in a given - file DEPRECATE: Move to GetFileLineRange. - **/ - rpc GetCrosslinesByInline(FileLineQueryRequest) returns (AvailableLines) {} - /** - Returns the set of valid inline indices for a specific crossline, in a given - file DEPRECATE: Move to GetFileLineRange. - **/ - rpc GetInlinesByCrossline(FileLineQueryRequest) returns (AvailableLines) {} - - // Trace queries - /** - Returns the trace in a file that is closest to a point given its coordinates - (x,y) - **/ - rpc GetTraceByCoordinates(CoordinateTraceQueryRequest) returns (Trace) {} - /** - Returns a trace for each coordinate (inline, xline) from the input stream - **/ - rpc GetTracesByLine(stream LineTraceQueryRequest) returns (stream Trace) {} - - // Slice queries - - /** - Returns all or a subset of traces in a slice (inline or crossline) given its - index (and optionally from/to) DEPRECATED, use GetVolume instead. - **/ - rpc GetSliceByLine(LineSliceQueryRequest) returns (stream Trace) {} - /** - Returns a slice with traces following a path determined by an arbitrary - line. Depending on interpolating method, these can be either real traces in - the file that are closest to the path or synthetic traces generated by - interpolation of the traces in the file. - **/ - rpc GetSliceByGeometry(GeometrySliceQueryRequest) returns (stream Trace) {} - - // Area queries - - /** - Returns a volume with all traces inside a given range of inlines and a given - range of crosslines DEPRECATED, use GetVolume instead. - **/ - rpc GetCubeByLines(LineCubeRequest) returns (stream Trace) {} - /** - Returns a volume with all traces with x, y coordinates inside an arbitrary - 2D polygon - **/ - rpc GetCubeByGeometry(GeometryCubeRequest) returns (stream Trace) {} - /** - Returns a SEG-Y file. - Can retrieve a full file or create a new cropped file filtering on areas of - interest only. DEPRECATED, to be replaced with a command line tool or an SDK - method for constructing a SEG-Y file by calling GetVolume - **/ - rpc GetSegYFile(SegYQueryRequest) returns (stream SegYQueryResponse) {} - - // Depth-indexed area queries - - /** - Returns a seismic slab by either horizon or constant depth and area - constrained by a range of inlines and crosslines - **/ - rpc GetSlabByLines(LineSlabRequest) returns (stream SlabTrace) {} - /** - Returns a horizontal slice for a given depth or time and area constrained by - an arbitrary 2D polygon - **/ - rpc GetTimeSliceByGeometry(GeometryTimeSliceQueryRequest) - returns (stream SurfacePoint) {} - - // Volume queries - rpc GetVolume(VolumeRequest) returns (stream Trace) {} -} diff --git a/cognite/seismic/protos/query_service_messages.proto b/cognite/seismic/protos/query_service_messages.proto deleted file mode 100644 index e0e58365..00000000 --- a/cognite/seismic/protos/query_service_messages.proto +++ /dev/null @@ -1,336 +0,0 @@ -/** -Messages from the query service of Seismic Datastore in Cognite Data Fusion -*/ -syntax = "proto3"; -package com.cognite.seismic; - -import "cognite/seismic/protos/types.proto"; -import "google/protobuf/wrappers.proto"; - -// --- - -// Requests for metadata and coverage - -message SurveyQueryRequest { - Identifier survey = 1; // name or id of the survey - bool list_files = 2; // set to true to list the survey files in the response (default: false) - bool include_metadata = 3; // set to true to include metadata in the response (default: false) - CoverageParameters include_coverage = 4; // set this field to include coverage in the response (default: false) - bool include_grid_transformation = 5; // set to true to include the grid transformation in the response, if available (default: false) - bool include_custom_coverage = 6; // set to true to include the custom survey coverage in the response, if available (default: false) -} - -message ListSurveysQueryRequest { - bool list_files = 1; // set to true to list the survey files in the response (default: false) - bool include_metadata = 2; // set to true to include metadata in the response (default: false) - bool include_grid_transformation = 3; // set to true to include the grid transformation in the response, if available (default: false) - bool include_custom_coverage = 4; // set to true to include the custom survey coverage in the response, if available (default: false) -} - -message FileQueryRequest { - Identifier file = 1; // name or id of the file -} - -message FileLineQueryRequest { - Identifier file = 1; // name or id of the file - int32 line = 2; // number of the selected inline or crossline in the file -} - -message HeaderFileQueryRequest { - Identifier file = 1; // name or id of the file - bool include_raw_header = 2; // set to true to include the raw header in the response (default: false) -} - -message FileCoverageRequest { - Identifier file = 1; // name or id of the file - CRS crs = 2; // [optional] If CRS provided converts coverage to given CRS. Otherwise, will return in the file's original CRS - bool in_wkt = 3; // set this to true to return in WKT format. Otherwise, response will be in geojson format by default -} - -message NavigationPolygonRequest { - Identifier survey = 1; // name or id of the survey -} - -// --- - -// Requests for data filtered by position - -/** -Request a single trace from a file by index (inline AND crossline) -**/ -message LineTraceQueryRequest { - Identifier file = 1; - PositionQuery position = 3; - bool include_trace_header = 4; - bool include_trace_coordinates = 5; - bool include_trace_data = 6; -} - -/** -Request a single trace from a file by coordinates (x AND y). If x and y don't fall in the coordinates of a trace, -will return the closest trace to it. -**/ -message CoordinateTraceQueryRequest { - Identifier file = 1; - CoordinateQuery coordinates = 2; - float max_radius = 3; // only return traces if closer than this to the actual point in the file - bool include_trace_header = 4; -} - -/** -Request a slice of traces from a file by index (inline OR crossline), and optionally specify min and max range -**/ -message LineSliceQueryRequest { - Identifier file = 1; - LineSelect line = 2; - bool include_trace_header = 3; - LineRange range = 4; -} - -/** -Request a slice of traces from a file by coordinates of start and end of an arbitrary line -**/ -message GeometrySliceQueryRequest { - Identifier file = 1; - Geometry arbitrary_line = 2; - InterpolationMethod interpolation_method = 3; -} - -/** -Request a volume of traces from a file by range of inlines and crosslines -**/ -message LineCubeRequest { - Identifier file = 1; - LineBasedRectangle rectangle = 2; - bool include_trace_header = 3; -} - -/** -Request a volume of traces from a file with coordinates inside an arbitrary polygon -**/ -message GeometryCubeRequest { - Identifier file = 1; - Geometry geometry = 2; - bool include_trace_header = 3; -} - -/** -Request a volume below and above a time slice from a file and filter by range of inlines and crosslines -**/ -message LineSlabRequest { - Identifier file = 1; - LineBasedRectangle rectangle = 2; - oneof z { - int32 constant = 3; - Surface surface = 4; - } - google.protobuf.Int32Value n_above = 5; - google.protobuf.Int32Value n_below = 6; -} - -/** -Request a time slice from a file and filter by coordinates inside an arbitrary polygon -**/ -message GeometryTimeSliceQueryRequest { - Identifier file = 1; - Geometry geometry = 2; - google.protobuf.Int32Value z = 3; // either time or depth according to the file -} - -/** -Request a volume from a file by range of inlines, crosslines and time -**/ -message VolumeRequest { - Identifier file = 1; - LineBasedVolume volume = 2; - bool include_trace_header = 3; -} - - -// --- - -// Other requests - -/** -Filter the area included in the SEGY file by a polygon defined either by spatial coordinates -or by a set of inline and crossline indices -**/ -message SegYQueryRequest { - Identifier file = 1; - oneof query { - Geometry polygon = 2; - LineBasedRectangle lines = 3; - } -} - -/** -Request a pseudo-trace (sequence of values) representing the values for the described path in a file -**/ -message PathQueryRequest { - Identifier file = 1; - Geometry geometry = 2; - bool include_trace_header = 3; -} - -/** -Request to search surveys inside a polygon or by metadata -**/ -message SearchSurveyRequest { - Geometry polygon = 1; - MetadataFilter survey_metadata = 2; - MetadataFilter file_metadata = 3; - bool include_metadata = 4; - bool include_grid_transformation = 5; - bool include_custom_coverage = 6; -} - -// --- - -// Supporting query message types. - -/** -Range of z_values to use in time/depth slice queries - */ -message Surface { - repeated int32 z_values = 1; -} - -/** -Range of inline, crossline and time indices defining a volume -**/ -message LineBasedVolume { - LineDescriptor iline = 1; - LineDescriptor xline = 2; - LineDescriptor z = 3; -} - -message MetadataFilter { - map filter = 1; -} - -message KeyValueFilter { - string key = 1; - string value = 2; -} - -/** -Point defined by its x and y coordinates -**/ -message CoordinateQuery { - float x = 1; - float y = 2; -} - - -/** -The minimum and maximum values of all traces in a specific file - */ -message TraceValueRange { - float min_value = 1; - float max_value = 2; -} - -// --- - -// Response messages - -message AvailableLines { - repeated int32 lines = 1; -} - -message LineRangeResponse { - LineDescriptor inline = 1; - LineDescriptor xline = 2; - TraceValueRange trace_value_range = 3; - google.protobuf.Int32Value trace_sample_count = 4; -} - -message SurveyWithFilesResponse { - repeated SurveyWithFiles surveys = 1; -} - -message SurveyWithFiles { - string id = 1; - string name = 2; - map metadata = 3; - repeated File files = 4; - ExternalId external_id = 5; - CRS crs = 6; - SurveyGridTransformation grid_transformation = 7; - CustomSurveyCoverage custom_coverage = 8; -} - -message DataCoverageResponse { - Geometry polygon = 1; -} - -message GetSurveyResponse { - Survey survey = 1; - repeated File files = 2; - Geometry polygon = 3; -} - -message GetFileResponse { - File file = 1; - string crs = 2; - string path = 3; - string survey_name = 4; - string last_step = 5; - google.protobuf.Int32Value inline_offset = 6; - google.protobuf.Int32Value crossline_offset = 7; - google.protobuf.Int32Value cdp_x_offset = 8; - google.protobuf.Int32Value cdp_y_offset = 9; - google.protobuf.FloatValue source_group_scalar_override = 10; -} - -message ListFilesResponse { - repeated File files = 1; -} - -message GetBinaryHeaderResponse { - BinaryHeader meta = 1; -} - -message GetTextHeaderResponse { - TextHeader meta = 1; -} - -message TextHeader { - string file_id = 1; // DEPRECATED: This field will always be empty - string header = 2; - string raw_header = 3; -} - -message BinaryHeader { - string file_id = 1; // DEPRECATED: This field will always be empty - int32 traces = 2; - int32 trace_data_type = 3; - int32 fixed_length_traces = 4; - int32 segy_revision = 5; - int32 auxtraces = 6; - int32 interval = 7; - int32 interval_original = 8; - int32 samples = 9; - int32 samples_original = 10; - int32 ensemble_fold = 11; - int32 vertical_sum = 12; - int32 trace_type_sorting_code = 13; - int32 sweep_type_code = 14; - int32 sweep_frequency_start = 15; - int32 sweep_frequency_end = 16; - int32 sweep_length = 17; - int32 sweep_channel = 18; - int32 sweep_taper_start = 19; - int32 sweep_taper_end = 20; - int32 sweep_taper_type = 21; - int32 correlated_traces = 22; - int32 amplitude_recovery = 23; - int32 original_measurement_system = 24; - int32 impulse_signal_polarity = 25; - int32 vibratory_polarity_code = 26; - bytes raw_header = 27; -} - -message SegYQueryResponse { - bytes content = 1; -} From 35a6ff14f487571a19544ec99077b6be026d2f74 Mon Sep 17 00:00:00 2001 From: Skye Im Date: Wed, 22 Mar 2023 13:35:55 +0100 Subject: [PATCH 2/3] Remove unused protos --- cognite/seismic/protos/types.proto | 66 ------------------------------ 1 file changed, 66 deletions(-) diff --git a/cognite/seismic/protos/types.proto b/cognite/seismic/protos/types.proto index 8a469ef1..97b43f5a 100644 --- a/cognite/seismic/protos/types.proto +++ b/cognite/seismic/protos/types.proto @@ -99,41 +99,10 @@ message Trace { Coordinate coordinate = 5; // The CDP X and Y coordinates of the trace. } -/** - **Deprecated**. Wrapper over Trace type that additionally provide information about the range of z values - included in the trace. - **/ - message SlabTrace { - Trace trace = 1; - int32 z_from = 2; - int32 z_to = 3; -} - -/** - **Deprecated**. Basic type to represent a point in a surface defined by a horizontal grid - Used in horizontal slice queries - **/ -message SurfacePoint { - int32 iline = 1; // The inline number. Within a 3D survey, a inline represents a seismic line parallel to the direction in which the data was adquired. - int32 xline = 2; // The xline number. Within a 3D survey, a xline represents a seismic line perpendicular to the direction in which the data was adquired. - float value = 3; -} - // ----- // Common request types -// **Deprecated**. A survey represents a collection of files in the same area -message Survey { - string id = 1; // Survey ID - string name = 2; // Survey name - map metadata = 3; - ExternalId external_id = 4; // Survey external ID - CRS crs = 5; // The Coordinate Reference System of the survey - SurveyGridTransformation grid_transformation = 6; - CustomSurveyCoverage custom_coverage = 7; -} - // **Deprecated**. File or dataset or cube derived from a single SEG-Y file message File { string id = 1; @@ -143,20 +112,6 @@ message File { ExternalId external_id = 5; } -// **Deprecated**. -message Project { - string id = 1; - string alias = 2; -} - -// **Deprecated**. Specify either id or name to find a file or survey. -message Identifier { - oneof findby { - string id = 1; - string name = 2; - } -} - // An external ID. message ExternalId { string external_id = 1; @@ -171,14 +126,6 @@ message LineDescriptor { google.protobuf.Int32Value step = 3; // [optional] The 'step' of the line. Defaults to 1. } -// **Deprecated**. Specifies an inline or a crossline -message LineSelect { - oneof direction { - int32 iline = 1; // The inline number. Within a 3D survey, a inline represents a seismic line parallel to the direction in which the data was adquired. - int32 xline = 2; // The xline number. Within a 3D survey, a xline represents a seismic line perpendicular to the direction in which the data was adquired. - } -} - // Object to store the line range. From and to are optional message LineRange { google.protobuf.Int32Value from_line = 1; @@ -267,19 +214,6 @@ enum JobStatus { TIMEOUT = 5; // The job took too long and has timed out. No more work will be done on the job. } -// **Deprecated**. -enum FileStep { - REGISTER = 0; - INSERT_FILE_HEADERS = 1; - INSERT_TRACE_HEADERS = 2; - INSERT_DATA = 3; - COMPUTE_COVERAGE = 4; - COMPUTE_GRID = 5; - COMPUTE_TRACE_INDICES = 6; - DELETING = 254; - DELETE = 255; -} - enum InterpolationMethod { NEAREST_TRACE = 0; INVERSE_DISTANCE_WEIGHTING = 1; From 89abdda56f3d6c21036de8c46f784d378ae45e88 Mon Sep 17 00:00:00 2001 From: Skye Im Date: Mon, 27 Mar 2023 11:31:55 +0200 Subject: [PATCH 3/3] Remove v0 from docs build --- build-docs.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/build-docs.sh b/build-docs.sh index 22f5fe94..b90b15e4 100755 --- a/build-docs.sh +++ b/build-docs.sh @@ -12,12 +12,6 @@ mkdir -p docs/docs dockerout # and ingest_job.proto. Those should probably be moved out of this repository. PROTOFILES=$(find $PWD/cognite/seismic/protos -name '*.proto' | sed "s~$PWD/cognite/seismic/protos~protos/cognite/seismic/protos~") -# Protocol buffer files describing the v0 API, in the process of being phased out -# Ideally this should be determined by just recursing through the imports in query_service.proto -# and ingest_service.proto -V0_PROTOS="query_service ingest_service query_service_messages ingest_service_messages types" -V0_PROTOFILES=$(for PROTO in $V0_PROTOS ; do echo protos/cognite/seismic/protos/${PROTO}.proto ; done ) - # Protocol buffer files describing the v1 API. # Ideally this should be determined by just recursing through the imports in v1/seismic_service.proto V1_PROTOS="v1/seismic_service v1/seismic_service_messages v1/seismic_service_datatypes types" @@ -32,7 +26,6 @@ DOCKER_COMMAND="docker run --rm -v $(pwd)/dockerout:/out -v $(pwd):/protos pseud # Build HTML docs and copy to output directory $DOCKER_COMMAND $PROTOFILES --doc_opt=html,all.html $DOCKER_COMMAND $API_PROTOFILES --doc_opt=html,index.html -$DOCKER_COMMAND $V0_PROTOFILES --doc_opt=html,v0.html $DOCKER_COMMAND $V1_PROTOFILES --doc_opt=html,v1.html cp dockerout/*.html docs/docs/ @@ -40,9 +33,7 @@ cp dockerout/*.html docs/docs/ # Build Markdown docs $DOCKER_COMMAND $PROTOFILES --doc_opt=markdown,all.md $DOCKER_COMMAND $API_PROTOFILES --doc_opt=markdown,docs.md -$DOCKER_COMMAND $V0_PROTOFILES --doc_opt=markdown,v0.md $DOCKER_COMMAND $V1_PROTOFILES --doc_opt=markdown,v1.md -$DOCKER_COMMAND $V0_PROTOFILES --doc_opt=json,v0.json $DOCKER_COMMAND $V1_PROTOFILES --doc_opt=json,v1.json # Copy markdown docs to output dir, but patch in a preamble first