Hi Hamish by "boundaries" I actually meant physical entities that act as movement blockers in a model, such as broad rivers, chasms, etc., not the GRASS geometry type "boundary".
r.grow adds too many cells for my purpose v.to.rast gives me stepped lines, which is why I wrote the little mapcalc filter. A better solution would probably be to add proper anti-aliasing to the API, G_bresenham_line_AA() or whatever and then add an AA option to v.to.rast. But I have no time to spend on that at the moment, especially since I wouldn't know if there are any applications beyond what I needed it for. If there is general interest in anti-aliased rasterization, it would be worth a thought. We would need to discuss how to do it properly in a GIS context, though. Ben ----- Original Message ----- From: "Hamish" <hamis...@yahoo.com> To: "grass-user" <grass-user@lists.osgeo.org>, "Benjamin Ducke" <benjamin.du...@oxfordarch.co.uk> Sent: Tuesday, September 29, 2009 2:49:17 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: Re: [GRASS-user] New modules in add-ons: v.in.geoplot, r.xtent + r.burn.frict Ben wrote: > r.carve actually "carves" rivers into a DEM, subtracting > their depths from the DEM. > > r.burn.frict does essentially the same job as v.to.rast > would, except it performs some anti-aliasing on line edges, > so there is no case like this: > > 0100 > 0010 > 0001 > > where a cost surface algorithm that scans for 8 directions > could "slip" diagonally through the cells that represent a > boundary line. > Instead, the line would be rasterized like this: > > 0100 > 0110 > 0011 > > This is (only?) useful for rasterizing lines onto friction > surfaces. It's really just a primitive little script that I > wrote because I needed it for territorial modeling with > r.xtent which involves cost surfaces. if a module does its job well, then great. congrats. but FYI a couple other ways to accomplish the same thing if it helps. (not sure it will, once done r.mapcalc is pretty hard to beat) - r.grow[.distance] - v.type boundary,line or v.cat add to boundaries -> v.to.rast (see man page) - not G_bresenham_line() but ...? Hamish ------ Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information. _______________________________________________ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user