Beispiel #1
0
    def crc(cls, surface_file, output, crc):
        """
        Compute an XML CRC of a Geosurface file.
        
        :param surface_file:  Geosurface file
        :param output:        Output file
        :param crc:           CRC (unused, always set to 0)
        :type  surface_file:  str
        :type  output:        str
        :type  crc:           int_ref

        :returns:             CRC Value (always 0)
        :rtype:               int

        .. versionadded:: 8.0

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_
        """
        ret_val, crc.value = gxapi_cy.WrapSURFACE._crc(
            GXContext._get_tls_geo(), surface_file.encode(), output.encode(),
            crc.value)
        return ret_val
Beispiel #2
0
    def compute_surface_subdivision(cls, inputSurfaceFile, inputSurface,
                                    outputSurfaceFile, outputSurface):
        """
        Smooths a surface by applying a loop subdivision algorithm
        
        :param inputSurfaceFile:   Input Geosurface file
        :param inputSurface:       Input Surface Name within Geosurface File
        :param outputSurfaceFile:  Output Geosurface file
        :param outputSurface:      Output Surface Name within Geosurface File
        :type  inputSurfaceFile:   str
        :type  inputSurface:       str
        :type  outputSurfaceFile:  str
        :type  outputSurface:      str

        .. versionadded:: 9.5

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_
        """
        gxapi_cy.WrapMESHUTIL._compute_surface_subdivision(
            GXContext._get_tls_geo(), inputSurfaceFile.encode(),
            inputSurface.encode(), outputSurfaceFile.encode(),
            outputSurface.encode())
Beispiel #3
0
    def gravity_still_reading_correction(cls, db, grav_in, date, time, still, grav_out):
        """
        Gravity Still Reading Correction on selected lines.
        
        :param db:        Database
        :param grav_in:   Input gravity channel handle [`DB_LOCK_READONLY <geosoft.gxapi.DB_LOCK_READONLY>`]
        :param date:      Input date channel handle [`DB_LOCK_READONLY <geosoft.gxapi.DB_LOCK_READONLY>`]
        :param time:      Input time channel handle [`DB_LOCK_READONLY <geosoft.gxapi.DB_LOCK_READONLY>`]
        :param still:     Still readings file
        :param grav_out:  Output gravity channel handle [`DB_LOCK_READWRITE <geosoft.gxapi.DB_LOCK_READWRITE>`]
        :type  db:        GXDB
        :type  grav_in:   int
        :type  date:      int
        :type  time:      int
        :type  still:     str
        :type  grav_out:  int

        .. versionadded:: 8.5

        **License:** `Geosoft End-User License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-end-user-lic>`_
        """
        gxapi_cy.WrapGU._gravity_still_reading_correction(GXContext._get_tls_geo(), db, grav_in, date, time, still.encode(), grav_out)
Beispiel #4
0
    def does_surface_intersect(cls, primarySurfaceFile, primarySurface, secondarySurfaceFile, secondarySurface):
        """
        Checks if the two surfaces intersect at all
        
        :param primarySurfaceFile:    Primary Geosurface file
        :param primarySurface:        Primary Surface Name within Geosurface File
        :param secondarySurfaceFile:  Secondary Geosurface file
        :param secondarySurface:      Secondary Surface Name within Geosurface File
        :type  primarySurfaceFile:    str
        :type  primarySurface:        str
        :type  secondarySurfaceFile:  str
        :type  secondarySurface:      str

        :returns:                     Returns 1 if intersects, 0 if surfaces do not intersect
        :rtype:                       int

        .. versionadded:: 9.5

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_
        """
        ret_val = gxapi_cy.WrapMESHUTIL._does_surface_intersect(GXContext._get_tls_geo(), primarySurfaceFile.encode(), primarySurface.encode(), secondarySurfaceFile.encode(), secondarySurface.encode())
        return ret_val
