025] How to Perform Spatial Operations in Global Mapper | GIS Overlay Analysis Guide

Perform complex geometric calculations between vector layers to merge, subtract, and intersect spatial data.

This tutorial introduces the fundamental Spatial Operations tool in Global Mapper. You will learn how to set up workspaces for vector analysis, understand the differences between operations and predicates, and follow step-by-step practical examples for Intersection, Union, Difference, and Symmetric Difference workflows.

In this tutorial, we will explore how Spatial Operations work in Global Mapper.

These functions allow you to perform various geometric tasks such as merging shapes, subtracting one from another, finding intersection areas, or identifying elements contained within specific regions.

What Are Spatial Operations in GIS?

We will practice using the following file:

Attachment: Operation.zip (Verified and safe file for Global Mapper.)

Once you have downloaded the file, please open it in Global Mapper.

Setting Up the Workspace

Introduction to Global Mapper Spatial Operations and Practice File
figure 1 : Introduction to Global Mapper Spatial Operations and Practice File

Upon opening the file, you will see four layers in the Control Center: two Area layers, one Line layer, and one Point layer.

The Spatial Operations tool can be found in the top menu bar under Vector Analysis -> Spatial Operations...

Navigation to Vector Analysis - Spatial Operations menu
figure 2 : Navigation to Vector Analysis - Spatial Operations menu

Select "Spatial Operations..." to open the configuration window.

Overview of the Spatial Operations Dialog Window
figure 3 : Overview of the Spatial Operations Dialog Window

As shown in the dialog, there are four primary types of spatial operations:

  • Operations: Performs geometric calculations between layers.
  • Predicates: Used for searching or filtering features.
  • Transforms: Creates new geometries based on elements contained within layers.
  • Scripting: Executes advanced calculations using Spatial Scripts.

Note: While Operations and Predicates share similar logic, the key difference is that Operations adds the results to a new layer, whereas Predicates simply selects the features meeting the criteria.

Today, we will focus specifically on Operations.

Dropdown menu showing types of geometric operations
figure 4 : Dropdown menu showing types of geometric operations

Types of Spatial Operations:

Operation Best Use Case
Intersection Extract overlapping regions between layers
Union Merge multiple polygon datasets
Difference Remove overlapping areas from a layer
Symmetric Difference Keep only non-overlapping regions

Pro Tip: Handling Coordinate System Mismatches in Spatial Operations

One of the most common reasons a Spatial Operation fails or returns an empty layer is a mismatch in coordinate systems between Layer 1 and Layer 2. Even though Global Mapper automatically reprojects layers visually on the screen, the underlying geometric calculations work best when both datasets share the exact same native projection and datum.

Before running complex operations like Intersection or Difference, it is highly recommended to open the Control Center, right-click your secondary layer, and export it to match the projection of your primary layer. This simple step eliminates micro-shifting errors along polygon boundaries, ensuring that your output areas and intersection points are geometrically precise and perfectly aligned.

Advanced Use Case: Automating Multi-Layer Overlays

While we are manually selecting Layer 1 and Layer 2 in this guide, real-world GIS projects often require intersecting or unioning dozens of administrative boundaries at once. If you find yourself repeating these steps, navigating to the Scripting tab within this dialog is a game-changer. Global Mapper allows you to convert your current UI setup into a reusable Spatial Script, which can be batched to process hundreds of shapefiles automatically, bypassing manual menu clicks entirely.

Setting Operands and Results

  • Layer 1 & Layer 2: Select the primary and secondary layers for the calculation.
  • Areas, Lines, Points: Choose which feature types to include in the operation.
  • Only Selected Features: Activate this if you want to limit the operation to features currently selected on the map.
  • Results: Choose the feature type (Area, Line, or Point) for the output layer.

Handling Invalid Geometries

  • Halt Operation: Stops the process if an error is found (Recommended).
  • Skip Geometry: Ignores the faulty geometry and continues.
  • Use Anyway: Proceeds with the calculation without fixing the error.

Practical Examples

1. Intersection (Area)

Let's extract the overlapping area between Area01 and Area02 and save it as a new "Intersection" layer.

Configuration for Intersection operation between two area layers
figure 5 : Configuration for Intersection operation between two area layers

After setting the parameters and clicking Run:

Map view showing the newly created Intersection layer highlighting overlaps
figure 6 : Map view showing the newly created Intersection layer highlighting overlaps

By turning off other layers, you can clearly see that only the overlapping regions of Area01 and Area02 have been preserved.

Isolated view of the Intersection result layer
figure 7 : Isolated view of the Intersection result layer

2. Intersection (Point)

Next, let's generate points where the two areas intersect. In this case, there are four intersection points. To do this, select Points in the Results section.

Setting Results to Points for Intersection operation
figure 8 : Setting Results to Points for Intersection operation
Resulting points created at the boundaries where areas meet
Resulting points created at the boundaries where areas meet
figure 9 : Resulting points created at the boundaries where areas meet

3. Union

The Union operation collects all area elements from both layers and places them into a single result layer.

Configuration for the Union operation
figure 10 : Configuration for the Union operation

In the result, overlapping areas are treated as distinct features within the new layer.

Result of the Union operation showing merged layer contents
figure 11 : Result of the Union operation showing merged layer contents

4. Difference

The Difference operation subtracts Layer 2 from Layer 1. Let's remove the portion of the orange polygon that overlaps with the green polygon.

Configuration for the Difference operation (Green - Orange)
figure 12 : Configuration for the Difference operation (Green - Orange)

Result of Difference showing the green polygon with the overlap removed:

Result of Difference showing the green polygon with the overlap removed
figure 13 : Result of Difference showing the green polygon with the overlap removed

5. Symmetric Difference

This function deletes only the overlapping parts and keeps everything else from both layers.

Configuration for Symmetric Difference:

Configuration for Symmetric Difference
figure 14 : Configuration for Symmetric Difference

Final result of Symmetric Difference showing non-overlapping regions:

Final result of Symmetric Difference showing non-overlapping regions
figure 15 : Final result of Symmetric Difference showing non-overlapping regions

Conclusion

As you can see, Spatial Operations provide a fast and efficient way to perform geometric analysis in Global Mapper.

Now, try performing these Operations yourself using Line or Point layers. Experiment with changing the Result settings to see how the output varies.

This was just a quick look at how Global Mapper handles geometric calculations. In our next session, we will explore Predicates.


That's all for today!


Continue Learning
Explore complete tutorial collections for CityEngine and Global Mapper.

Comments

Popular posts from this blog

029] How to Split Polygon Areas with Intersecting Lines in Global Mapper

[008] How to Understand CGA Rule Structure in CityEngine (Beginner Guide)

046] How to Create Parallel Offset Lines in Global Mapper