Slope Percentage Attirbute on Point using Calculate Elev/Slope Statistics
longitude105
Global Mapper User
in Vector Data
Hi,
(Ver. 18 GM) I have created a grid of points (.shp) and loaded over a USGS Elevation model. I selected all the points, (right click) and used the Analysis/Measurement Function --> Calculate Elev/Slope Statistics. All works perfectly, but I am trying just to display the slope percentage value. I get both slope degrees and [slope percentage] together as an attribute. (Example: 5.30* [9.28%])
Is there anyway just to isolate that percent (9.28 in example) as just the value without the slope degrees, brackets or % sign?
I have been able to do this by converting the elevation model to a .flt and exporting to slope percentage elevation raster, and extracting the values that way, but this would really save some time.
Thanks for any info.
Answers
-
Hello,
The format for the slope attribute can not be changed by the user at this time, nor can the slope percent be split out into a separate attribute by the Calculate Elev/Slope Statistics function. I have added feature request #22986 so we can evaluate adding additional formatting options in a future release of Global Mapper. We will post a message on this thread when the status of the request changes.
In the meantime, you can use the Attribute Calculator to split the slope percent into a separate attribute.- Use the Digitizer to select the features you want to modify
- Right-click and choose Attribute Style Functions | Calculate/Copy Attributes for Feature Selection. The Attribute Calculation Setup dialog will be displayed.
- Use SLOPE_PCT (or another name of your choosing) for the new attribute to be added
- Select the Use Formula Calculation option
- In the formula field, paste clip(search(SLOPE,"\d*.\d*%"), "", "%"). (The formula searches the string for a number followed by a percent sign, then clips off the percent sign. See Global Mapper help for more information.)
- Click the Calculate button
Bob -
That works very well. Thank you Bob!
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website