If there is one distinction I wish every new GIS user understood in their first week, it is this one. Early in my career I watched a talented young analyst spend three days trying to calculate the area of forest from a vector layer that had been created from a raster classification, then wonder why the numbers looked strange. The software was fine. The analyst was fine. The data model was misunderstood.
In this guide I will walk you through vector and raster data the way I explain it to my own team: what each one is, how each one behaves, when to choose one over the other, and how to move between them without wrecking your results.

The Core Idea in Thirty Seconds
Every piece of spatial data in a GIS describes the real world in one of two ways:
- Vector data describes the world as discrete objects with clear boundaries: a building, a road, a country.
- Raster data describes the world as a continuous surface divided into a regular grid of cells: elevation, temperature, a satellite photograph.
Think of the difference between a drawing and a photograph. A drawing is made of lines and shapes you can individually select and edit. A photograph is made of tiny dots, each with a color, and there are no individual objects inside it, only a mosaic of pixels. Vector is the drawing. Raster is the photograph.
Vector Data Explained
Vector data stores features as geometry (the shape and location) plus attributes (the information about the feature). There are three fundamental geometry types:
- Points: a single coordinate pair. Wells, trees, schools, accident locations. A point has no length or area.
- Lines (polylines): an ordered series of points connected together. Roads, rivers, pipelines, power lines. A line has length but no area.
- Polygons: a closed shape made from a line that returns to its start. Lakes, parcels, municipalities, flood zones. A polygon has both perimeter and area.
Each feature is a row in an attribute table. A polygon layer of parcels might have columns for owner, land use and tax value. This is what makes vector data so powerful for queries: you can select every parcel zoned for industrial use and larger than one hectare in a single expression.
Strengths of vector data
- Crisp, precise boundaries that stay sharp at any zoom level.
- Rich attributes attached to every feature.
- Compact file size for most everyday datasets.
- Ideal for topology: understanding how features connect, touch or overlap.
- Perfect for cartography where clean lines and labels are needed.
Limitations of vector data
- Poor at representing continuous phenomena such as temperature or elevation, which don’t have natural edges.
- Complex overlay operations on very large datasets can be slow.
- Geometry errors (self-intersections, gaps, slivers) can quietly corrupt your analysis if you do not check for them.
Common vector formats
You will meet the Shapefile (old but ubiquitous), GeoPackage (modern and my usual recommendation), GeoJSON (the language of the web), KML (Google Earth) and the file geodatabase (Esri). We cover the differences in a separate guide, Shapefile vs. GeoJSON vs. GeoPackage.
Raster Data Explained
Raster data divides space into a grid of equally sized cells, also called pixels. Every cell holds a value that represents the phenomenon at that location: meters of elevation, degrees of temperature, a land cover class code, or a reflectance value from a satellite.

