Takeaway

In this piece, we go in-depth about the different types of map layers and which one you should pick depending on the use-case. So, if you are confused about when should you use a heatmap vs when you should use a grid-based layer, read on !

Introduction

Layers are mechanisms used to display geographic datasets on maps. They contain groups of points, lines, or area (polygon) features and define how a geographic dataset is symbolized on a map.

In layman terms, layer refers to the visualization of something on a map. For example, a layer of points might be used for finding the start point of all Uber trips in San Francisco or a layer of arcs can be used to show all trips made by British Airways in a day.

Map layer forms the fundamental unit while doing analysis on maps. Not only it makes data expression clearer and intuitive but makes the overlay of geographic data possible. Visualizing and seeing the distribution of data in each region makes it easier to mine for deeper and specific information and make better decisions.

Why do we need Map Layers?

1. Adds context to your maps

Layers make maps more contextual and help you focus on specific aspects like assets, roads, and points of interest. Map layers make it easier for you to work on a specific set of objects in your map. For example, using map layers you could pin-point and evaluate only a handful of points or building in an area for your case.

2. Helps you detect change faster

Maps are after representation of what is happening on the ground. With a map layer, you see how various measures and metrics are changing over time. For example, the commercial property team in an insurance company could use it to track the household/property owners who are making modifications to their properties or in different cases, geographic scientists use it to study changes in land cover.

Types of Map Layers

We have classified the map layers based on the number of features they render:

Point

The point layer draws points for a given event or object based on its location coordinates: longitude and latitude. Point layers are specially used for displaying data with a wide distribution of geographic information & help you be precise and rapidly position your point events on a map.

Some attributes of the point layer are as follows:

  • Colour: Colour of the point layer can depict the numerical value
  • Fill: Fill usually denotes the intensity of the activity
  • Radius: Radius shows the area that an event or an object covers in a map
  • Icons: Icon differentiates between points using shapes.

When to use:
Point maps are useful for events that have a timestamp like website traffic over a particular region. Points are a good choice for pin-pointing locations or points of interest on a map. For example, to analyze the starting point of all Uber rides in New York. Point maps can be used to detect and track events like accidents on roads.

Arc

The arc layer draws an arc between two points. Arcs are useful for visualizing the distance between the two points as well as comparing the distance between two locations on a map. Arcs don’t show the routes between points but just the distance between those two points.

Arcs maps usually are used to visualize origin-destination flow data. Arcs usually denote the direction and intensity of flow interaction between origin and destination.

The attributes of the arc layer are as follows:

  • Color: Color of the arc layer can depict a particular event (starting point, ending point)
  • Opacity/Stroke Width: These two can be used to show the intensity of the flow interaction.

When to use:
Since the arc layer involves two points and draws an arc depicting the straight-line distance between them, it is useful in situations where we need to demonstrate the to-from movement of an object from point A to point B.

For example, arc layers can be used to depict all bus rides to various points in a city from a particular bus-stand. Also, they can be used by food-delivery companies to track the number of deliveries from a particular restaurant. Some other examples where such map layers can be used for analysis are population migration and aviation routes.

Lines

Lines are basically the 2D version of arc layers. Both draw lines to represent the distance between two points on a map but in case of lines, the lines lay flat on the map. The attributes of maps are:

  • Color: Color inline maps represents a particular event or object under observation or analysis.
  • Stroke: This refers to the intensity of the flow.

When to use:
Lines are useful for cases that involve route distribution and hence can be useful for businesses that transport goods from point A to point B. Logistics or supply chain companies can be a good example. Also, line maps can show the intensity of traffic along a specific road and hence, also finds its use for mobility analysis.

Heatmap

Source

Heatmap is a way to indicate the weight of each point in the geographical range. It can be used to show the distribution or the variation of density of any phenomenon across a geographical area.

One drawback of heatmaps is that they just give you a visual representation of the data on maps and hence don’t quantify areas. Hence it becomes difficult to pinpoint areas where there is an absence of a phenomenon. In layman terms, heatmap gives you an abstract visualization of the scenario in maps. The color indicates the percentage of intensity of an event on a particular spot.

When to use:
As mentioned, heatmaps can be used for visualizing the intensity of occurrence of a phenomenon (pandemic/drought) where established boundaries and borders are not of much importance.

For example, suppose we are representing the air pollution level in a particular place. The darker color represents more concentration of harmful particles and hence depicts that air pollution is worse there. It can also be used to show the vegetation spread or the steepness of terrain in a particular region.

