On 31/10/2019 22:20, Markus Metz wrote:


On Tue, Oct 29, 2019 at 7:40 PM Veronica Andreo <veroand...@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
if an attribute value is null, the corresponding vector features will not be rasterized

Markus M


I'm not sure I agree with the approach that a polygon with missing attribute should become NULL. In my view, NULL should be used only for pixels not covered at all by any polygon.

Perhaps an additional input parameter "missing_attribute" so the user can choose a value to enter into the raster if the attribute is missing. If no parameter is supplied, and the chosen attribute column has missing values, I'd prefer that the script exit gracefully, with a message that a "missing_attribute" value is required.



>
> Cheers,
> Vero
>
> El jue., 24 oct. 2019 a las 14:40, Daniel Victoria (<daniel.victo...@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@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/grass-user
>
> _______________________________________________
> grass-user mailing list
> grass-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user
-- 
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to