028] Global Mapper - Moving Attributes: Copy Attributes Between Overlapping or Nearby Features
Today, we will cover the function of copying and moving attributes between features. Instead of processing queries by referring to attribute tables, this method determines whether objects are close enough or overlapping to transfer the desired attributes.
"Before we begin, if you missed the previous session, check it out here:"
[027] Global Mapper - Spatial Operations 03: Transforms
Why We Need This: Integrating Building Height Data
For landscape simulations, it is essential to know the height of buildings. However, the standard "Continuous Digital Map" (National Geographic Information) typically only provides the number of floors, lacking specific height information.
In tasks where exact height isn't critical, we often use a formula like "(Number of Floors * 3) + 1" to estimate height. However, this formula is virtually useless in areas with many factories. Even a single-story factory can often reach nearly 10 meters in height.
In such cases, we supplement the data using "GIS Integrated Building Data." This dataset provides height information for recently completed buildings. The challenge is that the features in the GIS Integrated Building Data and the Continuous Digital Map do not align perfectly. Therefore, we must copy the height values from the GIS Integrated Building Data to the buildings in the Continuous Digital Map that are in similar positions.
The function used to judge the approximate position between objects and copy attributes is "Copy Attributes Between Overlapping/Nearby Features."
You can use the GMP file provided below for practice.
[Attachment: Attribute_Copy_Sample.zip]
(This is a safe proprietary data file for Global Mapper.)
Step 1: Inspecting Layer Attributes
When you open the file, you will see two layers: the National Map and the Integrated Building Information layer.
|
|
|
[img 2 : Comparison of National Map and GIS Integrated Building
Information layers]
|
In the display, the red lines represent the GIS Integrated Building Information. You can see that its shapes and even some missing building parts differ from the other layer.
First, let's check the attributes of each layer. We will turn off the GIS layer and look at the attributes of the National Map layer first.
|
|
|
[img 3 : Attribute table of the National Map showing only floor
counts]
|
Looking at the attributes, only the number of floors (층수) is listed.
Next, we turn off the National Map layer and activate only the GIS Integrated Building Information to check its attributes.
|
|
|
[img 4 : Attribute table of the GIS layer showing height data in
attribute A16]
|
The attribute names are a bit different here. In this dataset, the value corresponding to A16 is the building's height, which is shown as 29.7.
Step 2: Selecting the Target Features
Our task is to move the A16 attribute from the GIS Integrated Building Information layer to the objects in the National Map layer. First, select the objects in the layer where the attribute values will be added.
|
|
|
[img 5 : Selecting all features in the National Map layer via Control
Center]
|
Right-click on the National Map layer in the Control Center and choose "SELECT - Select All Features in Selected Layer(s) with Digitizer Tool."
|
|
|
[img 6 : All features selected in the main viewer]
|
Now that all objects in the target layer are selected, right-click on the main screen and navigate to Attribute/Style Functions -> Copy Attributes Between Overlapping/Nearby Features.
|
|
|
[img 7 : Navigating to the Attribute Copy function in the right-click
menu]
|
Step 3: Configuring Copy Settings
The settings window will appear. Here is a brief explanation of the options:
|
|
|
[img 8 : Copy Attributes Between Features configuration dialog]
|
-
Copy Attributes From: Select the source data.
- Loaded Area Features: Uses areas visible on the screen as the source.
- Selected Area Features: Uses only selected areas as the source.
- Copy Attributes To: Select the target data. (The selection method varies depending on the geometry; please verify based on your specific case.)
- Attributes to Copy: Select the specific attributes you want to transfer (in this case, A16).
-
Multiple Feature Handling:
- Keep Attributes from First/Closest Matching Feature (Default): Copies attributes only from the first or nearest matching source feature.
After configuring the settings as shown above and clicking OK, you can select the spatial relationship criteria for the copy operation.
|
|
|
[img 9 : Area Coverage settings dialog]
|
- Completely Inside a Selected Area: Only objects entirely contained within the selected area are considered.
- Any Overlap with a Selected Area Allowed: Any object that overlaps with the selected area is considered.
- Centroid Must be in a Selected Area: The centroid of the feature must be inside the selected area.
- Majority of Area Must be in a Selected Area: More than 50% of the object must be within the selected area.
As we saw earlier, the building outlines are slightly different and do not match perfectly. Therefore, selecting "Centroid Must be in a Selected Area" is the most reliable choice.
Step 4: Verifying the Results
Select "Centroid Must be in a Selected Area" and click OK.
|
|
|
[img 10 : View showing only the features that were successfully
updated]
|
Only the objects whose attributes were modified will remain selected. Let's verify. Turn off the GIS layer and activate only the National Map layer to check the results.
|
|
|
[img 11 : Verified attribute table of the National Map now including
the A16 height value]
|
As you can see, the A16 attribute has been successfully added to the National Map features. Simple, right?
While we only dealt with similar shapes (areas to areas) today, this function works even if the object types (points, lines, areas) are different—as long as you correctly define the source, target, and the degree of overlap or containment.
Try experimenting with other features to explore the rest of the functions!
That's it for today!
"In the next session, we'll dive deeper into more advanced features. Stay tuned!"
029] Global Mapper - Cutting Areas with Lines: Crop Selected Area(s) to Selected Line(s)
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.)