mapshader.core.create_agg#

mapshader.core.create_agg(source: MapSource, xmin: Optional[float] = None, ymin: Optional[float] = None, xmax: Optional[float] = None, ymax: Optional[float] = None, x: Optional[float] = None, y: Optional[float] = None, z: Optional[float] = None, height: int = 256, width: int = 256)[source]#

Instantiate an abstract canvas representing the space and compute a reduction by pixel according to the geometry type applying the aggregation function defined in source.

Parameters:
  • source (mapshader.sources.MapSource) – The map source object.

  • xmin (float) – X-axis minimum range.

  • ymin (float) – Y-axis minimum range.

  • xmax (float) – X-axis maximum range.

  • ymax (float) – Y-axis maximum range.

  • x (float) – The coordinates to be used to get the bounds inclusive space along the axis.

  • y (float) – The coordinates to be used to get the bounds inclusive space along the axis.

  • z (float) – The coordinates to be used to get the bounds inclusive space along the axis.

  • height (int, default=256) – Height of the output aggregate in pixels.

  • width (int, default=256) – Width of the output aggregate in pixels.

Returns:

agg – The transformed datasource.

Return type:

xarray.DataArray