GRASS logo

Note: This document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade, and read the current manual page.

NAME - Performs mass-preserving area interpolation.


vector, surface, interpolation, pycnophylactic interpolation

SYNOPSIS --help [-z] input=name [weight=name] [layer=string] [column=name] output=name [iterations=integer] [threshold=float] [memory=integer] [--overwrite] [--help] [--verbose] [--quiet] [--ui]


Use centroid z coordinates for approximation (3D vector maps only)
Allow output files to overwrite existing files
Print usage summary
Verbose module output
Quiet module output
Force launching GUI dialog


input=name [required]
Name of input vector point map
Or data source for direct OGR access
Name of optional weighing raster map
Name of input raster map
Layer number or name
Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
Default: 1
Name of attribute column with values to approximate
output=name [required]
Name for output raster map
Maximum number of iterations
Default: 100
Threshold for iterations
Default: 1e-8
Maximum memory to be used for raster output (in MB)
Default: 300

Table of contents

DESCRIPTION creates a raster surface from vector areas, preserving the value of the area attribute. For example, if the selected area attibute is the population count, the sum of all pixel values in a given area is equal to the area's population count.


The current region needs to be prepared with g.region, choosing a resolution such that the smallest area is covered by at least four pixels. The current region should be completely inside the bounding box of the vector.


Pycnophylactic interpolation of Voronoi triangles using annual precipitation in the North Carolina sample data

(see below for screenshots of the results)
# setting the region
g.region -p raster=elev_state_500m

# create Voronoi diagram based on meteorological stations
v.voronoi input=precip_30ynormals output=precip_annual

# List of attributes for the vector precip_annual -c precip_annual

# converts attributes to density, but rainfall is
# typically measured in mm which is the same for all cells in the
# same input area, thus:
# new column for area size and adjusted precipitation
v.db.addcolumn map=precip_annual \
     column="area double precision, prec_adj double precision" map=precip_annual column=area option=area units=meters

# Getting the size of the smallest area
v.db.univar precip_annual column=area

# The smallest area with some population is 1.20789e+08 square meters
# and with a resolution of 5000 meters covered by appr. four pixels
# (depending on the shape of the area). Adjust region for that:
g.region res=5000 -ap

# adjust precipitation values: multiply by area size, dived by pixel size
v.db.update map=precip_annual column=prec_adj \
     qcolumn="annual * area / 25000000"

# mass-preserving area interpolation input=precip_annual output=precip_annual_pycno column=prec_adj iterations=200

# rasterize Voronoi diagram for comparison precip_annual out=precip_annual_voronoi type=area use=attr attrcolumn=annual

# verify results
d.mon wx0
d.rast.leg precip_annual_voronoi
d.rast.leg precip_annual_pycno

Annual precipitation (30 years avg.) of North Carolina shown as Voronoi diagram based on meteorological stations (perspective view in NVIZ).
Smooth Pycnophylactic Interpolation of annual precipitation (30 years avg.) of North Carolina using the Voronoi diagram map based on meteorological stations (perspective view in NVIZ).


Tobler WR. 1979. Smooth Pycnophylactic Interpolation for Geographical Regions. Journal of the American Statistical Association, 74 (367): 519-530 (PDF).


Markus Metz


Available at: source code (history)

Latest change: Monday Jan 30 19:52:26 2023 in commit: cac8d9d848299297977d1315b7e90cc3f7698730

Note: This document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade, and read the current manual page.

Main index | Vector index | Topics index | Keywords index | Graphical index | Full index

© 2003-2023 GRASS Development Team, GRASS GIS 8.2.2dev Reference Manual