[QGIS-Developer] Rasterization of a polygon

Diaz Loaiza, M.A. andres.diazloaiza at vu.nl
Mon Feb 26 16:09:41 PST 2018


Dear QGIS developers,


I was having a shapefile of polygons with integer numbers between 0 and 33122 (33123 elements of long integers of arcgis). Then I was applying the rasterization function (raster>conversion>rasterize) and I was discovering that the numbers over the output raster were between 0 and 32767 plus other 354 clusters of cells with negative values (between 0 and -32768).

as is explained in this python documentation of;

https://docs.scipy.org/doc/numpy-1.10.0/user/basics.types.htmlhttps://docs.scipy.org/doc/numpy-1.10.0/user/basics.types.html

the int16 arrays only can contain numbers between -32768 and 32767, reason why the cells of the polygons with numbers higher than 32767 were negative.

I was searching over the rasterization tool previously mentioned and there was no option to change the output format (to choose an int32 or higher format).

My question is: is there anyway to prevent this error?  Can it be possible to add this option over the tool rasterize in order that the user can choose which format will be the output?.

Thank you very much,


Andres Diaz
Fan of QGIS

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180227/36ce4f6a/attachment.html>


More information about the QGIS-Developer mailing list