054] Global Mapper - Exporting by Specifying an Area
While looking back at my previous posts, I realized I had missed one of the most frequently used functions in Global Mapper: selecting a specific area and exporting it in the desired format.
Global Mapper is perhaps one of the most versatile GIS tools when it comes to the sheer number of formats it can import and export. Because of this, many users utilize it as a conversion and editing stage before moving data to their final production tools.
Let’s get started.
First, please download the file below. It is a digital map containing building information.
Cur_BD_2.zip (This is a safe proprietary data file for Global Mapper.)
|
|
|
[img 1 : Bandizip window showing contents including shp, dbf, and
prj files]
|
You will see the building data appear. Now, I will add a few more features.
As shown below, please create one polygon located roughly within the current data area and another polygon that extends outside the data area, each on its own layer.
|
|
|
[img 3 : Building data with two overlaying polygons, one yellow and
one green, representing different areas]
|
When exporting, there are several things to consider:
- Which format will you export to? Vector? Raster? Or something else?
- Will you export the entire data set, or define a specific area beforehand?
- Will you export only specific layers, or export everything currently visible on the screen?
Let’s go through these one by one. First, let's save the entire visible screen as a raster image.
Click File - Export from the top menu bar, and you will see the Raster/Image Format option. Select it.
A window will appear asking you to choose the format.
You can choose any format you like. After selecting, an options window will pop up.
Key Options:
- Sample Spacing: This determines how much real-world distance is contained in a single pixel. Set this to an appropriate resolution.
- Metadata File Formats to Generate: This allows you to export the coordinate system information alongside the image. I recommend always checking the 'World File' and 'PRJ File' options. This ensures the file can be re-imported with the correct coordinates later.
- Save Map Layout: This includes elements outside the map (like legends or scales) in the raster file. I generally don't recommend this because the size of legends can change depending on the Sample Spacing.
- Save Vector Data if Displayed: This option determines whether to render vector elements if you have raster layers in your workspace. It is currently grayed out here as we only have vector elements.
Once you've configured these, click OK. A window will appear asking you to save the file.
Name your file and save it. A quick tip: if you use Korean for the file name, the generated .prj file will also have a Korean name. Some programs may not recognize .prj files with non-English characters. For better compatibility, I recommend using English names, though Global Mapper itself handles Korean names just fine.
Now, let's try loading the saved file back into Global Mapper.
I turned off the other layers to show only the imported file. You can see that the entire data set has been successfully rasterized and loaded. Next, let’s export the entire data set as a vector file.
If you select Vector/Lidar Format from the Export menu (feel free to explore other formats on your own; they aren't difficult), a format selection window will appear.
Select the format you need. Shall we try PDF?
The PDF options are quite self-explanatory. Most are standard page settings. Just click OK.
Choose your location and filename, then save. Now, let’s load it back in.
It loaded perfectly. If you zoom in and out, you’ll see it has been imported correctly as vector data.
Exporting Only Selected Layers
Now, let's look at how to export only specific layers.
Currently, I have three layers. I will select two of them (hold Ctrl while clicking), then right-click to open the context menu and select Layer - EXPORT - Export Layer(s) to New File...
A window will appear to confirm your layer selection.
The layers you previously selected will already be checked. You can add or remove layers here if needed. Click OK.
Let's go with JPG again. (Note: When you use the 'Export Layer' function, all compatible formats for both vector and raster will appear in the list.) Configure your export options and save the file.
|
|
|
[img 17 : Re-imported JPG showing only the previously selected
building data and the 'Outside' polygon]
|
As you can see, only the selected layers were exported correctly.
Exporting by Selecting a Specific Area
Finally, here is how to export by defining a specific area. First, select the area you want to export. I will select the yellow polygon.
For this method, you need to decide whether you want to export based on what's visible on the screen or based on specific layers.
- Visible Screen: With the area selected, use the File - Export menu from the top menu bar.
- Specific Layers: Select the layers in the Control Center, right-click, and use the Export menu.
Let’s try using everything visible on the screen. Select File - Export - Raster/Image Format... and choose JPG.
Now, the most important part is the Export Bounds tab in the options window.
|
|
|
[img 21 : Detailed view of the Export Bounds tab highlighting the
'Crop to Selected Area Feature' option]
|
Export Bounds Explained:
- All Loaded Data: Ignores your selection and exports all active layers.
- All Data Visible On Screen: Ignores your selection and exports only what is currently visible in the workspace.
- Lat/Lon: Allows you to set a coordinate range (rarely used manually).
- Draw a Box: Allows you to manually draw a rectangular area on the screen for export.
- Use Layer Bounds...: Sets the export boundary to the extent of a specific selected layer.
- Crop to Selected Area Feature(s): This is what we want. It uses the currently selected polygon as the clipping boundary.
After selecting 'Crop to Selected Area Feature(s)', click OK and enter your filename.
|
|
|
[img 22 : The final result showing the building data perfectly
cropped to the yellow polygon's shape]
|
The data within the selected area has been saved perfectly! If you don't want the boundary line of the polygon to show up in the image, simply turn off that layer in the Control Center after making the selection but before clicking export.
It's not that hard, right?
That’s all for today.
■ Chapter 3: Data Management & Layer Editing
[018] Elevation Layer 02: Advanced Processing
[020] Point Layer: Calculate/Copy Attribute Value(s)...
[021] Point Layer: Join Attribute Table/File to Layer
[022] Point Layer: Split into Separate Layers Based on Attribute Value
[023] How to Close Gaps Between Adjacent Features in Vector Layers
[030] Assigning Heights to Vertices: Edit Feature Vertices
[049] Adding Points, Lines, and Polygons using CSV Files
[054] Exporting by Specifying an Area
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.)