5

I have both QGIS 3.6.3 and 3.0.1 running on Windows 10 64bit. In 3.6.3 I am unable to rasterise a point layer, while the same operation seems to work in 3.0.1. I'm having to switch between versions just for this one operation....

Logfile from 3.6.3:- QGIS version: 3.6.3-Noosa QGIS code revision: 0c5774c068 Qt version: 5.11.2 GDAL version: 2.4.1 GEOS version: 3.7.2-CAPI-1.11.0 b55d2125 PROJ version: 520 Processing algorithm… Algorithm 'Rasterize (vector to raster)' starting… Input parameters: { 'BURN' : 0, 'DATA_TYPE' : 5, 'EXTENT' : '163952.5,185652.5,9144881.5,9171981.5 [EPSG:XXXXX]', 'FIELD' : 'field_3', 'HEIGHT' : 25, 'INIT' : None, 'INPUT' : 'file:///Y:/Projects/2019/XXXX/Analysis/ExportData.txt?type=csv&delimiter=%5Ct&useHeader=No&trimFields=Yes&skipEmptyFields=Yes&xField=field_1&yField=field_2&crs=EPSG:XXXXX&spatialIndex=yes&subsetIndex=no&watchFile=no', 'INVERT' : False, 'NODATA' : 0, 'OPTIONS' : '', 'OUTPUT' : 'Y:/Projects/2019/XXXXX/QGIS/CoverageV6A.tif', 'UNITS' : 1, 'WIDTH' : 25 } 

GDAL command:

gdal_rasterize -l None -a field_3 -tr 25.0 25.0 -a_nodata 0.0 -te 163952.5 9144881.5 185652.5 9171981.5 -ot Float32 -of GTiff file:///Y:/Projects/2019/XXXXX/Analysis/ExportData.txt?type=csv&delimiter=%5Ct&useHeader=No&trimFields=Yes&skipEmptyFields=Yes&xField=field_1&yField=field_2&crs=EPSG:XXXXX&spatialIndex=yes&subsetIndex=no&watchFile=no Y:/Projects/2019/XXXXX/QGIS/CoverageV6A.tif 

GDAL command output:

FAILURE: No output file specified. Usage: gdal_rasterize [-b band]* [-i] [-at] {[-burn value]* | [-a attribute_name] | [-3d]} [-add] [-l layername]* [-where expression] [-sql select_statement] [-dialect dialect] [-of format] [-a_srs srs_def] [-to "NAME=VALUE"]* [-co "NAME=VALUE"]* [-a_nodata value] [-init value]* [-te xmin ymin xmax ymax] [-tr xres yres] [-tap] [-ts width height] [-ot {Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/ CInt16/CInt32/CFloat32/CFloat64}] [-optim {[AUTO]/VECTOR/RASTER}] [-q] <src_datasource> <dst_filename> 'delimiter' is not recognized as an internal or external command, operable program or batch file. 'useHeader' is not recognized as an internal or external command, operable program or batch file. 'trimFields' is not recognized as an internal or external command, operable program or batch file. 'skipEmptyFields' is not recognized as an internal or external command, operable program or batch file. 'xField' is not recognized as an internal or external command, operable program or batch file. 'yField' is not recognized as an internal or external command, operable program or batch file. 'crs' is not recognized as an internal or external command, operable program or batch file. 'spatialIndex' is not recognized as an internal or external command, operable program or batch file. 'subsetIndex' is not recognized as an internal or external command, operable program or batch file. 'watchFile' is not recognized as an internal or external command, operable program or batch file. Execution completed in 0.18 seconds Results: {'OUTPUT': 'Y:/Projects/2019/XXXXX/QGIS/CoverageV6A.tif'} Loading resulting layers The following layers were not correctly generated.<ul><li>Y:/Projects/2019/XXXXX/QGIS/CoverageV6A.tif</li></ul>You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm. 
2
  • Is the name of your source vector file really file:///Y:/Projects/2019/XXXX/Analysis/ExportData.txt?type=csv&delimiter=%5Ct&useHeader=No&trimFields=Yes&skipEmptyFields=Yes&xField=field_1&yField=field_2&crs=EPSG:XXXXX&spatialIndex=yes&subsetIndex=no&watchFile=no'? Commented Jun 24, 2019 at 14:43
  • Same problem here Commented May 20, 2020 at 19:26

1 Answer 1

0

I don't have an older version of QGIS to compare with, but I was getting this same error trying to rasterize a point layer based on a CSV file, as yours seems to have been.

On a hunch prompted by @user30184's comment, I exported the point layer to a shapefile and tried again using the shapefile as the vector layer to be rasterized and it worked fine.

I also had no problems with the data exported to GeoPackage format; I think any spatial data format would work equally well. I think the CSV-based data layer, with all those attributes included as part of its "file name" in the call to gdal_rasterize, is the cause of the problem.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.