コード例 #1
0
ファイル: cloud.py プロジェクト: YHanL/pyfor
    def grid(self, cell_size):
        """
        Generates a :class:`.Grid` object for the parent object given a cell size. \
        See the documentation for :class:`.Grid` for more information.

        :param cell_size: The resolution of the plot in the same units as the input file.
        :return: A :class:`.Grid` object.
        """
        return rasterizer.Grid(self, cell_size)
コード例 #2
0
    def grid(self, cell_size):
        """
        Generates a Grid object for this Cloud given a cell size. The Grid is generally used to compute Raster objects
        See the documentation for Grid for more information.

        :param cell_size: The resolution of the plot in the same units as the input file.
        :return: A Grid object.
        """
        return (rasterizer.Grid(self, cell_size))
コード例 #3
0
ファイル: cloud.py プロジェクト: YHanL/pyfor
    def plot(self, cell_size = 1, cmap = "viridis", return_plot = False, block=False):
        """
        Plots a basic canopy height model of the Cloud object. This is mainly a convenience function for \
        :class:`.Raster.plot`. More robust methods exist for dealing with canopy height models. Please see the \
        `user manual <https://github.com/brycefrank/pyfor_manual/blob/master/notebooks/3-CanopyHeightModel.ipynb>`_.

        :param clip_size: The resolution of the plot in the same units as the input file.
        :param return_plot: If true, returns a matplotlib plt object.
        :return: If return_plot == True, returns matplotlib plt object. Not yet implemented.
        """

        # FIXME this can break other functions and pipelines if a user plots in between calls, it resets the parent cloud bins_x/bins_y column
        # it may be best to return an entirely new data structure
        rasterizer.Grid(self, cell_size).raster("max", "z").plot(cmap, block = block, return_plot = return_plot)
コード例 #4
0
    def plot(self,
             cell_size=1,
             cmap="viridis",
             return_plot=False,
             block=False):
        """
        Plots a basic canopy height model of the Cloud object. This is mainly a convenience function for \
        :class:`.Raster.plot`. More robust methods exist for dealing with canopy height models. Please see the \
        `user manual <https://github.com/brycefrank/pyfor_manual/blob/master/notebooks/3-CanopyHeightModel.ipynb>`_.

        :param clip_size: The resolution of the plot in the same units as the input file.
        :param return_plot: If true, returns a matplotlib plt object.
        :return: If return_plot == True, returns matplotlib plt object. Not yet implemented.
        """
        rasterizer.Grid(self,
                        cell_size).raster("max",
                                          "z").plot(cmap,
                                                    block=block,
                                                    return_plot=return_plot)
コード例 #5
0
    def plot(self,
             cell_size=1,
             cmap="viridis",
             return_plot=False,
             block=False):
        """
        Plots a basic canopy height model of the Cloud object. This is mainly a convenience function for \
        rasterizer.Grid.plot, check that method docstring for more information and more robust usage cases (i.e. \
        pit filtering and interpolation methods).

        :param cellf vmin or vmax is not given, they are initialized from the minimum and maximum value respectively of the first input processed. That is, __call__(A) calls autoscale_None(A). If clip _size: The resolution of the plot in the same units as the input file.
        :param return_plot: If true, returns a matplotlib plt object.
        :return: If return_plot == True, returns matplotlib plt object. Not yet implemented.
        """

        rasterizer.Grid(self,
                        cell_size).raster("max",
                                          "z").plot(cmap,
                                                    block=block,
                                                    return_plot=return_plot)