Beispiel #5
0
    def remove_tool(cls, name):
        """
        Removes (and closes if visible) a auxiliary tool from the current project.
        
        :param name:  Tool name
        :type  name:  str

        :returns:     0 - Ok
                      1 - Tool not found in project
        :rtype:       int

        .. versionadded:: 5.0

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_

        **Limitations:** May not be available while executing a command line program.

        **Note:** Nothing
        """
        ret_val = gxapi_cy.WrapPROJ._remove_tool(GXContext._get_tls_geo(),
                                                 name.encode())
        return ret_val
Beispiel #6
0
    def create(cls, name, size_x, size_y, size_z):
        """
        Creates a new Multivoxset
        
        :param name:    File Name
        :param size_x:  Size in X.
        :param size_y:  Size in Y.
        :param size_z:  Size in Z.
        :type  name:    str
        :type  size_x:  int
        :type  size_y:  int
        :type  size_z:  int

        :returns:       `GXMULTIGRID3D <geosoft.gxapi.GXMULTIGRID3D>` handle, terminates if creation fails
        :rtype:         GXMULTIGRID3D

        .. versionadded:: 9.4

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_
        """
        ret_val = gxapi_cy.WrapMULTIGRID3D._create(GXContext._get_tls_geo(), name.encode(), size_x, size_y, size_z)
        return GXMULTIGRID3D(ret_val)
Beispiel #7
0
    def clip_surface_with_polygon2d(cls, inputSurfaceFile, inputSurface, polygonFile, outputSurfaceFile, outputSurfaceName, maskInside):
        """
        Clip a Surface a specified Polygon file
        
        :param inputSurfaceFile:   Input Geosurface file
        :param inputSurface:       Input Surface name within Geosurface file
        :param polygonFile:        Polygon File
        :param outputSurfaceFile:  Output Surface file
        :param outputSurfaceName:  Output Surface name
        :param maskInside:         Set true if the values inside polygon are to be masked
        :type  inputSurfaceFile:   str
        :type  inputSurface:       str
        :type  polygonFile:        str
        :type  outputSurfaceFile:  str
        :type  outputSurfaceName:  str
        :type  maskInside:         bool

        .. versionadded:: 9.5

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_
        """
        gxapi_cy.WrapMESHUTIL._clip_surface_with_polygon2d(GXContext._get_tls_geo(), inputSurfaceFile.encode(), inputSurface.encode(), polygonFile.encode(), outputSurfaceFile.encode(), outputSurfaceName.encode(), maskInside)
Beispiel #8
0
    def create(cls, input):
        """
        Create a filter from a comma/space delimited string.
        
        :param input:  Filter string
        :type  input:  str

        :returns:      `GXFLT <geosoft.gxapi.GXFLT>` Object
        :rtype:        int

        .. versionadded:: 5.0

        **License:** `Geosoft End-User License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-end-user-lic>`_

        **Note:** Terminates process if filter not found.
        Sample Fraser Filter string:

              "-1,-1,1,1"
        """
        ret_val = gxapi_cy.WrapFLT._create(GXContext._get_tls_geo(),
                                           input.encode())
        return ret_val
Beispiel #9
0
    def create_db(cls, db):
        """
        Create a table from a database.
        
        :param db:  Database
        :type  db:  GXDB

        :returns:    `GXTB <geosoft.gxapi.GXTB>` Object
        :rtype:      GXTB

        .. versionadded:: 5.0

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_

        **Note:** The table will contain fields for all channels in
        the database.

        The database is not loaded with data.  Use the `load_db <geosoft.gxapi.GXTB.load_db>`
        function to load data into the table.
        """
        ret_val = gxapi_cy.WrapTB._create_db(GXContext._get_tls_geo(), db)
        return GXTB(ret_val)
