Dan Rushton

Raster vs Vector Maps: What's the Difference & Which are Best?

Raster is faster but vector is corrector!

Have you ever heard that phrase when debating whether to use raster or vector data for visualizing layers (e.g. demographics, financial, human mobility) or real world features (e.g. houses, roads, trees, rivers) within Spatial Data Science? Aside from the imperfect English, is vector indeed corrector?

In this post we take a look at the key differences between these two types of spatial data and discuss when it is appropriate to use one or the other. First though, let’s define exactly what we mean when referring to spatial data as either raster or vector.

Raster Data

Raster data is made up as a matrix of pixels, also referred to as cells in much the same way as you might find when working within a spreadsheet. They are often square and regularly spaced but don’t have to be. Think of walking over a field divided into a grid of squares with each square representing a value which can be discrete (e.g. soil type) or continuous (e.g. elevation).

Graphical representation of raster data


Raster data can be added as a basemap within the CARTO platform which by default uses vector graphics for map rendering.

Vector Data

Rather than working with a matrix of cells, vector data stores basic geometries (made up of one or more interconnected vertices), with three key types:

  • Points - single vertex, e.g. a house.
  • Lines - two or more vertices where the first and last vertex are not equal, e.g. a road.
  • Polygons - three or more vertices with the last vertex equal to the first, e.g. a boundary.
Graphical representation of vector data


Below we can see vector data (specifically polygons representing the evolution of Manhattan’s building footprints over time) within a map created using CARTO VL.

Vector data is fully supported across the CARTO platform since Location Intelligence relies on the ability to analyze and visualize data in such a format.

Want to try for yourself?

Sign up for a free account

Advantages & Disadvantages

Advantages Disadvantages
Raster

Map Algebra with raster data is usually quick and easy to perform

Some specific use cases can only be achieved with raster data (e.g. modeling water flow over the land surface)

Linear features and paths are difficult to display

Subject to a pixelated look and feel

Datasets can become very large because they record values for each cell

Vector

Graphical output is generally more aesthetically-pleasing

Higher geographic accuracy because data isn't dependent on grid size

Continuous data is poorly stored and displayed

Needs a lot of work and maintenance to ensure that it is accurate and reliable

Use Cases

When working with raster or vector data within the sphere of spatial analysis there are of course a myriad of use cases that can be employed but as has been touched upon already there are specific cases where it can make sense to use one over another.

For example due to the nature of its collection, raster is often the only choice when working with remote sensing data captured by cameras on planes or satellites. The spatial resolution of such data will be determined by the capabilities of the sensor used to take an image which is why it can be subject to a pixelated look when using a low resolution.

The image below, which could be mistaken for a vector data layer, is a satellite image of agricultural land in Haskell County, Kansas.

Satellite image of Haskell County, Kansas


The power of vector data becomes evident when we start to move from simply asking where something occurs to why. This is true spatial analysis and allows us to gain deeper insights from the data as GIS evolves to Spatial Data Science. Some questions that can be answered leveraging vector data include:

Which is Best?

As we’ve seen there are distinct use cases for using either raster or vector data. Many will make impassioned arguments extolling the virtues of one or the other but thankfully since raster can be converted to vector and vice versa there is no need to choose one exclusively.

About the author
Dan Rushton

Dan is the Content Marketing Manager at CARTO. Dan holds a Masters in Electronic Engineering with business experience in development, sales, training and marketing. Prior to joining CARTO, Dan was a Senior Product Marketing Manager at Apple.

More posts from Dan Rushton

Related Posts

Ready to optimize your territories with Location Intelligence?

Close circle icon

Contact us

Please fill out the below form and we'll be in touch real soon.