[GRASS-user] hexagon rasters

Markus Neteler neteler at osgeo.org
Wed Feb 9 12:52:07 PST 2022


Hi Ken,

On Tue, Feb 8, 2022 at 4:44 AM Ken Mankoff <mankoff at gmail.com> wrote:
>
> Hello List,
>
> I'm interested in working with hexagonal rasters. I know I can make hexagon vectors with "v.mkgrid -h",
> but is there any way to then work with these in raster space? I'd like to use r.walk and r.cost to estimate
> costs to move around the hex grid.

I am sure you considered v.to.rast?

# North Carolina sample dataset
g.region raster=elevation res=5000 -pa

# create vector hexagons
v.mkgrid map=hexagons -h
v.info -c hexagons

# convert to raster model, requires the resolution to be increased
(example: 5000m -> 250m)
g.region res=250 -p
v.to.rast input=hexagons output=hexagons use=cat

# viz
d.rast hexagons
d.vect hexagons type=boundary

Now you may turn them into cost surfaces.

Best,
Markus


More information about the grass-user mailing list