Beispiel #10
0
    def get_login_gui(cls, server, user, password, mode, win_auth):
        """
        Get/Test login information to SQL Server
        
        :param server:    SQL server to use
        :param user:      User name (default & returned)
        :param password:  Password (default & returned)
        :param mode:      :ref:`MFCSQL_DRIVER`
        :param win_auth:  Windows Authentication (default & returned)
        :type  server:    str
        :type  user:      str_ref
        :type  password:  str_ref
        :type  mode:      int
        :type  win_auth:  int_ref

        .. versionadded:: 5.1.8

        **License:** `Geosoft End-User License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-end-user-lic>`_
        """
        user.value, password.value, win_auth.value = gxapi_cy.WrapSQLSRV._get_login_gui(
            GXContext._get_tls_geo(), server.encode(), user.value.encode(),
            password.value.encode(), mode, win_auth.value)
Beispiel #11
0
    def create_itr(cls, vox, itr):
        """
        Create a new `GXVOXD <geosoft.gxapi.GXVOXD>` with our own `GXITR <geosoft.gxapi.GXITR>`
        
        :param vox:  `GXVOX <geosoft.gxapi.GXVOX>` Object
        :param itr:  `GXITR <geosoft.gxapi.GXITR>` Object
        :type  vox:  GXVOX
        :type  itr:  GXITR

        :returns:    `GXVOXD <geosoft.gxapi.GXVOXD>` handle, terminates if creation fails
        :rtype:      GXVOXD

        .. versionadded:: 6.2

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_

        **Note:** Fails if the `GXVOX <geosoft.gxapi.GXVOX>` object is thematic.
        (See the `create_thematic <geosoft.gxapi.GXVOXD.create_thematic>` function.)
        """
        ret_val = gxapi_cy.WrapVOXD._create_itr(GXContext._get_tls_geo(), vox,
                                                itr)
        return GXVOXD(ret_val)
Beispiel #12
0
    def create_db(cls, db, x_ch, y_ch, z_ch):
        """
        Create a handle to a database `GXDAT <geosoft.gxapi.GXDAT>` object
        
        :param db:    Handle to database which `GXDAT <geosoft.gxapi.GXDAT>` is connected with
        :param x_ch:  Name of X channel in database
        :param y_ch:  Name of Y channel in database
        :param z_ch:  Name of Z channel in database
        :type  db:    GXDB
        :type  x_ch:  str
        :type  y_ch:  str
        :type  z_ch:  str

        :returns:     `GXDAT <geosoft.gxapi.GXDAT>` Object
        :rtype:       GXDAT

        .. versionadded:: 5.0

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_
        """
        ret_val = gxapi_cy.WrapDAT._create_db(GXContext._get_tls_geo(), db, x_ch.encode(), y_ch.encode(), z_ch.encode())
        return GXDAT(ret_val)
Beispiel #13
0
    def get_lst(cls, lst, interface, flags, mode):
        """
        Put available `GXDAT <geosoft.gxapi.GXDAT>` filters and qualifiers in a `GXLST <geosoft.gxapi.GXLST>`
        
        :param lst:        `GXLST <geosoft.gxapi.GXLST>` object to populate
        :param interface:  `GXDAT <geosoft.gxapi.GXDAT>` interface name ("XGD" only support option currently)
        :param flags:      :ref:`DAT_FILE`
        :param mode:       :ref:`DAT_FILE_FORM`
        :type  lst:        GXLST
        :type  interface:  str
        :type  flags:      int
        :type  mode:       int

        .. versionadded:: 5.1.8

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_

        **Note:** The filters displayed in the Grid/Image file browse dialog are put
        in the "Name" of the `GXLST <geosoft.gxapi.GXLST>`, while the file qualifiers are stored in
        the "Value".
        """
        gxapi_cy.WrapDAT._get_lst(GXContext._get_tls_geo(), lst, interface.encode(), flags, mode)
Beispiel #14
0
    def load_no_activate(cls, name):
        """
        Loads documents into the workspace
        
        :param name:  List of documents (';' or '|' delimited) to load.
        :type  name:  str

        :returns:     Handle to current edited document, which will be the last
                      database in the list if multiple files were provided.
        :rtype:       GXEMAPTEMPLATE

        .. versionadded:: 5.0

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_

        **Limitations:** May not be available while executing a command line program.

        **Note:** This function acts just like `load <geosoft.gxapi.GXEMAPTEMPLATE.load>` except that the document(s) is not activated (brought to foreground) and no
        guarantee is given about which document is currently active.
        """
        ret_val = gxapi_cy.WrapEMAPTEMPLATE._load_no_activate(GXContext._get_tls_geo(), name.encode())
        return GXEMAPTEMPLATE(ret_val)
