TransWikia.com

Rasterize does not rasterize field with the value 0

Geographic Information Systems Asked on April 4, 2021

I have a shapefile layer that contains the field fraction which varies from 0 to 0.05.

DN       sum       count       fraction
1        0         90          0
2        5         1070        0.0047
3        2         39          0.0051
4        1         164         0.0061
...      ...       ...         ...
1615     0         90          0

I want to rasterize the fraction field with the GDAL function Rasterize in qgis.
I set the width and height to 349 & 277, respectively. The map extent is set to another loaded map in the canvas. But, when I execute the rasterize function it excludes all the values of 0 in the plot. Below is my work flow!

How can force the function to include the values of 0 in my raster plot?

workflow

The output of my ‘struggle’ is given here. Purple indicates what shape it should have resembled, black indicates my rasterized file.

result

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