Skip to content

Commit

Permalink
Add deprecation notice
Browse files Browse the repository at this point in the history
  • Loading branch information
rhugonnet committed Mar 8, 2024
1 parent cb521f2 commit 9a10c65
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions geoutils/raster/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from contextlib import ExitStack
from math import floor
from typing import IO, Any, Callable, TypeVar, overload
from packaging.version import Version

import affine
import geopandas as gpd
Expand Down Expand Up @@ -48,6 +49,7 @@
from geoutils.raster.array import get_mask_from_array
from geoutils.raster.sampling import subsample_array
from geoutils.vector import Vector
from geoutils.misc import deprecate

# If python38 or above, Literal is builtin. Otherwise, use typing_extensions
try:
Expand Down Expand Up @@ -3441,6 +3443,12 @@ def split_bands(self: RasterType, copy: bool = False, bands: list[int] | int | N

return raster_bands

@deprecate(Version("0.3.0"), "Raster.to_points() is deprecated in favor of Raster.to_pointcloud() and "
"will be removed in v0.3.")
def to_points(self, **kwargs): # type: ignore

self.to_pointcloud(**kwargs) # type: ignore

@overload
def to_pointcloud(
self,
Expand Down

0 comments on commit 9a10c65

Please sign in to comment.