[GRASS-user] Null values in attribute table get converted to 0 (zero) during v.to.rast

Markus Metz markus.metz.giswork at gmail.com
Thu Oct 31 13:20:06 PDT 2019


On Tue, Oct 29, 2019 at 7:40 PM Veronica Andreo <veroandreo at gmail.com>
wrote:
>
> Hi Daniel,
>
> I agree that if there's a NULL in the column, there should be NULL in the
resulting raster. I suggest to open a ticket here:
https://trac.osgeo.org/grass/

easy solution: v.to.rast where="<attribute_column> is not null"

or the new PR #173
https://github.com/OSGeo/grass/pull/173
if an attribute value is null, the corresponding vector features will not
be rasterized

Markus M

>
> Cheers,
> Vero
>
> El jue., 24 oct. 2019 a las 14:40, Daniel Victoria (<
daniel.victoria at gmail.com>) escribió:
>>
>> Hi list,
>>
>> I have a vector polygon map that I'm converting to raster. The attribute
column that I process has some empty rows (no data / null). When I run
v.to.rast, these empty rows become 0 (zero) on my resulting raster map.
>>
>> Shouldn't v.to.rast respect the empty attribute table and create null
values for those polygons?
>>
>> For now I'll use r.null to fix this problem. But what if 0 is a valid
value?
>>
>> Cheers
>> Daniel
>>
>> PS - Running Grass 7.6.1 on Ubuntu
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/grass-user
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20191031/9e6e0b9f/attachment.html>


More information about the grass-user mailing list