Read more about heatmaps and why we don’t prefer using heatmaps for geospatial analysis here :

Making Location-Based Experimentation a part of our DNA
What can we learn about experiments on the ground from web-based experimentation?

Polygon

Polygon layer is used to represent the boundaries of lakes, cities, or even forests. Polygon maps bring fine granularity to maps and hence are much helpful for area-wise or city-wise analysis. Usually, polygon maps are useful for looking into a particular neighborhood or area. In polygon maps, each area is shaded according to a prearranged key, each shading or key representing a range of values .

Source

When to use:
Polygon maps are best used to show the distribution of some features in different regions. For mapping the number of tax-payers in a particular region or to show the sales figure in a particular city. It can also be used to depict employment/unemployment levels in a particular area.

Hexabin

Hexabin aggregates points (or lat-longs) into hexagons. So, the color or the height shows the number of events or intensity of that particular hexbin. At Locale, we are a big fan of hexagons. Wait, why hexagons? This blog explains why:

Spatial Modelling Tidbits: Hexbins vs Geohashes?
Why we at Locale.ai are fond of hexagonal grids?

A type of hexagon layer is actually H3 which visualizes spatial data using Hexagonal Hierarchical Spatial Index. Open-sourced by Uber, H3 uses hexagons since hexagons reduce quantization error which appears when objects move through a geographic area. Read more about how Uber uses the H3 layer to analyze rides and pricing here

H3: Tiling the Earth with Hexagons
Uber Engineering’s Joseph Gilley discusses how we leverage hexagons for geospatial indexing to better regulate our marketplace of riders and drivers, as well...

The attributes of hexagon maps are:

  • Color: Colors, in this case, are just like point colors showing the numerical value.
  • Height: This also shows the numerical value (which means, the greater the height, the larger the value). However, they can even be used to show another metric as well.

When to use:
Hexabins can be used to show distribution along with a 2D space also. For example, tweets by users having a particular keyword or hashtag can be mapped for a particular region along both the axes with X-axis representing latitudes and Y-axis representing longitudes.

Hexagons are also used when the analysis has to be done at a fine granularity. For example, voter turnout in a particular region or measuring the density of the type of population present in a particular area. Uber also uses H3 to decide the surge pricing for a particular area depending on the demand-supply of drivers and riders in the adjacent regions.

Geohashes

Geohash is basically a hierarchical data structure that transforms a 2D spatial point (lat & long) into a short string of numbers and alphabets. They divide the earth into a grid of 32 cells with 4 rows and 8 columns. The beauty of geohash is in how it is constructed. In simple terms, geohash is a type of grid spatial index, where the world is recursively divided into smaller and smaller grids with each additional bit

S2 layer is actually a type of geohash which represents geospatial data on a three-dimensional sphere. Openosourced by Google, S2 layer makes it possible to build a worldwide geographic database with no streams or singularities using a single coordinate system and with low distortion .

The S2 layer is useful for spatial indexing and for approximate regions as a collection of cells. It is useful in places where you show the structure of buildings or the density of the human population. It is interesting to note that S2 is basically a dynamic form of point map where the values/intensity of the events changes with respect to time. The S2 layer makes use of a very clever construct called the Hilbert curve which is basically a curve that occupies space, covering all areas within that space. One reason which sets S2 apart is that it has the ability to approximate arbitrary regions as a collection of discrete S2 cells. It is this feature that makes it easy to build large distributed spatial indexes.

Source

When to use:
A good use case of the S2 map layer is to track the increase of commercial housing over time or tracking real estate construction projects. It can also be used to find the illegal building which is constructed in a prohibited area or have a height greater than the permissible limit

Flow Maps

Flow maps are basically arc maps/layer varying with respect to time. They are used to visualize origin/destination flow data. The origin and destination can be points or surfaces. The width or color of the line/arc indicates the flow direction value between the origin and destination. Each spatial point is either a origin or destination.

When to use:
Flow maps a good choice for mapping and visualizing traffic flow, population migration, and also for fleet management for logistics companies.

Source

Similar Reads :

How analyzing supply-demand gaps can optimize your unit economics!
After all, we all need our own Google Maps.
Spatial Modelling Tidbits: Hexbins vs Geohashes?
Why we at Locale.ai are fond of hexagonal grids?

At Locale, we are a location analytics software for business and city teams to analyze ground operations. If you are a company with moving assets, we make sure you don’t lose money on them! If you want to get a demo, check our website out or get in touch with Aditi on LinkedIn or Twitter.