Spatial data can be represented in vector or raster form. The vector spatial data model is coordinate-based and represents geographic features as points, lines, and polygons. The raster spatial data model is pixel-based and represents geographic phenomena as an organized matrix of cells. Each model possesses advantages, disadvantages, and tradeoffs in how data can be manipulated, analyzed, and rendered. As a result, GIS professionals often need to work between data models to achieve their analytical goals. Vector-to-raster and raster-to-vector conversions are fundamental spatial data manipulation processes used to transform one model of spatial data representation into the other to extend the utility of a spatial dataset. Vector-to-raster conversion, also known as rasterization, is the process of converting vector points, lines, and polygons into a surface of gridded cells or pixels. Advanced rasterization techniques, such as spatial interpolation and density mapping, can be used to predict raster surfaces at unsampled locations based on known values of nearby vector spatial data inputs. Raster-to-vector conversion, also known as vectorization, is the process of converting gridded cell- or pixel-based data into vector points, lines, and polygons. While powerful, these conversion processes also have implications for geographic accuracy and potential feature loss.
Nelson, J. (2024). Vector-to-Raster and Raster-to-Vector Conversions. The Geographic Information Science & Technology Body of Knowledge (2024 Edition), John P. Wilson (Ed.). DOI: 10.22224/gistbok/2024.1.7
Spatial data can be represented in vector or raster form, each possessing advantages, disadvantages, and tradeoffs in how data can be manipulated, analyzed, and rendered. Vector data are stored as coordinate pairs whereas raster data are stored in pixels. The vector-raster discussion (and debate) in Geographic Information Science is comprehensive and dates to at least the 1980s (e.g., Peuquet 1984; Gahegan & Roberts, 1988; Goodchild 1989). The merits of space bounding versus space filling representations and their respective object- versus field-based concepts have been analyzed in detail for different types of geographic phenomena, spatial scales, and analytical use cases (Couclelis 2005).
Vector representations are useful for encoding
Given that vector and raster data models each support the representation of different spatial data types and subsequently different analyses and use cases, GIS professionals often need to work between data models to achieve their analytical goals. Vector-to-raster and raster-to-vector conversions are fundamental spatial data manipulation processes that enable GIS professionals to transform one model of spatial data representation into the other to extend the utility of a spatial dataset. For example, a vector-to-raster conversion might be used to transform
Vector-to-raster conversion — also known as
At the simplest, most fundamental level a vector data point representing one geographic feature (e.g., a single tree) can be converted into a single raster cell. The value associated with that raster cell could be the height of the tree, its age, etc. The process of converting vector points to raster assumes that raster cells will be assigned the value of the point found within the cell. Raster cells may also be given a value of 0 or 1 to delineate the presence (or not) of a point feature. Cells that do not contain any points will be assigned a no data value. One issue that can arise is when more than one point is contained within a single raster cell, in which case the cell is typically assigned the most frequent attribute value found across all point features within that cell. If a common attribute does not exist, the cell is typically assigned the value of the feature with the lowest feature identification number. In either scenario, attribute values of any other data point(s) found within the cell are disregarded. Some GIS software allows users to specify cell assignment based on the most frequent attribute value found across all point features found within a single cell or based on summary statistics, such as the sum, mean, standard deviation, maximum, minimum, range, or count of attribute values for all points within each cell. If maintaining the distinct number of features during the conversion process is essential, users can specify a higher spatial resolution (i.e., smaller cell size) to ensure that a single raster cell does not contain more than one point.
A vector line representing a linear geographic feature (e.g., street segment) can be converted into a series of adjacent raster cells. The value associated with these raster cells could be a numeric road type classification, total traffic volume, etc (Fig. 2). The process of converting vector lines to raster typically assumes that raster cells will be assigned the attribute value of the line that intersects each cell. Alternatively, raster cells may be given a value of 0 or 1 to delineate the presence (or not) of a linear feature. Cells that do not intersect any line features will be assigned a no data value. To address cases in which more than one linear feature intersects a given raster cell, some GIS software allows users to specify cell assignment based on the feature with the longest maximum length. However, if maintaining the distinct number of features during the conversion process is important, users can specify a higher spatial resolution to ensure that a single raster cell does not reflect more than one linear feature.
A vector polygon representing an areal geographic feature (e.g., building footprint) can be converted into a cluster of raster cells with associated values that could delineate building age, capacity, etc. Raster cells typically inherit the attribute value of the polygon found at the center of each cell but assignment can also be designated based on partial or majority containment of the polygon(s) within a given raster cell. Raster cells may also be given a value of 0 or 1 to delineate the presence (or not) of an areal feature. Cells that do not meet the criteria for polygon value assignment are given a no data value.
More advanced vector-to-raster conversions typically involve spatial interpolation techniques that are used for estimating raster cell values from primarily vector points (Meng et al., 2013). While not a necessary step in the process, these interpolated raster surfaces can be symbolized as
Table 1: Characteristics of five common point-to-raster interpolation techniques: Inverse Distance Weighting (IDW), Natural Neighbor, Spline, Polynomial, and Kriging.
Interpolation Technique | Classification | Form | Conceptual Overview | Advantages | Disadvantages |
---|---|---|---|---|---|
Inverse Distance Weighting (IDW) | deterministic | local or global (if all input data points are specified in neighborhood designation) | estimates a raster value using a weighted average of the values of nearby input spatial data; points closer to the raster cell value being predicted provide greater influence than the values of points further away | intuitive to implement and works well for homogenous, widely distributed data | potential to over-smooth surface output and generates artificates in areas possessing high spatial variability |
Natural Neighbor (Sibon 1981) | deterministic | local | estimates a raster cell value by finding a close subset of input spatial data, generating a Voronoi tessellation, and applying weights to nearby values based on proportionate areas | computationally efficient and capable of modeing complex spatial relationships | potential to introduce over- and under-fitting issues when input data are sparse or poorly represent the geographic phenomenon being measured |
Spline | deterministic | global or local | estimates a raster cell value by fitting a methematical function to the input spatial data points that a) minimizes overall surface curvature and b) directly passes through the input data points | works well with input data possessing high spatial variability and complex spatial patterns | potential to introduce over- and under-fitting issues when input data are sparse or poorly represent the geographic phenomenon being measured |
Polynomial | deterministic | global or local | estimates a raster cell value by fitting one polygonial mathematical functoin to the entire dataset (global approach) or many polynomials to specified neighborhood designations (local approach) | works well for fitting surfaces that vary slowly over space and performing trend surface analysis to assess long-range geographic patterns and processes | sensitive to outlier values and neighborhood distance thresholds |
Kriging (Matheron 1963; Oliver & Webster, 1990) | geostatistical | global or local | predicts a raster cell value by creating variograms and covariance functions to estimate the spatial autocorrelation of the input data points; spatial weights are based on a combination of the overall spatial arrangement of the measured points and the distance between the measured points and the prediction location | capable of modeling complex, highly variable spatial relationships when spatial autocorrelation exists in input dataset | computationally intensive if input dataset is large and densely distributed |
Areal interpolation techniques have also been developed to transform spatial data from areas with known values (i.e., source zones) into new areas with unknown values (i.e, target zones) (Lam 1983; see also Areal Interpolation). Areal interpolation enables GIS professionals to harmonize spatial data that has been aggregated at many different levels (e.g., census units) and make predictions about geographic phenomena (e.g., population totals, cancer rates, etc.) across different levels of aggregation (Fig. 3). One example of areal interpolation is the pycnophylactic technique, which can be used to convert vector polygons to raster surfaces using an iterative, local neighborhood approach that maximizes smooth renderings while preserving source zone volumes (Tobler 1979). Pycnophylactic interpolation can output intuitive and aesthetically-pleasing raster surfaces known as isopleth maps, however assumes that no sharp or irrelevant boundaries (e.g. river, mountain range, etc.) exist in the target zones.
In addition to interpolation techniques, density tools can also be used to convert vector points or lines into raster surfaces or
Raster-to-vector conversion — also known as
A raster surface such as a digital elevation model (DEM) can be converted into vector points, possessing an attribute table containing geographic location, and in this case, elevation information. The location of each point reflects the centroid of each raster cell for which a data value exists. Cells containing no data values will not be converted into points.
Raster surfaces can also be converted into lines. For example, raster representations of stream flow derived from hydrological modeling could be converted into vector stream network centerlines to then generate attributes on stream length, flow magnitude, etc. The
Lastly, raster surfaces can be converted into polygons. A raster surface representing land cover classification, for example, could be converted into vector polygons to enable GIS professionals to analyze areal coverage of different land type designations and/or spatially join other attributes, such as population density or weather factors to enrich understanding of anthropogenic and natural factors across the landscape. Similar to the raster-to-line conversion process, the quality of the boundaries of the output vector polygons also depends on the resolution of the input raster. Figure 5 illustrates the significance of raster resolution on the vector polygon outputs. The boundaries of the vector polygon output may look like a staircase if the input raster resolution is low. GIS software provides conversion parameters and post-processing tools for simplifying polygon boundaries, as well as supports the creation of multipart features.
Convert between vector and raster forms of spatial data representation using common GIS software and tools
Detail the step-by-step processes of vector-to-raster and raster-to-vector conversion
Illustrate the impact of the vector-to-raster and raster-to-vector conversion processes on the geographic accuracy of the phenomenon being represented.
Describe reasons for converting between vector and raster forms of spatial data representation
Evaluate the benefits and limitations of converting between vector and raster forms of spatial data representation
Describe, compare, and contrast spatial interpolation and density techniques used to create estimated raster surfaces from vector data