050] Global Mapper - Refining Path Profile : with chatGPT
050] Global Mapper - Refining Path Profile : with chatGPT
Today, I’d like to share something I tried out of curiosity.
First, please run Global Mapper.
With the DEM created, add a line segment. Now, let's extract the terrain profile.
After selecting the line segment, right-click and select Analysis/Measurement - Path PROFILE.
The Path Profile result window will appear.
As you can see, it's quite basic. While it's functional enough to convey information, I thought about refining it using chatGPT.
To do this, save the results as a CSV file.
[img 4 : Selecting 'Save Path to CSV File' from the Path Profile File menu]
In the Path Profile window, go to File - Save Path to CSV File (XYZ, Distance, Slope).
A window asking for the save location will pop up.
Enter a name and save it. Now, let's check the file in Notepad.
Yes, it has been saved correctly. Now, log in to chatGPT (note: I am a paid user).
Upload the CSV file you just saved to the chat window and ask it to generate a graph.
The "Path Profile Guidelines" mentioned in the prompt are the following set of instructions that I "agreed" upon with chatGPT after considerable trial and error:
1. Basic Configuration
- X-axis: Distance (Total)
- Y-axis: Elevation
Elevation
- curve: Solid black line
Graph
- title: Do not display
2. Slope Related
- Do not represent any lines or markings related to Slope.
3. Site Area
Based on the user-specified distance interval (Site): Fill the area under the elevation line for that interval with black semi-transparent shading (alpha=0.3). The shading should extend down to the minimum elevation grid tick (grid_y_min). Place the Site label "site": Centered in the site interval (X-axis). In the upper space to avoid overlapping with the elevation curve and shading. Color: Black, Alignment: Horizontally centered, bottom aligned.
4. Elevation Text Display
Display the elevation values for the start and end points of the Site area using leader lines. Left (Start): Leader line pointing up-left / Right (End): Leader line pointing up-right. Text format: "XXX.X m", Color: Black.
5. Axis Settings
- X-axis label ("Distance (m)"): labelpad ≈ -2 Y-axis (Elevation): Display ticks at 20m intervals, starting from 20m below the minimum elevation to 20m above the maximum elevation. Fix the axis scale to 1:1 to prevent visual distortion.
6. Other Visual Settings
- Do not use a legend. Enable grid lines. Save format: PNG (convert to PDF if necessary).
I saved these instructions as a text file and added them to the project files so chatGPT could refer to them. Here is the result:
Looks clean, right? Now, I will set the project site range from 400m to 900m and redraw the graph.
And the result?
Following the guidelines, the project site is shaded, and the sea-level elevation at the boundaries is displayed. Let's try one more thing.
I'll mark areas within the site where the slope is 15 degrees or more with a red line.
And the result?
It rendered it perfectly. You can also adjust font size, grid intervals, and colors.
Since this is a result of learning between me and my chatGPT, you might not get the exact same result even if you use the guidelines I showed. You'll need to talk to it and "teach" it diligently.
Depending on how detailed you make your instructions with chatGPT, expressions not provided by Global Mapper are entirely possible. It seems that if you save the DEM in XYZ format and specify the project site area, you can perform any analysis to your liking. I'll have to try that when I have time.
That's all for today!
Comments
Post a Comment