# Path: mapchete/commons/clip.py
# def clip_array_with_vector(
#     array, array_affine, geometries, inverted=False, clip_buffer=0
# ):
# 
# Path: mapchete/commons/contours.py
# def extract_contours(array, tile, interval=100, field="elev", base=0):
# def _get_contour_values(min_val, max_val, base=0, interval=100):
# 
# Path: mapchete/commons/hillshade.py
# def hillshade(
#     elevation,
#     tile,
#     azimuth=315.0,
#     altitude=45.0,
#     z=1.0,
#     scale=1.0,
# ):
#     """
#     Return hillshaded numpy array.
# 
#     Parameters
#     ----------
#     elevation : array
#         Input elevation data.
#     tile : Tile
#         Tile covering the array.
#     azimuth : float
#         Light source direction in degrees. (default: 315, top left)
#     altitude : float
#         Light source altitude angle in degrees. (default: 45)
#     z : float
#         Vertical DEM exaggeration factor. (default: 1)
#     scale : float
#         Scale factor of pixel size units versus height units (insert 112000
#         when having elevation values in meters in a geodetic projection).
#     """
#     elevation = elevation[0] if elevation.ndim == 3 else elevation
#     azimuth = float(azimuth)
#     altitude = float(altitude)
#     z = float(z)
#     scale = float(scale)
#     xres = tile.pixel_x_size
#     yres = -tile.pixel_y_size
#     slope, aspect = calculate_slope_aspect(elevation, xres, yres, z=z, scale=scale)
#     deg2rad = math.pi / 180.0
#     # shaded has values between -1.0 and +1.0
#     shaded = np.sin(altitude * deg2rad) * np.sin(slope) + np.cos(
#         altitude * deg2rad
#     ) * np.cos(slope) * np.cos((azimuth - 90.0) * deg2rad - aspect)
#     # stretch to 0 - 255 and add one pixel padding using the edge values
#     return ma.masked_array(
#         data=np.pad(np.clip(shaded * 255.0, 1, 255).astype("uint8"), 1, mode="edge"),
#         mask=elevation.mask,
#     )
# 
# Path: mapchete/validate.py
# def deprecated_kwargs(func):
#     """Decorator for open() functions warning of keyword argument usage."""
# 
#     def func_wrapper(*args, **kwargs):
#         if kwargs:
#             warnings.warn(
#                 "Using kwargs such in open() is deprecated and will have no effect."
#             )
#         if "resampling" in kwargs:
#             raise DeprecationWarning(
#                 "'resampling' argument has no effect here and must be provided in read() "
#                 "function."
#             )
#         return func(*args, **kwargs)
# 
#     return func_wrapper


from mapchete.commons import clip as commons_clip
from mapchete.commons import contours as commons_contours
from mapchete.commons import hillshade as commons_hillshade
from mapchete.validate import deprecated_kwargs
        self.version = ""
        self.abstract = ""

        self.tile = tile
        self.tile_pyramid = tile.tile_pyramid
        if config is not None:
            input = config.get_inputs_for_tile(tile)
            params = config.params_at_zoom(tile.zoom)
        self.params = dict(params, input=input)
        self.input = input
        self.output_params = output_params

    def write(self, data, **kwargs):
        """Deprecated."""
        raise DeprecationWarning(
            "Please return process output data instead of using self.write()."
        )

    def read(self, **kwargs):
        """
        Read existing output data from a previous run.

        Returns
        -------
        process output : NumPy array (raster) or feature iterator (vector)
        """
        raise DeprecationWarning(
            "Read existing output from within a process is deprecated"
        )


# Path: mapchete/commons/clip.py
# def clip_array_with_vector(
#     array, array_affine, geometries, inverted=False, clip_buffer=0
# ):
# 
# Path: mapchete/commons/contours.py
# def extract_contours(array, tile, interval=100, field="elev", base=0):
# def _get_contour_values(min_val, max_val, base=0, interval=100):
# 
# Path: mapchete/commons/hillshade.py
# def hillshade(
#     elevation,
#     tile,
#     azimuth=315.0,
#     altitude=45.0,
#     z=1.0,
#     scale=1.0,
# ):
#     """
#     Return hillshaded numpy array.
# 
#     Parameters
#     ----------
#     elevation : array
#         Input elevation data.
#     tile : Tile
#         Tile covering the array.
#     azimuth : float
#         Light source direction in degrees. (default: 315, top left)
#     altitude : float
#         Light source altitude angle in degrees. (default: 45)
#     z : float
#         Vertical DEM exaggeration factor. (default: 1)
#     scale : float
#         Scale factor of pixel size units versus height units (insert 112000
#         when having elevation values in meters in a geodetic projection).
#     """
#     elevation = elevation[0] if elevation.ndim == 3 else elevation
#     azimuth = float(azimuth)
#     altitude = float(altitude)
#     z = float(z)
#     scale = float(scale)
#     xres = tile.pixel_x_size
#     yres = -tile.pixel_y_size
#     slope, aspect = calculate_slope_aspect(elevation, xres, yres, z=z, scale=scale)
#     deg2rad = math.pi / 180.0
#     # shaded has values between -1.0 and +1.0
#     shaded = np.sin(altitude * deg2rad) * np.sin(slope) + np.cos(
#         altitude * deg2rad
#     ) * np.cos(slope) * np.cos((azimuth - 90.0) * deg2rad - aspect)
#     # stretch to 0 - 255 and add one pixel padding using the edge values
#     return ma.masked_array(
#         data=np.pad(np.clip(shaded * 255.0, 1, 255).astype("uint8"), 1, mode="edge"),
#         mask=elevation.mask,
#     )
# 
# Path: mapchete/validate.py
# def deprecated_kwargs(func):
#     """Decorator for open() functions warning of keyword argument usage."""
# 
#     def func_wrapper(*args, **kwargs):
#         if kwargs:
#             warnings.warn(
#                 "Using kwargs such in open() is deprecated and will have no effect."
#             )
#         if "resampling" in kwargs:
#             raise DeprecationWarning(
#                 "'resampling' argument has no effect here and must be provided in read() "
#                 "function."
#             )
#         return func(*args, **kwargs)
# 
#     return func_wrapper


# Path: mapchete/_user_process.py
from mapchete.commons import clip as commons_clip
from mapchete.commons import contours as commons_contours
from mapchete.commons import hillshade as commons_hillshade
from mapchete.validate import deprecated_kwargs

        self.version = ""
        self.abstract = ""

        self.tile = tile
        self.tile_pyramid = tile.tile_pyramid
        if config is not None:
            input = config.get_inputs_for_tile(tile)
            params = config.params_at_zoom(tile.zoom)
        self.params = dict(params, input=input)
        self.input = input
        self.output_params = output_params

    def write(self, data, **kwargs):
        """Deprecated."""
        raise DeprecationWarning(
            "Please return process output data instead of using self.write()."
        )

    def read(self, **kwargs):
        """
        Read existing output data from a previous run.

        Returns
        -------
        process output : NumPy array (raster) or feature iterator (vector)
        """
        raise DeprecationWarning(
            "Read existing output from within a process is deprecated"
        )


    @deprecated_kwargs