TransWikia.com

Error in rasterizing a shapefile

Geographic Information Systems Asked by Paris on March 28, 2021

I tried to convert a polygon shapefile of classified land cover to raster using ‘Rasterize (vector to raster) tool in GDAL. I chose the DN field, set output ratser size unit to pixels and chose the same layer extent as output extent. I get the following error:

GDAL command output:
*ERROR 1: Wrong value for -ts parameter.
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>**

What should I change to rasterize this polygon?

enter image description here

One Answer

I created an arbitrary shapefile approximately in your extent area as follows.

enter image description here

In 'Rasterize (vector to raster)' tool I used following parameters.

enter image description here

After click in Run, features polygon were rasterized as expected (burn field class and resolution 0.1x0.1 degrees).

enter image description here

Answered by xunilk on March 28, 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