028] How to Transfer Attributes Between Nearby Features in Global Mapper
Learn how to integrate disparate GIS datasets by transferring height values based on spatial proximity and overlap.
This tutorial covers the "Copy Attributes Between Overlapping/Nearby Features" function in Global Mapper. We demonstrate a practical workflow for supplementing National Map building footprints with accurate height data from GIS Integrated Building Data, even when geometries do not perfectly align.
In this tutorial, we will learn how to transfer attributes between nearby or overlapping features in Global Mapper. Instead of processing queries by referring to attribute tables, this method determines whether objects are close enough or overlapping to transfer the desired attributes.
Why Spatial Attribute Transfer Matters
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 ] (Verified and safe file for Global Mapper.)
Preparing Source and Target Layers
Step 1: Inspecting Layer Attributes
When you open the file, you will see two layers: the National Map and the Integrated Building Information layer.
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.
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.
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.
Running the Attribute Copy Operation
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.
Right-click on the National Map layer in the Control Center and choose "SELECT - Select All Features in Selected Layer(s) with Digitizer Tool."
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.
Step 3: Configuring Copy Settings
The settings window will appear. Here is a brief explanation of the options:
-
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.
- 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.
Checking Whether Attribute Transfer Worked Correctly
Step 4: Verifying the Results
Select "Centroid Must be in a Selected Area" and click OK.
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.
As you can see, the A16 attribute has been successfully added to the National Map features. The attribute transfer is now complete.
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.
You can apply the same workflow to points, lines, and other polygon datasets depending on your project requirements.
That's it for today!
- Learn previous workflow in [027] How to Create MBR, Buffers, and Centroids in Global Mapper Spatial Operations
- Continue learning with [029] How to Split Polygon Areas with Intersecting Lines 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.)