geepillow.eeblocks ================== .. py:module:: geepillow.eeblocks .. autoapi-nested-parse:: Block for Google Earth Engine images and image collections. Attributes ---------- .. autoapisummary:: geepillow.eeblocks.DEFAULT_GRID_FONT geepillow.eeblocks.TextPositionType geepillow.eeblocks.logger Classes ------- .. autoapisummary:: geepillow.eeblocks.EEImageBlock geepillow.eeblocks.EEImageCollectionGrid Module Contents --------------- .. py:class:: EEImageBlock(ee_image, viz_params = None, dimensions = Block.DEFAULT_SIZE, scale = None, region = None, overlay = None, overlay_style = None, style_property = None, position = 'center-center', fit_block = True, keep_proportion = True, size = None, background_color = 'white', background_opacity = 1, mode = DEFAULT_MODE) Bases: :py:obj:`geepillow.blocks.ImageBlock` EEImageBlock. By default, the size of the image matches the size of the block. :param ee_image: Earth Engine image. :param viz_params: Visualization parameters. :param dimensions: dimensions of the image, in pixels. If only one number is passed, it is used as the maximum, and the other dimension is computed by proportional scaling. :param scale: spatial resolution. :param region: region of interest to "clip" the image to. :param overlay: a feature collection to overlay on top of the image. :param overlay_style: style of the overlay. :param style_property: A per-feature property expected to contain a dictionary. Values in the dictionary override any default values for that feature. :param position: position of the image inside the block. :param fit_block: if True the element's boundaries will never exceed the block. :param keep_proportion: keep proportion (ratio) of the image. :param size: size of the block (not the image). If None it will be taken from the dimensions of the image. :param background_color: color of the background. :param background_opacity: opacity of the background. :param mode: mode of the background image .. py:attribute:: dimensions :value: (500, 500) .. py:attribute:: ee_image .. py:attribute:: overlay :value: None .. py:attribute:: overlay_style :value: None .. py:attribute:: region :value: None .. py:attribute:: scale :value: None .. py:attribute:: style_property :value: None .. py:attribute:: viz_params .. py:class:: EEImageCollectionGrid(collection, viz_params = None, scale = None, region = None, text_pattern = None, text_position = 'bottom', font = DEFAULT_GRID_FONT, overlay = None, overlay_style = None, style_property = None, x_space = 10, y_space = 10, n_columns = None, n_rows = None, image_dimensions = None, dimensions = (3300, 2250), image_position = 'center-center', text_inner_position = 'center-center', position = 'center-center', fit_block = True, keep_proportion = True, size = None, background_color = 'white', background_opacity = 1, mode = DEFAULT_MODE) Bases: :py:obj:`geepillow.grids.Grid` A grid for image collections. This class is designed for Image Collection with overlapping images. If n_columns is not None and n_rows is None, the number of rows will be computed using the number of images. Same the other way around. If both are None, n_columns will be set to 3. :param collection: Earth Engine image collection. :param n_columns: number of columns. :param n_rows: number of rows. :param viz_params: Visualization parameters. :param scale: spatial resolution. :param text_pattern: A text pattern to include in the position indicated by text_position param. Properties of the image can be used inside this text following this guide: https://geetools.readthedocs.io/en/stable/autoapi/geetools/ee_string/StringAccessor.format.html :param text_position: the position of the text block. :param font: font to use. The size the font is included in this parameter. :param region: region of interest to "clip" each image to. If None it uses the geometry of each image. :param overlay: a feature collection to overlay on top of the image. :param overlay_style: style of the overlay. :param style_property: A per-feature property expected to contain a dictionary. Values in the dictionary override any default values for that feature. :param image_dimensions: dimensions of the image, in pixels. If only one number is passed, it is used as the maximum, and the other dimension is computed by proportional scaling. :param dimensions: dimensions of the grid image in pixels. The default value corresponds to the size of a Letter at 300 DPI (landscape orientation). :param image_position: position of the image inside its block. :param text_inner_position: position of the text inside its block. :param position: position of the grid inside its block. :param fit_block: if True the element's boundaries will never exceed the block. :param keep_proportion: keep proportion (ratio) of the image. :param size: size of the block (not the image). :param background_color: color of the background. :param background_opacity: opacity of the background. :param mode: mode of the background image :param x_space: space on the x axis. :param y_space: space on the y axis. .. py:method:: make_blocks() Make the list of blocks for the grid. .. py:method:: make_image_block(image) Make the block for the image and text block if needed. .. py:attribute:: _image_dimensions :value: None .. py:attribute:: _image_ids :value: None .. py:attribute:: _n_columns :value: None .. py:attribute:: _n_rows :value: None .. py:attribute:: collection .. py:attribute:: dimensions :value: (3300, 2250) .. py:attribute:: font .. py:property:: image_dimensions Dimensions of each image. .. py:property:: image_ids Ids of all the images in the collection. .. py:attribute:: image_position :value: 'center-center' .. py:property:: n_columns :type: int Number of columns. .. py:property:: n_last :type: int Number of elements in the last row. .. py:property:: n_rows Number of rows. .. py:attribute:: overlay :value: None .. py:attribute:: overlay_style :value: None .. py:attribute:: region :value: None .. py:attribute:: scale :value: None .. py:attribute:: style_property :value: None .. py:attribute:: text_inner_position :value: 'center-center' .. py:attribute:: text_pattern :value: None .. py:attribute:: text_position :value: 'bottom' .. py:attribute:: viz_params .. py:attribute:: x_space :value: 10 .. py:attribute:: y_space :value: 10 .. py:data:: DEFAULT_GRID_FONT .. py:data:: TextPositionType .. py:data:: logger