Beispiel #15
0
    def is_mi_map_file(cls, map):
        """
        Returns TRUE if file is a MapInfo MAP file.
        
        :param map:  Name of input map file
        :type  map:  str

        :returns:    0 if not a MapInfo MAP file
                     1 if it is.
        :rtype:      int

        .. versionadded:: 5.0

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_

        **Note:** It is important not to overwrite a MapInfo MAP file
        with a Geosoft one. Use this function to test the MAP
        file (looks at the first few bytes).
        """
        ret_val = gxapi_cy.WrapGIS._is_mi_map_file(GXContext._get_tls_geo(),
                                                   map.encode())
        return ret_val
Beispiel #16
0
    def run_vv(cls, vv_x, vv_y, vv_z, ipj, ctl, grd):
        """
        Executes the Rangrid program directly on input data VVs.
        
        :param vv_x:  X data
        :param vv_y:  Y data
        :param vv_z:  Z (grid value) data
        :param ipj:   Projection to put into grid
        :param ctl:   RANGRID control file.
        :param grd:   Output grid name
        :type  vv_x:  GXVV
        :type  vv_y:  GXVV
        :type  vv_z:  GXVV
        :type  ipj:   GXIPJ
        :type  ctl:   str
        :type  grd:   str

        .. versionadded:: 6.3

        **License:** `Geosoft Extended End-User License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-ext-end-user-lic>`_
        """
        gxapi_cy.WrapRGRD._run_vv(GXContext._get_tls_geo(), vv_x, vv_y, vv_z, ipj, ctl.encode(), grd.encode())
Beispiel #17
0
    def triangulation_to_view(cls, triangulation_file, ipj, mview,
                              new_group_name):
        """
        Draw triangle edges in a Vulcan triangulation file to a 3D view in a map.
        
        :param triangulation_file:  Triangulation file
        :param ipj:                 Triangulation projection
        :param mview:               Destination `GXMVIEW <geosoft.gxapi.GXMVIEW>`
        :param new_group_name:      New group name
        :type  triangulation_file:  str
        :type  ipj:                 GXIPJ
        :type  mview:               GXMVIEW
        :type  new_group_name:      str

        .. versionadded:: 8.4

        **License:** `Geosoft End-User License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-end-user-lic>`_
        """
        gxapi_cy.WrapVULCAN._triangulation_to_view(GXContext._get_tls_geo(),
                                                   triangulation_file.encode(),
                                                   ipj, mview,
                                                   new_group_name.encode())
Beispiel #18
0
    def launch(cls, model):
        """
        Launch `GXGMSYS <geosoft.gxapi.GXGMSYS>` with extension
        
        :param model:  Model name
        :type  model:  str

        .. versionadded:: 5.0.1

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_
        """
        gxapi_cy.WrapGMSYS._launch(GXContext._get_tls_geo(), model.encode())


### endblock ClassImplementation
### block ClassExtend
# NOTICE: The code generator will not replace the code in this block
### endblock ClassExtend

### block Footer
# NOTICE: The code generator will not replace the code in this block
### endblock Footer
Beispiel #19
0
    def current_no_activate(cls, type):
        """
        This method returns the Current Edited Document.
        
        :param type:  :ref:`EDOC_TYPE`
        :type  type:  int

        :returns:     `GXEDOC <geosoft.gxapi.GXEDOC>` Object
        :rtype:       GXEDOC

        .. versionadded:: 9.0

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_

        **Limitations:** May not be available while executing a command line program.

        **Note:** This function acts just like `current <geosoft.gxapi.GXEDOC.current>` except that the document is not activated (brought to foreground) and no
        				guarantee is given about which document is currently active.
        """
        ret_val = gxapi_cy.WrapEDOC._current_no_activate(
            GXContext._get_tls_geo(), type)
        return GXEDOC(ret_val)
