I have a shapefile (polygon) that I want to rasterize by an attribute but the rasterize tool does not recognize the right field. When I create a new field using the field calculator it does not matter what type I choose (integer, real, ...) the result is qlonglong (integer64), a type that the rasterize tool apparently does not recognize.
Here is a list of fields that contains different type of fields:
If you access the Rasterize tool from
Raster -> Conversion -> Rasterize (Vector to raster) you will see only the fields that are
integer type not
qlonglong (integer64), the length should be from
1 to 9 when you define a new field, as you can see below:
However, if you accessed the Rasterize (Vector to raster) tool from
Processing toolbox -> GDAL/OGR -> [GDAL] Conversion -> Rasterize (Vector to raster), you will get every type in the attribute table even the string type, as you can see below:
My recommendation is to use the rasterize tool from Processing toolbox.