025] Global Mapper - Spatial Operations 01: Geometric Operations

Today, we will dive into Spatial Operations.


"Before we begin, if you missed the previous session, check it out here:"

[009] Visibility Frequency Analysis

[023] Global Mapper - How to Close Gaps Between Adjacent Features in Vector Layers


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.

We will practice using the following file:

Attachment: Operation.zip (This is a safe proprietary data file for Global Mapper.)

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



Setting Up the Workspace

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

Introduction to Global Mapper Spatial Operations and Practice File

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

Navigation to Vector Analysis - Spatial Operations menu

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

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

Types of Spatial Operations:

  • Intersection: Finds overlapping parts of two layers and creates a new layer from them.
  • Union: Merges all features from two layers into a single layer.
  • Union Single: Merges all features from the input layers into one single feature.
  • Difference: Calculates the parts of the first layer that do not overlap with the second layer.
  • Symmetric Difference: Extracts only the non-overlapping parts of both layers.

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

After setting the parameters and clicking Run:

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

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

Resulting points created at the boundaries where areas meet
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


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

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)

Result of Difference showing the green polygon with the overlap removed]
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


Final result of Symmetric Difference showing non-overlapping regions
inal result of Symmetric Difference showing non-overlapping regions


 

Conclusion

It's quite straightforward, isn't it?

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!


"In the next session, we'll dive deeper into more advanced features. Stay tuned!"

026] Global Mapper - Spatial Operations 02: Understanding Predicates

Comments

Popular posts from this blog

001] Global Mapper - Creating DEMs

052] Global Mapper - Creating Attributes Using Calculations - Attribute Calculation Setup: Use Formula Calculation

050] Global Mapper - Refining Path Profile : with chatGPT