The key properties of any raster are:
- Resolution (cell size): the ground distance covered by one cell. A 10-meter raster means each pixel represents a 10 by 10 meter square. Smaller cells mean finer detail and much larger files.
- Extent: the rectangular area the raster covers.
- Bands: a raster can hold one layer of values (a single band, such as elevation) or several (a satellite image with red, green, blue and infrared bands).
- Data type: integer values for categories, floating-point for continuous measurements.
- NoData value: a special number that marks cells with no information, which you must handle carefully in any calculation.
Strengths of raster data
- The natural choice for continuous surfaces: elevation, slope, rainfall, pollution concentration.
- Perfect for imagery: satellite, aerial and drone photographs.
- Very fast and simple mathematical operations thanks to the regular grid. This is called map algebra.
- Excellent for modeling and suitability analysis, where several surfaces are combined.
Limitations of raster data
- File size grows fast as resolution increases. Halving the cell size multiplies the cell count by four.
- Boundaries look jagged or pixelated when you zoom in.
- Attributes are limited to the cell value, which makes complex descriptions harder.
- Features are not individual objects, so you can’t directly ask which building a pixel belongs to.
Common raster formats
GeoTIFF is the workhorse, and the one I recommend for nearly everything. You will also see JPEG2000, IMG, NetCDF and Cloud Optimized GeoTIFF (COG), which is increasingly important for web and cloud workflows.
Side-by-Side Comparison
| Aspect | Vector | Raster |
|---|---|---|
| Model of the world | Discrete objects | Continuous grid of cells |
| Building blocks | Points, lines, polygons | Pixels with values |
| Best for | Boundaries, networks, assets | Surfaces, imagery, gradients |
| Attributes | Many columns per feature | One value per cell per band |
| Appearance when zoomed | Stays sharp | Becomes pixelated |
| File size | Usually small | Can be very large |
| Typical analysis | Overlay, buffer, network, query | Map algebra, terrain, classification |
| Typical formats | GeoPackage, Shapefile, GeoJSON | GeoTIFF, COG, NetCDF |
How to Choose: My Rules of Thumb
After decades of choosing between the two, I have settled on a few simple questions.
- Does the thing have a clear edge? A building does. Soil moisture does not. Edges point to vector; gradients point to raster.
- Do I need to describe each object in detail? If each feature needs a name, an owner, a history, use vector.
- Is it a photograph or a measured surface? Imagery and surfaces are raster by nature.
- Will I do arithmetic across the whole area? Combining slope, rainfall and soil to find suitable land is raster work.
- Is the final product a clean, labeled map? You will likely end up with vector layers on top of a raster background.
And remember: you rarely have to choose only one. Most real projects use both. A typical flood study uses a raster elevation model to simulate water, then vector layers of buildings and roads to count what is affected.
Converting Between Vector and Raster
Conversion is common, but it is never free. Information is always lost or simplified.
Vector to raster (rasterization)
You burn polygons, lines or points into a grid, assigning each cell the value of the feature it overlaps. You must choose a cell size. Too coarse and small features vanish. Too fine and your file explodes. A good habit: pick a cell size smaller than the smallest feature you care about.
Raster to vector (vectorization)
You group neighboring cells of equal value into polygons, or trace lines from a raster. The result often has stair-stepped edges that mirror the grid, and it can produce millions of tiny polygons if the raster is noisy. Always clean and simplify afterward.
A cautionary tale
Remember my young analyst? He had vectorized a land cover raster, then measured area on the stair-stepped polygons using a poorly chosen projection. Two sources of error, one confused afternoon. The lesson: measure area from the original data model whenever you can, and in an equal-area projection.
Real-World Examples
- Urban planning: vector parcels and zoning, plus a raster elevation model to check where building is feasible.
- Agriculture: a raster vegetation index from satellite, summarized per vector field boundary to see how each farm performs.
- Hydrology: raster terrain to calculate flow direction, vector streams as the output.
- Emergency response: raster flood depth surfaces clipped against vector buildings to estimate damage.
- Environment: raster land cover change over twenty years, with vector protected area boundaries to measure encroachment.
Mistakes to Avoid
- Using vector for continuous data. Drawing contour polygons is not the same as having a real surface.
- Ignoring resolution. Mixing a 30-meter raster with 1-meter building footprints leads to false precision.
- Forgetting the NoData value. It can silently ruin averages and statistics.
- Converting back and forth repeatedly. Each conversion degrades quality. Plan your workflow so you convert once.
- Choosing a format out of habit. Pick the format that fits the job, not the one you used last time.
Final Thoughts
Once you truly feel the difference between vector and raster, a lot of GIS suddenly makes sense: why some tools exist only for one type, why some analyses are fast and others slow, why a map looks crisp or blocky. Treat this as foundational knowledge.
If you’re just starting out, spend an afternoon opening one vector layer and one raster layer side by side in QGIS. Zoom in until the raster pixels appear, open the vector attribute table, and play. That hands-on moment teaches more than any definition.
Where to go next: read Coordinate Reference Systems (CRS) Explained Simply, because both vector and raster only make sense once you understand how they are placed on the Earth.



