girs.rastfeat.rasterize.rasterize_layers

rasterize_layers(layers, **kwargs)

Rasterize the input layer.

  • If input_layer is a file name or Layers object, layer_number will be used.
  • If not None, raster_parameters will be used to create the resulting rasters
Parameters:
  • layers (str, girs.feat.layers.LayersSet, ogr.Layer) – layers file name or Layers object or ogr Layer object
  • kwargs
    key layer_number:
     (int, [int]): layer number or list of layer numbers
    key burn_values:
     (int, [int]): unique burn value or list of burn values, one for each layer number
    key raster_parameters:
     raster or raster parameter. If given, nodata and pixel size are not used
    key nodata:(raster type, [raster type]): nodata or list of nodata, one for each layer number
    key pixel_size:(float): pixel size if output_raster is a file name. If not given, the pixel size will be 1/100 of the narrowest layer extent (width or height)
    key all_touched:
     True/False, default all_touched=False
    key output_raster:
     girs.rast.raster.RasterWriter, girs.rast.raster.RasterUpdate, or filename of the output raster
Returns:

girs.rast.raster.RasterWriter