Beispiel #20
0
    def create(cls, type, name):
        """
        Create a `GXSURFACEITEM <geosoft.gxapi.GXSURFACEITEM>`
        
        :param type:  Type
        :param name:  Name
        :type  type:  str
        :type  name:  str

        :returns:     `GXSURFACEITEM <geosoft.gxapi.GXSURFACEITEM>` Object
        :rtype:       GXSURFACEITEM

        .. versionadded:: 8.4

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_

        .. seealso::

            `set_properties <geosoft.gxapi.GXSURFACEITEM.set_properties>` and `set_default_render_properties <geosoft.gxapi.GXSURFACEITEM.set_default_render_properties>`
        """
        ret_val = gxapi_cy.WrapSURFACEITEM._create(GXContext._get_tls_geo(), type.encode(), name.encode())
        return GXSURFACEITEM(ret_val)
Beispiel #21
0
    def compute_surface_intersection(cls, primarySurfaceFile, primarySurface, secondarySurfaceFile, secondarySurface, outputSurfaceFile, outputSurface):
        """
        Computes and outputs the intersection of two closed surfaces
        
        :param primarySurfaceFile:    Primary Geosurface file
        :param primarySurface:        Primary Surface Name within Geosurface File
        :param secondarySurfaceFile:  Secondary Geosurface file
        :param secondarySurface:      Secondary Surface Name within Geosurface File
        :param outputSurfaceFile:     Output surface file
        :param outputSurface:         Output surface name
        :type  primarySurfaceFile:    str
        :type  primarySurface:        str
        :type  secondarySurfaceFile:  str
        :type  secondarySurface:      str
        :type  outputSurfaceFile:     str
        :type  outputSurface:         str

        .. versionadded:: 9.5

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_
        """
        gxapi_cy.WrapMESHUTIL._compute_surface_intersection(GXContext._get_tls_geo(), primarySurfaceFile.encode(), primarySurface.encode(), secondarySurfaceFile.encode(), secondarySurface.encode(), outputSurfaceFile.encode(), outputSurface.encode())
Beispiel #22
0
    def create_sbf(cls, sbf, file, status):
        """
        Create `GXBF <geosoft.gxapi.GXBF>` object inside an `GXSBF <geosoft.gxapi.GXSBF>`.
        
        :param sbf:     Storage
        :param file:    File name to open ("" is a temporary file)
        :param status:  :ref:`BF_OPEN_MODE`
        :type  sbf:     GXSBF
        :type  file:    str
        :type  status:  int

        :returns:       `GXBF <geosoft.gxapi.GXBF>` Object
        :rtype:         GXBF

        .. versionadded:: 5.0

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_

        **Note:** see sbf.gxh
        """
        ret_val = gxapi_cy.WrapBF._create_sbf(GXContext._get_tls_geo(), sbf, file.encode(), status)
        return GXBF(ret_val)
Beispiel #23
0
    def create_sbf(cls, sbf, file, append):
        """
        Creates an ASCII file to write to in an `GXSBF <geosoft.gxapi.GXSBF>`.
        
        :param sbf:     Storage
        :param file:    Name of the File
        :param append:  :ref:`WA_OPEN`
        :type  sbf:     GXSBF
        :type  file:    str
        :type  append:  int

        :returns:       `GXWA <geosoft.gxapi.GXWA>` Handle
        :rtype:         GXWA

        .. versionadded:: 5.0

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_

        **Note:** See sbf.gxh. ANSI Encoding is assumed, See `create_sbf_ex <geosoft.gxapi.GXWA.create_sbf_ex>` to override this.
        """
        ret_val = gxapi_cy.WrapWA._create_sbf(GXContext._get_tls_geo(), sbf, file.encode(), append)
        return GXWA(ret_val)
