[GRASS-dev] GRASS 7: v.to.rast -d produces empty raster when used on areas

Hamish hamish_b at yahoo.com
Thu Mar 27 14:07:36 PDT 2014


Stefan wrote:
> Converting areas from vector to raster with the -d flag (dense lines)
> in GRASS 7 results in an empty raster map.
> Both on Windows and Linux.
> Is that because boundaries are not lines or would you consider
> it as a bug?

I think you are right, it is probably because boundaries are not lines. Or more specifically, in an area the centroid holds the category and attribute data, and the boundary is (typically) without category. (If a boundary is between two parcels of land, which farmer does the boundary belong to?)

So if you wish to work on boundaries you have to v.extract them, then add categories with v.category. If you do that typically you'd want to run v.type as well to turn them into lines.


It's probably worth a ticket in the trac system since in future others will try the same with type=area, just note that the thick raster line should probably be category 0 or so, not the adjoining area's cat number for the "who does it belong to?" reason above.


Hamish



More information about the grass-dev mailing list