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.
This behavior is of course not problematic, but it might confuse users.
Cheers
Stefan
-----Original Message-----
From: Hamish [mailto:hamish_b@yahoo.com]
Sent: 27. mars 2014 22:08
To: Blumentrath, Stefan; GRASS developers list (grass-dev@lists.osgeo.org)
Subject: Re: [GRASS-dev] GRASS 7: v.to.rast -d produces empty raster when used on areas
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.