Grid lines created with the type=line option will be identical to the edges of each grid cell, like boundaries with the default type=area option.
The resultant grid can be rotated around the origin (center of the grid) with the angle option.
Optionally hexagons can be created with the -h flag. Hexagons are by default symmetric. Asymmetric hexagons can be allowed with the -a flag.
This module is NOT to be used to generate a vector map of USGS quadrangles, because USGS quads are not exact rectangles.
# set the region: g.region n=90 s=-90 w=-180 e=180 res=10 -p projection: 3 (Latitude-Longitude) zone: 0 datum: wgs84 ellipsoid: wgs84 north: 90N south: 90S west: 180W east: 180E nsres: 10 ewres: 10 rows: 18 cols: 36 cells: 648 # create 10 degree size grid: v.mkgrid map=grid_10deg # create 20 degree size grid: v.mkgrid map=grid_20deg box=20,20
v.mkgrid map=coro_grid grid=4,3 position=coor coordinates=2716500,6447000 box=20000,20000
v.mkgrid map=p2min_grid grid=10,12 position=coor coordinates=167:52E,47:06S box=0:02,0:02
g.region raster=elevation res=1000 -pa v.mkgrid type=point map=pointpattern
# create first set of points, covering extent of "elevation" raster map g.region raster=elevation res=1000 -pa v.mkgrid type=point map=pointpattern1 # shift grid by half point distance (map units) g.region n=n+500 w=w+500 e=e+500 s=s+500 -p # create second set of points v.mkgrid type=point map=pointpattern2 # merge into final point pattern v.patch input=pointpattern1,pointpattern2 output=pointpattern3
g.region raster=elevation res=5000 -pa v.mkgrid map=hexagons -h d.grid 5000
Update for new vectors Radim Blazek 10/2004
Last changed: $Date: 2014-12-28 00:21:19 +0100 (Sun, 28 Dec 2014) $