Calculate Attributes or Import Attributes from Excel
rreed
Global Mapper UserTrusted User
Hello,
I have many lines of many different lengths. Is there a way to have GM calculate an area based on a common width that is assigned to all of the lines? Alternately, if I copy the lines to the clipboard, paste into Excel, and perform math functions in Excel, can I create a new attribute field in GM and then paste the computed values into the newly created attribute field for all of my lines (I would want to paste all of the attributes at once, rather than one at a time)?
Thanks.
Russ
I have many lines of many different lengths. Is there a way to have GM calculate an area based on a common width that is assigned to all of the lines? Alternately, if I copy the lines to the clipboard, paste into Excel, and perform math functions in Excel, can I create a new attribute field in GM and then paste the computed values into the newly created attribute field for all of my lines (I would want to paste all of the attributes at once, rather than one at a time)?
Thanks.
Russ
Comments
-
Russ,
You could do a table join from a CSV file saved from Excel, but there is a much easier method for something like this. Once you have the length attribute, just right-click on the layer in the Control Center and select the CALC ATTR option, then create a new attribute that is your length attribute multiplied by whatever width you need to get the enclosed area. In the near future we also plan to add free-form equation support when calculating attributes.
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
Mike,
Thanks for such a quick response (as always!). I follow-up question to this issue is that GM seems to store the units (e.g. ft) in the attribute data field. When I export the line entities as a shape file, or copy/paste them into Excel, the measured attribute for length imports into other programs with the units in the same field/cell. This is problematic in that other programs don't recognize the imported lenghts as values - they are seen as text. I can use Excel to strip of the units component, but I don't have that luxury in other applications. Further, as calculations are performed on the line segments, the units change, e.g. from ft to ft2 to acres.
Can I change a global setting in GM to not include the units?
Thanks.
Russglobal_mapper wrote: »Russ,
You could do a table join from a CSV file saved from Excel, but there is a much easier method for something like this. Once you have the length attribute, just right-click on the layer in the Control Center and select the CALC ATTR option, then create a new attribute that is your length attribute multiplied by whatever width you need to get the enclosed area. In the near future we also plan to add free-form equation support when calculating attributes.
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
Russ,
Yes, if you activate the Measure Tool (ruler on toolbar), then right-click on the map there is an option there to disable appending units to the measure values. You can also choose to force the units to stay in the base or larger units, so all would be meters or feet for instance, rather than switching to kilometers or miles for large distances.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
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