Vector and Raster Data
🎯 Introduction
By the end of this article, you will be able to decide whether a GIS object should be represented as vector or raster data and understand how the two differ in queries and analysis.
📍 Vector Data: One Record per Object
Vector data uses coordinates to describe objects with distinct boundaries or identities. A Point represents a location, such as a bus stop; a LineString represents an ordered path, such as a road or bus route; and a Polygon represents an enclosed area, such as a park or administrative region.
In addition to geometry—the coordinates and shape of an object—a vector object can have attributes such as a stop name, road classification, or park type. Each object has its own identity, making vector data suitable for selection, editing, attribute filtering, and evaluating relationships between objects.
You typically need vector data when users want to select an object, inspect its attributes, modify its boundary, or determine its relationship to other objects.
🟦 Raster Data: Values in a Grid
Raster data divides space into a regular grid. Each pixel or cell stores one or more values. The red, green, and blue channels in remote sensing imagery are called bands. Temperature, rainfall, and elevation can also be represented as rasters.
Resolution describes the ground area covered by a cell. A resolution of 10 meters means each cell covers approximately 10 by 10 meters. It does not guarantee that elevation or position is accurate to 10 meters.
NoData indicates that there is no valid observation. For example, an area may lie beyond an image’s coverage, or an elevation cell may have no recorded value. Treating NoData as 0 changes statistical results.
Distinguishing NoData keeps statistics reliable: when calculating mean temperature, maximum elevation, or area, missing cells should be excluded or marked separately instead of silently becoming valid zeros.
⚖️ Choosing a Data Model
| Requirement | Common choice | Reason |
|---|---|---|
| Click a location to inspect attributes | Vector points | Each object has its own identity |
| Display roads or boundaries | Vector lines and polygons | Paths and boundaries can be queried |
| Display variations in temperature or elevation | Raster | Each location has a value |
| Display remote sensing imagery | Multiband raster | Bands combine to produce image colors |
Both models can cover the same area: imagery can provide the background, vector polygons can represent park boundaries, and points can mark bus stops.
Choosing the right model makes later operations possible: retain vectors for object selection and editing, and retain rasters to read continuous values across locations.
🧾 Summary
- Vectors describe distinct objects; rasters describe regular grids.
- Point, LineString, and Polygon represent points, lines, and enclosed areas.
- Cells store values, and resolution describes their ground coverage.
- Bands and NoData affect imagery display and statistics.
❓ Knowledge Check
Q1: Does higher raster resolution always mean greater accuracy?
No. Smaller cells provide finer detail, but actual accuracy also depends on the acquisition equipment and processing workflow.
Q2: Must a park always be represented as a Polygon?
A Polygon is usually appropriate for boundaries and spatial relationships. A point can serve as a location marker when only an approximate position is needed.
🧪 Exercise
Choose a data model for “river course,” “land surface temperature,” “bus stop locations,” and “satellite imagery.” Identify one key attribute or value for each.
// Write your code here
🎉 You now know the basics of choosing vector or raster data!
