示例#1
0
def import_xyz_roxapi(self, project, name, category, stype, realisation,
                      attributes):  # pragma: no cover
    """Import a Points or Polygons item via ROXAR API spec.

    'Import' here means transfer of data from Roxar API memory space to
    XTGeo memory space.
    """

    rox = RoxUtils(project)

    if stype == "clipboard" and not rox.version_required("1.2"):
        minimumrms = rox.rmsversion("1.2")
        msg = ("Not supported in this ROXAPI version. Points/polygons access "
               "to clipboard requires RMS {}".format(minimumrms))
        raise NotImplementedError(msg)

    if attributes:
        _roxapi_import_xyz_viafile(self, rox, name, category, stype,
                                   realisation)
    else:
        _roxapi_import_xyz(self, rox.project, name, category, stype,
                           realisation)
示例#2
0
def export_xyz_roxapi(self, project, name, category, stype, pfilter,
                      realisation, attributes):  # pragma: no cover
    """Export (store) a XYZ item from XTGeo to RMS via ROXAR API spec."""

    rox = RoxUtils(project)

    if stype == "clipboard" and not rox.version_required("1.2"):
        minimumrms = rox.rmsversion("1.2")
        msg = ("Not supported in this ROXAPI version. Points/polygons access "
               "to clipboard requires RMS {}".format(minimumrms))
        raise NotImplementedError(msg)

    if stype == "horizon_picks":
        _roxapi_export_xyz_hpicks(self, rox, name, category, stype,
                                  realisation, attributes)

    if attributes:
        _roxapi_export_xyz_viafile(self, rox, name, category, stype, pfilter,
                                   realisation, attributes)
    else:
        _roxapi_export_xyz(self, rox, name, category, stype, pfilter,
                           realisation)