TransWikia.com

GDAL rasterise vector to raster error

Geographic Information Systems Asked by Will Hutchins on February 2, 2021

I am trying to convert a SHP vector file of X,Y,Z bathymetry. I am trying to use the GDAL Rasterise (vector to raster) tool.

When I run it I get the following error in the log. I have tried looking for the /bin/sh: gdal_rasterize: file on my Mac but can’t locate it.

QGIS version: 3.8.0-Zanzibar
Qt version: 5.11.2
GDAL version: 2.4.1
GEOS version: 3.7.1-CAPI-1.11.1 27a5e771
PROJ version: Rel. 5.2.0, September 15th, 2018
Processing algorithm…
Algorithm 'Rasterize (vector to raster)' starting…
Input parameters:
{ 'BURN' : 0, 'DATA_TYPE' : 5, 'EXTENT' : '473840.0,479842.0,6564270.0,6570650.0 [EPSG:23031]', 'FIELD' : 'field_3', 'HEIGHT' : 2.5, 'INIT' : None, 'INPUT' : '/Users/willhutchins/Documents-Offline/2mbathy.gpkg|layername=2mbathy', 'INVERT' : False, 'NODATA' : 0, 'OPTIONS' : '', 'OUTPUT' : '/Users/willhutchins/Documents-Offline/2m bathy.tif', 'UNITS' : 1, 'WIDTH' : 2.5 }

GDAL command:
gdal_rasterize -l 2mbathy -a field_3 -tr 2.5 2.5 -a_nodata 0.0 -te 473840.0 6564270.0 479842.0 6570650.0 -ot Float32 -of GTiff /Users/willhutchins/Documents-Offline/2mbathy.gpkg "/Users/willhutchins/Documents-Offline/2m bathy.tif"
GDAL command output:
/bin/sh: gdal_rasterize: command not found

Execution completed in 0.10 seconds
Results:
{'OUTPUT': '/Users/willhutchins/Documents-Offline/2m bathy.tif'}

Loading resulting layers
The following layers were not correctly generated.<ul><li>/Users/willhutchins/Documents-Offline/2m bathy.tif</li></ul>You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

One Answer

It looks like gdal_rasterize is not in your path, or perhaps GDAL is not installed? I don't have a Mac myself, but it looks like

brew install gdal --HEAD

(from https://gis.stackexchange.com/a/165286/2397) should install GDAL command line utilities for you if they aren't installed already.

Answered by Rich on February 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP