[GRASS-dev] Creating a single hexagon raster mask

Nikos Alexandris nik at nikosalexandris.net
Thu Apr 12 03:00:52 PDT 2018


I am trying to create a single hexagon raster mask. The only possible
way, currently, seems to be `v.mkgrid -h`, and then a rasterisation.

Using `v.mkgrid -h map=hexagon grid=1,1 --o`, I always get the "ERROR:
Please use a higher resolution or a larger region".

I have tried to do as the message recommends, but it does not work. Not
when increasing the resolution, nor when increasing the region.

I checked the code that tests for this in `main.c`:

```
	if (grid_info.east - grid_info.west < 3.5 * grid_info.crad) {
	    G_fatal_error(_("Please use a higher resolution or a larger region"));
	}
	if (grid_info.north - grid_info.south < 3 * grid_info.rstep) {
	    G_fatal_error(_("Please use a higher resolution or a larger region"));
	}
```

I guess it takes some time to understand the reasoning behind these
tests. Is it really not possible to create a single hexagon, that
touches upon the edges of the computational region?

Nikos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20180412/54c9674b/attachment.sig>


More information about the grass-dev mailing list