[GRASS-user] hexagon rasters
Ken Mankoff
mankoff at gmail.com
Wed Feb 9 16:16:34 PST 2022
Hi Markus,
Yes - that works but requires downstream hacks because of the different resolutions. Still, it is a workable solution I didn't think of. Thank you!
-k.
On 2022-02-09 at 12:52 -08, Markus Neteler <neteler at osgeo.org> wrote:
> 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