Skip to content

Commit

Permalink
DEP: Complete xtgeo 4 XYZ deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
mferrera committed Aug 12, 2024
1 parent 8f0c3bd commit 3a48d2c
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 749 deletions.
72 changes: 0 additions & 72 deletions src/xtgeo/xyz/_xyz.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,6 @@ def __init__(
self._yname = yname
self._zname = zname

def _reset(
self,
xname: str = "X_UTME",
yname: str = "Y_UTMN",
zname: str = "Z_TVDSS",
):
"""Used in deprecated methods."""
self._xname = xname
self._yname = yname
self._zname = zname

@property
def xname(self):
"""Returns or set the name of the X column."""
Expand Down Expand Up @@ -143,67 +132,6 @@ def describe(self, flush=True):

return dsc.astext()

@abstractmethod
def from_file(self, pfile, fformat="xyz"):
"""Import Points or Polygons from a file (deprecated).
Supported import formats (fformat):
* 'xyz' or 'poi' or 'pol': Simple XYZ format
* 'zmap': ZMAP line format as exported from RMS (e.g. fault lines)
* 'rms_attr': RMS points formats with attributes (extra columns)
* 'guess': Try to choose file format based on extension
Args:
pfile (str): Name of file or pathlib.Path instance
fformat (str): File format, see list above
Returns:
Object instance (needed optionally)
Raises:
OSError: if file is not present or wrong permissions.
.. deprecated:: 2.16
Use e.g. xtgeo.points_from_file()
"""
...

@abstractmethod
def from_list(self, plist):
"""Create Points or Polygons from a list-like input (deprecated).
This method is deprecated in favor of using e.g. xtgeo.Points(plist)
or xtgeo.Polygons(plist) instead.
The following inputs are possible:
* List of tuples [(x1, y1, z1, <id1>), (x2, y2, z2, <id2>), ...].
* List of lists [[x1, y1, z1, <id1>], [x2, y2, z2, <id2>], ...].
* List of numpy arrays [nparr1, nparr2, ...] where nparr1 is first row.
* A numpy array with shape [??1, ??2] ...
* An existing pandas dataframe
It is currently not much error checking that lists/tuples are consistent, e.g.
if there always is either 3 or 4 elements per tuple, or that 4 number is
an integer.
Args:
plist (str): List of tuples, each tuple is length 3 or 4.
Raises:
ValueError: If something is wrong with input
.. versionadded:: 2.6
.. versionchanged:: 2.16
.. deprecated:: 2.16
Use e.g. xtgeo.Points(list_like).
"""
...

@abstractmethod
def get_dataframe(self, copy=True) -> pd.DataFrame:
"""Return the Pandas dataframe object."""
Expand Down
Loading

0 comments on commit 3a48d2c

Please sign in to comment.