geopyspark.geotrellis.rasterize module

geopyspark.geotrellis.rasterize.rasterize(geoms, crs, zoom, fill_value, cell_type=<CellType.FLOAT64: 'float64'>, options=None, num_partitions=None)

Rasterizes a Shapely geometries.

Parameters:
  • geoms ([shapely.geometry]) – List of shapely geometries to rasterize.
  • crs (str or int) – The CRS of the input geometry.
  • zoom (int) – The zoom level of the output raster.
  • fill_value (int or float) – Value to burn into pixels intersectiong geometry
  • cell_type (str or CellType) – Which data type the cells should be when created. Defaults to CellType.FLOAT64.
  • options (RasterizerOptions, optional) – Pixel intersection options.
  • num_partitions (int, optional) – The number of repartitions Spark will make when the data is repartitioned. If None, then the data will not be repartitioned.
Returns:

TiledRasterLayer