I'm trying to rasterize shapefile on QGIS. However, I got blank image whose max and min value are N/A.
Could someone give advice to me?
I took the following two steps.
- make field with field calculator via 'open field calculator' icon
I made int field from a string column as following image - rasterize image via 'raster' tab -> 'conversion' -> rasterize
I set the field made in previous step and configured image size: image size units, width and height, then determined its output extent.
However I got a blank image and its image has somehow N/A numbers.
P.S.
Here is the output log I got.
QGIS version: 3.10.12-A Coruña
QGIS code revision: 75c848ffb1
Qt version: 5.11.2
GDAL version: 3.1.4
GEOS version: 3.8.1-CAPI-1.13.3
PROJ version: Rel. 6.3.2, May 1st, 2020
Processing algorithm…
Algorithm 'Rasterize (vector to raster)' starting…
Input parameters:
{ 'BURN' : 0, 'DATA_TYPE' : 5, 'EXTENT' : '130.65232439272694,130.82848516072687,32.93750724266676,33.06257376193944 [EPSG:4612]', 'EXTRA' : '', 'FIELD' : 'class', 'HEIGHT' : 100, 'INIT' : None, 'INPUT' : 'C:/Users/noguchi_yoshiyuki/Desktop/L03-b-16_4930-jgd_GML/L03-b-16_4930.shp', 'INVERT' : False, 'NODATA' : 0, 'OPTIONS' : '', 'OUTPUT' : 'TEMPORARY_OUTPUT', 'UNITS' : 0, 'WIDTH' : 100 }
GDAL command:
gdal_rasterize -l L03-b-16_4930 -a class -ts 100.0 100.0 -a_nodata 0.0 -te 130.65232439272694 32.93750724266676 130.82848516072687 33.06257376193944 -ot Float32 -of GTiff C:/Users/XXX/L03-b-16_4930-jgd_GML/L03-b-16_4930.shp C:\Users\XXX\AppData\Local\Temp/processing_5a931e90d0804ebbac791342cdfb5f28/e6a9b2d9826343dcbb88bff6c329a942/OUTPUT.tif
GDAL command output:
ERROR 1: Failed to find field class on layer L03-b-16_4930, skipping.
Execution completed in 0.45 seconds
Results:
{'OUTPUT': 'C:\\Users\\XXX\\AppData\\Local\\Temp/processing_5a931e90d0804ebbac791342cdfb5f28/e6a9b2d9826343dcbb88bff6c329a942/OUTPUT.tif'}
Loading resulting layers
Algorithm 'Rasterize (vector to raster)' finished
P.S. No.2
Here is Type of field I made.
class
field does not really contain integers (maybe they were not correctly generated)?ERROR 1: Failed to find field class
, I am now in the same opinion with @Babel that somehowclass
field was not correctly generated. However, QGIS will not allow you to chooseclass
field as burn-in value if its type was string. Um ... I have no idea.