027] How to Create MBR, Buffers, and Centroids in Global Mapper Spatial Operations
Generate new vector geometries based on existing layer elements.
This tutorial explores the "Transforms" tab within Global Mapper's Spatial Operations tool. Unlike predicates or geometric operations, transforms generate entirely new features—such as Minimum Bounding Rectangles (MBR), centroids, circles, and buffers—derived from the spatial characteristics of a target layer.
Today is our third session on Spatial Operations, focusing on Transforms. What makes this feature different from the previous two is that it doesn't just select, split, or delete; instead, it targets a single layer and creates new geometries based on the elements contained within that layer.
Let's get started.
Understanding Spatial Transforms in Global Mapper
First, open the file from the previous session. Since this content doesn't require extensive explanation, we'll go through it quickly.
Activate the Area01 layer.
Now, let's examine the menu.
Available Transform Functions in Spatial Operations
- MBR (Minimum Bounding Rectangle): Generates the minimum bounding rectangle for the selected geometry group. It creates the smallest possible rectangle that encompasses all features.
- Centroid: Calculates the center point of Area or Line features. It returns the center of mass for area features or the geometric center for line features.
- Center: Calculates the center point of the Minimum Bounding Rectangle (MBR) of the selected geometry group. Unlike the Centroid, it calculates the center based on the MBR.
- Circle: Generates a minimum enclosing circle based on the center point of the selected geometry group. It creates the smallest circle that contains all features.
- Buffer: Creates a buffer area around the selected features at a specific distance. You can specify the distance and units (e.g., meters, feet).
- Convex Hull: Generates a convex polygon for the selected geometry group. It is the smallest convex polygon that contains all features.
- Concave Hull: Generates a concave polygon for the selected geometry group. It creates a more detailed boundary polygon that follows the shape of the features more closely.
- Dissolve: Merges features with the same attribute values into a single feature. It creates new areas by grouping them based on attributes.
Understanding Grouping Options
- No Grouping: No grouping is performed. Each element is processed independently. For example, every element will individually generate its own Convex Hull, Centroid, or Buffer.
- Group by Attribute: Groups elements with the same attribute value for processing. You must select the attribute to be used for grouping.
- Group All: Groups all selected elements into a single group for processing. It considers all elements in the group to create a single result (e.g., one Convex Hull, one Buffer, etc.).
Buffer Width: Defines the interval for the buffer. This is used when performing the Buffer function.
Hull Smoothing: Used when applying Convex or Concave Hull. It indicates the degree of smoothness for the boundary line.
Creating Minimum Bounding Rectangles (MBR)
Let's start by looking at MBR.
Set it up as shown above and click Run.
The result is as follows:
A rectangle surrounding Area01 has been created.
Generating Centroid and Center Points
Next is the Centroid.
The result is:
A point has appeared at the center of mass or geometric center.
Next, let's look at Center.
The result:
The point has been created, though its position is slightly different. Let's turn on both the Centroid and Center layers to compare them.
The red point was created by the Center function, and the orange point was created by the Centroid function.
As mentioned in the menu description, the Center is the center point of the MBR, while the Centroid is the center of mass. This is why there is a slight difference between the two.
Creating Circular Geometry from Features
Next is the Circle function.
The Circle function generates a circular geometry centered on the centroid of the selected features. In other words, it draws a circle centered on the point created by the Centroid function.
The result:
I activated the Centroid layer to verify if it aligns with the center point of the Circle.
Creating Buffer Zones Around Features
Next is the Buffer function.
You can understand this as a feature used when you need to draw a radius or boundary based on the edge of a zone.
I set it to draw a buffer surrounding Area01 with a 10-meter interval from the boundary.
The result:
Since Transforms only targets a single layer, there isn't much to worry about. It's quite simple, isn't it?
When to Use Spatial Transform Functions in GIS Workflows
Spatial transform tools are commonly used in GIS analysis workflows such as proximity analysis, spatial indexing, polygon generalization, feature extraction, and vector geometry processing.
We've taken a general look at the Transforms feature.
If you have some extra time, try practicing the remaining functions and applying them to other layers as well.
That leaves us with Scripting. However, I haven't personally used this part yet, so I can't teach it to you. You can press the F1 key in the Spatial Operations screen to open the help window and look into Spatial Operations Scripting. For those who require advanced calculations, I encourage you to study it on your own.
That's it for today!
- Learn previous workflow in 026] How to Use Spatial Predicates in Global Mapper for GIS Analysis
- Continue learning with 028] How to Transfer Attributes Between Nearby Features in Global Mapper
Comments
Post a Comment
Feel free to leave a comment if you have any questions about Global Mapper or CityEngine. I will get back to you with a sincere response as soon as possible. (Please note that all comments are moderated and manually approved to maintain a high-quality community. Promotional or spam content will not be published.)