I use the following python code to rasterize a vector
output = 'F:\\TEMP\\rasterized.tif' target_ds = gdal.GetDriverByName('GTiff').Create(output, x_res, y_res, 1, gdal.GDT_Int32) target_ds.SetGeoTransform((x_min, pixel_width, 0, y_min, 0, pixel_width)) gdal.RasterizeLayer(target_ds, , layer, options=["ATTRIBUTE=id"])
id used as the
ATTRIBUTE is larger than
I retrive the
layer from a database with:
conn = ogr.Open('DB Connection parameters') sql = "SELECT Statement" layer = conn.ExecuteSQL(sql)
- The GDAL reference does not mention an
Int64datatype, which is consistent with the GeoTIFF format description.
- However, the format description also mentions, that BigTIFF is supported when running
libtiff >= 4(which is my case). Reading the libtiff website I could not find a specific reference if
Int64is supported or not.
- I installed
Questions: How to create a raster in GDAL that supports the
Int64 datatype? Does not have to be GeoTIFF.