I am converting a shapefile file to raster , using a Python script and the GDAL library.
For this I use two functions:
However, my code does not spin. Does anyone know if I'm passing the parameters of the wrong function?
from osgeo
import gdal
from osgeo import ogr
dado_saida = 'C:\Lilian\_fabio\criando-aplicacao-conversao\python\pre\saida.tif'
dado_entrada = 'C:\Lilian\_fabio\criando-aplicacao-conversao\python\pre\grid_pontos_1.shp'
data = ogr.Open(dado_entrada)
rasterizeOptions=gdal.RasterizeOptions(options=[], format='Gtiff',creationOptions = None, noData=None,initValues = None, outputBounds = None, outputSRS = None,width = None, height = None, xRes= 1, yRes= 1, targetAlignedPixels = False,bands = None, inverse = False, allTouched=True,burnValues = None, attribute='Z', useZ = False, layers = None,SQLStatement='select Z, * from saida',SQLDialect = None, where = None, callback=None, callback_data=None)
gdal.Rasterize(dado_entrada, dado_saida, options=rasterizeOptions)