openapi: 3.1.0
info:
  title: Geophysics API
  summary: A collection of geophysics compute tasks
  description: A collection of geophysics compute tasks powered by Evo.
  version: 2.2.0
paths:
  /compute/orgs/{org_id}/geophysics/gravity-terrain-correction:
    post:
      tags:
      - Tasks
      summary: Gravity terrain correction task
      description: Gravity terrain correction compute task for geophysical surveys
      operationId: gravity-terrain-correction
      parameters:
      - $ref: '#/components/parameters/orgIdParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Parameters'
      responses:
        '303':
          description: 303 response, see <a href='/docs/api/task/get-job-results'>Compute
            API Execute Task documentation</a> for more details
          headers:
            Location:
              description: The URL of the status endpoint for the newly created job
              schema:
                type: string
                format: uri
        '200':
          description: The task result returned by the <a href='/docs/api/task/get-job-results'>Compute
            API Result endpoint</a> when the task is done
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Results'
      x-api-preview: true
  /compute/orgs/{org_id}/geophysics/regular-2d-grid-to-trimesh:
    post:
      tags:
      - Tasks
      summary: Convert a regular 2D grid to a triangle mesh
      description: Convert a regular 2D grid to a triangle mesh using a cell-centered
        or vertex-centered scalar attribute as Z values. Supports optional NaN filtering.
      operationId: regular-2d-grid-to-trimesh
      parameters:
      - $ref: '#/components/parameters/orgIdParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Regular2DGridTriMeshParameters'
      responses:
        '303':
          description: 303 response, see <a href='/docs/api/task/get-job-results'>Compute
            API Execute Task documentation</a> for more details
          headers:
            Location:
              description: The URL of the status endpoint for the newly created job
              schema:
                type: string
                format: uri
        '200':
          description: The task result returned by the <a href='/docs/api/task/get-job-results'>Compute
            API Result endpoint</a> when the task is done
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Regular2DGridTriMeshResults'
      x-api-preview: true