Beispiel #24
0
    def load_shape(cls, file, layer_prefix, layer_suffix):
        """
        Load a `GXSHP <geosoft.gxapi.GXSHP>` file to the current data frame
        
        :param file:          File Name
        :param layer_prefix:  Layer Name Prefix: An underscore is added automatically
        :param layer_suffix:  Layer Name Suffix  An underscore is added automatically
        :type  file:          str
        :type  layer_prefix:  str
        :type  layer_suffix:  str

        .. versionadded:: 8.0

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_

        **Note:** The input layer name is created using the (optional) prefix and suffix as follows:

        Prefix_NAME_Suffix
        """
        gxapi_cy.WrapARCMAP._load_shape(GXContext._get_tls_geo(),
                                        file.encode(), layer_prefix.encode(),
                                        layer_suffix.encode())
Beispiel #25
0
    def compute_surface_simplification(cls, inputSurfaceFile, inputSurface,
                                       outputSurfaceFile, outputSurface):
        """
        Simplifies a surface by reducing the number of edges by half
        
        :param inputSurfaceFile:   Input Geosurface file
        :param inputSurface:       Input Surface Name within Geosurface File
        :param outputSurfaceFile:  Output Geosurface file
        :param outputSurface:      Output Surface Name within Geosurface File
        :type  inputSurfaceFile:   str
        :type  inputSurface:       str
        :type  outputSurfaceFile:  str
        :type  outputSurface:      str

        .. versionadded:: 9.5

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_
        """
        gxapi_cy.WrapMESHUTIL._compute_surface_simplification(
            GXContext._get_tls_geo(), inputSurfaceFile.encode(),
            inputSurface.encode(), outputSurfaceFile.encode(),
            outputSurface.encode())
Beispiel #26
0
    def datamine_type(cls, file):
        """
        Returns the type of a Datamine file.
        
        :param file:  Name of input datamine file
        :type  file:  str

        :returns:     Datamine file types - bitwise AND of types.
        :rtype:       int

        .. versionadded:: 6.3

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_

        **Note:** Terminates if file is not a Datamine file.
        A datamine file can contain fields from a multitude
        of types, so use `GXMATH.and_ <geosoft.gxapi.GXMATH.and_>` or `GXMATH.or_ <geosoft.gxapi.GXMATH.or_>` to determine if
        the file contains the required data.
        """
        ret_val = gxapi_cy.WrapGIS._datamine_type(GXContext._get_tls_geo(),
                                                  file.encode())
        return ret_val
Beispiel #27
0
    def sync(cls, mxd):
        """
        Syncronize any Metadata for this `GXMXD <geosoft.gxapi.GXMXD>`
        
        :param mxd:  `GXMXD <geosoft.gxapi.GXMXD>` file name
        :type  mxd:  str

        .. versionadded:: 7.0

        **License:** `Geosoft End-User License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-end-user-lic>`_
        """
        gxapi_cy.WrapMXD._sync(GXContext._get_tls_geo(), mxd.encode())


### endblock ClassImplementation
### block ClassExtend
# NOTICE: The code generator will not replace the code in this block
### endblock ClassExtend

### block Footer
# NOTICE: The code generator will not replace the code in this block
### endblock Footer
Beispiel #28
0
    def em_layer(cls, coil_spacing, coil_frequency, coil_height,
                 coil_configuration, n_layers, vv_thickness, vv_sigma,
                 in_phase, quadrature):
        """
        Calculate the EM response of a layered earth model.
        
        :param coil_spacing:        Coil spacing, error if == 0
        :param coil_frequency:      Coil frequency
        :param coil_height:         Coil height above layer [0]
        :param coil_configuration:  :ref:`EMLAY_GEOMETRY`
        :param n_layers:            Number of layers (including lower halfspace)
        :param vv_thickness:        sNLayer-1 thicknesses  [0] to [sNLayer-2]
        :param vv_sigma:            sNLayer conductivities [0] to [sNLayer-1]
        :param in_phase:            On return - in-phase part (ppm)
        :param quadrature:          On return - quadrature part (ppm)
        :type  coil_spacing:        float
        :type  coil_frequency:      float
        :type  coil_height:         float
        :type  coil_configuration:  int
        :type  n_layers:            int
        :type  vv_thickness:        GXVV
        :type  vv_sigma:            GXVV
        :type  in_phase:            float_ref
        :type  quadrature:          float_ref

        :returns:                   0 of OK
                                    1 if some error
        :rtype:                     int

        .. versionadded:: 5.0

        **License:** `Geosoft End-User License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-end-user-lic>`_
        """
        ret_val, in_phase.value, quadrature.value = gxapi_cy.WrapGU._em_layer(
            GXContext._get_tls_geo(), coil_spacing, coil_frequency,
            coil_height, coil_configuration, n_layers, vv_thickness, vv_sigma,
            in_phase.value, quadrature.value)
        return ret_val