components:
  parameters:
    orgIdParam:
      description: The organisation identifier
      required: true
      schema:
        type: string
        pattern: '''^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'''
        format: uuid
      name: org_id
      in: path
  schemas:
    Parameters:
      additionalProperties: false
      description: Parameters for the terrain correction task.
      properties:
        surfaces:
          format: uri
          reference_to: geoscience-object
          supported_schemas:
          - regular-2d-grid/[>=1.2,<2]
          type: string
          description: 'A 2D regular grid with topography values as attributes and
            (optionally, if a water layer is present) elevations of the top of the
            solid earth (the base of any water layer)

            Supported schemas: `regular-2d-grid/[>=1.2,<2]`'
          title: Grids with elevations of stratigraphic surfaces defining layers for
            terrain correction modeling
          examples:
          - /geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/{object_id}
        observation_points:
          format: uri
          reference_to: geoscience-object
          supported_schemas:
          - pointset/[>=1.2,<2]
          type: string
          description: 'A point set with gravity stations for which terrain corrections
            will be calculated.

            Supported schemas: `pointset/[>=1.2,<2]`'
          title: Observation Points
          examples:
          - /geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/{object_id}
        correction_radius:
          description: Radius used for terrain correction [m]. Should ideally be small
            enough so that a horizontal circle of this radius around any observation
            point fits within the grid area.
          title: Correction Radius
          type: number
          examples:
          - 2.501
          - 22.321
          - 27.503
          - 63.943
          - 73.647
        terrain_layer:
          additionalProperties: false
          description: Parameters for the terrain layer, including density and reference
            to elevation attribute. In the absence of a specified water layer, the
            terrain represents the topography. If a water layer is provided, the terrain
            represents the elevation of the top of the solid earth (the base of the
            water layer).
          properties:
            density:
              description: Density of the layer [kg/m^3]
              title: Density
              type: number
            elevation:
              attribute_from: 2/surfaces
              attribute_path:
                regular-2d-grid/[>=1.2,<2]:
                - cell_attributes[?attribute_type=='scalar']
              description: Reference to an attribute of a 2D grid representing the
                elevations of a layer defining a stratigraphic surface. Elevations
                [m] correspond to the same third coordinate axis as used in the observation
                points.
              reference_to: attribute
              title: Elevation
              type: string
          required:
          - density
          - elevation
          title: Terrain Layer
          type: object
          examples:
          - key: value
          - another_key: 123
        water_layer:
          additionalProperties: false
          default: null
          description: 'Optional: Parameters for a water layer to be used in the model.
            If provided, the terrain layer represents the elevation of the top of
            the solid earth (the base of the water layer). At locations without water,
            terrain and water elevations should be identical. If not provided, no
            water layer is modeled.'
          properties:
            density:
              description: Density of the layer [kg/m^3]
              title: Density
              type: number
            elevation:
              attribute_from: 2/surfaces
              attribute_path:
                regular-2d-grid/[>=1.2,<2]:
                - cell_attributes[?attribute_type=='scalar']
              description: Reference to an attribute of a 2D grid representing the
                elevations of a layer defining a stratigraphic surface. Elevations
                [m] correspond to the same third coordinate axis as used in the observation
                points.
              reference_to: attribute
              title: Elevation
              type: string
          required:
          - density
          - elevation
          title: Water Layer
          type:
          - object
          - 'null'
      required:
      - surfaces
      - observation_points
      - correction_radius
      - terrain_layer
      title: Parameters
      type: object
    Results:
      additionalProperties: false
      description: Results of the terrain correction task.
      properties:
        target:
          additionalProperties: false
          description: The object containing the computed terrain correction values.
          output: geoscience-object
          properties:
            reference:
              description: 'Reference to a geoscience object.

                Supported schemas: `pointset/[>=1.2,<2]`'
              format: uri
              reference_to: geoscience-object
              supported_schemas:
              - pointset/[>=1.2,<2]
              title: Reference
              type: string
            name:
              description: The name of the geoscience object.
              title: Name
              type: string
            description:
              description: The description of the geoscience object.
              title: Description
              type:
              - string
              - 'null'
            schema_id:
              description: The ID of the Geoscience Object schema.
              title: Schema ID
              type: string
            terrain_correction:
              additionalProperties: false
              description: "Attribute containing the terrain correction associated\
                \ with each location at the input observation points. The terrain\
                \ correction corresponds to the vertical gravity component. Unit is\
                \ in m/s\xB2 and corresponds to the coordinate system of the observation\
                \ points where z-axis is positive upwards. This means that the terrain\
                \ correction values should be multiplied by -1 if applied to gravity\
                \ observations assuming a z-axis positive downwards."
              output: attribute
              properties:
                reference:
                  attribute_from: 2/reference
                  attribute_path:
                    pointset/[>=1.2,<2]:
                    - locations.attributes[?attribute_type=='scalar']
                  description: Reference to the attribute in the geoscience object.
                  reference_to: attribute
                  title: Reference
                  type: string
                name:
                  description: The name of the output attribute.
                  title: Name
                  type: string
              required:
              - reference
              - name
              title: Terrain Correction
              type: object
          required:
          - reference
          - name
          - description
          - schema_id
          - terrain_correction
          type: object
          title: Target Object
          examples:
          - key: value
          - another_key: 123
      required:
      - target
      title: Results
      type: object
    Regular2DGridTriMeshParameters:
      additionalProperties: false
      description: Parameters for the regular-2d-grid-to-trimesh task.
      properties:
        source:
          additionalProperties: false
          description: Source grid and attribute
          properties:
            object:
              description: 'Input regular 2D grid containing the scalar attribute
                to use as Z values

                Supported schemas: `regular-2d-grid/[>=1.2,<2]`'
              format: uri
              reference_to: geoscience-object
              supported_schemas:
              - regular-2d-grid/[>=1.2,<2]
              title: Object
              type: string
            attribute:
              attribute_from: 1/object
              attribute_path:
                regular-2d-grid/[>=1.2,<2]:
                - cell_attributes[?attribute_type=='scalar']
              description: Scalar attribute to use as Z values for the triangle mesh
              reference_to: attribute
              title: Attribute
              type: string
          required:
          - object
          - attribute
          title: SourceInput
          type: object
          examples:
          - key: value
          - another_key: 123
        settings:
          additionalProperties: false
          description: Optional settings for mesh generation
          properties:
            flip_triangles:
              default: false
              description: Reverse triangle winding order (flip normals)
              title: Flip Triangles
              type: boolean
            drop_nan_patches:
              default: true
              description: Exclude triangles that touch NaN attribute values
              title: Drop Nan Patches
              type: boolean
            use_centroids:
              default: false
              description: Add a centroid vertex to each quad and split into 4 triangles
                instead of 2, producing a smoother surface at the cost of twice as
                many triangles
              title: Use Centroids
              type: boolean
            triMeshVersion:
              default: '2.2'
              description: Triangle mesh schema version for output payload. Use 2.1
                for Oasis Montaj compatibility or 2.2 for latest schema.
              enum:
              - '2.1'
              - '2.2'
              title: Trimeshversion
          required: []
          title: Settings
          type: object
          examples:
          - key: value
          - another_key: 123
        target:
          additionalProperties: false
          description: Where to create the output Triangle Mesh object
          properties:
            reference:
              description: 'Reference to the targeted object.

                Supported schemas: `triangle-mesh/[>=2.0,<3]`'
              format: uri
              reference_to: geoscience-object
              supported_schemas:
              - triangle-mesh/[>=2.0,<3]
              title: Reference
              type: string
            overwrite:
              default: false
              description: Whether to overwrite the existing object.
              title: Overwrite
              type: boolean
            description:
              default: null
              description: Description to put into the target object.
              title: Description
              type:
              - string
              - 'null'
            tags:
              additionalProperties:
                type: string
              description: Tags to put into the target object.
              title: Tags
              type: object
          required:
          - reference
          target: geoscience-object
          title: Target
          type: object
          examples:
          - key: value
          - another_key: 123
      required:
      - source
      - target
      title: Regular2DGridTriMeshParameters
      type: object
    Regular2DGridTriMeshResults:
      additionalProperties: false
      description: Results of the regular-2d-grid-to-trimesh task.
      properties:
        output:
          additionalProperties: false
          description: Reference to the created Triangle Mesh object.
          output: geoscience-object
          properties:
            reference:
              description: 'Reference to a geoscience object.

                Supported schemas: `triangle-mesh/[>=2.0,<3]`'
              format: uri
              reference_to: geoscience-object
              supported_schemas:
              - triangle-mesh/[>=2.0,<3]
              title: Reference
              type: string
            name:
              description: The name of the geoscience object.
              title: Name
              type: string
            description:
              description: The description of the geoscience object.
              title: Description
              type:
              - string
              - 'null'
            schema_id:
              description: The ID of the Geoscience Object schema.
              title: Schema ID
              type: string
          required:
          - reference
          - name
          - description
          - schema_id
          title: Output Triangle Mesh
          type:
          - object
          - 'null'
        summary:
          additionalProperties: false
          description: Summary statistics for the generated triangle mesh.
          properties:
            num_triangles:
              description: Number of triangles in the generated mesh
              title: Num Triangles
              type: integer
            num_vertices:
              description: Number of vertices in the mesh vertex array
              title: Num Vertices
              type: integer
            has_unused_vertices:
              description: Whether the mesh has orphan vertices not referenced by
                any triangle
              title: Has Unused Vertices
              type: boolean
            has_non_manifold_edges:
              description: "Always false \u2014 splitting a regular grid into triangles\
                \ cannot produce edges shared by more than 2 triangles"
              title: Has Non Manifold Edges
              type: boolean
          required:
          - num_triangles
          - num_vertices
          - has_unused_vertices
          - has_non_manifold_edges
          title: Summary
          type:
          - object
          - 'null'
          examples:
          - A summary, typically short and to the point.
          - An abridged summary of the description.
        has_nan:
          description: True if the source attribute contains NaN values.
          title: Has Nan
          type: boolean
          examples:
          - true
          - false
        nan_count:
          default: 0
          description: Number of NaN values in the source attribute.
          title: Nan Count
          type: integer
          examples:
          - 11
          - 69
          - 75
          - 86
          - 94
        is_rotated:
          default: false
          description: True if the source grid has a non-identity rotation.
          title: Is Rotated
          type: boolean
          examples:
          - true
          - false
      required:
      - output
      - summary
      - has_nan
      title: Regular2DGridTriMeshResults
      type: object
tags:
- name: Tasks
  description: Collection of on-demand tasks