Beispiel #29
0
    def attach_mdf(cls, server, user, password, db, mdf_file_name,
                   ldf_file_name):
        """
        Attaches an MDF SQL server file to a server.
        
        :param server:         SQL server to use
        :param user:           User name (if blank assume NT Integrated Security)
        :param password:       Password
        :param db:             `GXDB <geosoft.gxapi.GXDB>` name
        :param mdf_file_name:  MDF name
        :param ldf_file_name:  LDF name (if blank, tries single db attach)
        :type  server:         str
        :type  user:           str
        :type  password:       str
        :type  db:             str
        :type  mdf_file_name:  str
        :type  ldf_file_name:  str

        :returns:              0 - OK
                               1 - `GXDB <geosoft.gxapi.GXDB>` Operation Canceled
                               Terminates on Error
        :rtype:                int

        .. versionadded:: 5.1.8

        **License:** `Geosoft End-User License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-end-user-lic>`_

        **Note:** The file's path need to be visible as local files on the server.
        Network drives and substitutes may not work.
        """
        ret_val = gxapi_cy.WrapSQLSRV._attach_mdf(GXContext._get_tls_geo(),
                                                  server.encode(),
                                                  user.encode(),
                                                  password.encode(),
                                                  db.encode(),
                                                  mdf_file_name.encode(),
                                                  ldf_file_name.encode())
        return ret_val
Beispiel #30
0
    def clip_surface_with_grid(cls, inputSurfaceFile, inputSurface,
                               gridSurfaceFileName, gridSurfaceName,
                               outputSurfaceFile, outputSurfaceNameAbove,
                               outputSurfaceNameBelow, surface_clip_mode):
        """
        Clip a Surface with a Grid Surface (grid converted to surface)
        
        :param inputSurfaceFile:        Input Geosurface file
        :param inputSurface:            Input Surface name within Geosurface file
        :param gridSurfaceFileName:     Grid Surface file name
        :param gridSurfaceName:         Grid surface name within file
        :param outputSurfaceFile:       Output Surface file
        :param outputSurfaceNameAbove:  Name of Surface Item above grid - required for mode=CLIP_ABOVE and CLIP_BOTH
        :param outputSurfaceNameBelow:  Name of Surface Item below grid - required for mode=CLIP_BELOW and CLIP_BOTH
        :param surface_clip_mode:       :ref:`SURFACE_CLIP_MODE`
        :type  inputSurfaceFile:        str
        :type  inputSurface:            str
        :type  gridSurfaceFileName:     str
        :type  gridSurfaceName:         str
        :type  outputSurfaceFile:       str
        :type  outputSurfaceNameAbove:  str
        :type  outputSurfaceNameBelow:  str
        :type  surface_clip_mode:       int

        :returns:                       Surface clip status
        :rtype:                         int

        .. versionadded:: 9.5

        **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_
        """
        ret_val = gxapi_cy.WrapMESHUTIL._clip_surface_with_grid(
            GXContext._get_tls_geo(), inputSurfaceFile.encode(),
            inputSurface.encode(), gridSurfaceFileName.encode(),
            gridSurfaceName.encode(), outputSurfaceFile.encode(),
            outputSurfaceNameAbove.encode(), outputSurfaceNameBelow.encode(),
            surface_clip_mode)
        return ret_val