Labeling by feature order (Index in Layer)
Griffon
Global Mapper UserTrusted User
I'm using Global Mapper v14.2 (yes, I know, it's very old).
I have a series of line features that I've ordered by selecting, cutting, and pasting them back to the original layer. This allow me to set the order in the layer so that when I export the SHP file, the associated DBF file has those features in order. (the last cut/paste becomes the last record in my DBF file.
I've noticed using Search (binoculars) tool in GM, that there is an attribute at the far right of the table that gives <Index in Layer>, showing the order I created.
Is it possible to use this attribute within GM for labeling, rather than modifying the DBF file and adding that attribute, then reloading the SHP or GMW file? Index doesn't appear as an attribute option in the pulldown menu in labeling options, and I'm not sure if can make it one within GM.
I have a series of line features that I've ordered by selecting, cutting, and pasting them back to the original layer. This allow me to set the order in the layer so that when I export the SHP file, the associated DBF file has those features in order. (the last cut/paste becomes the last record in my DBF file.
I've noticed using Search (binoculars) tool in GM, that there is an attribute at the far right of the table that gives <Index in Layer>, showing the order I created.
Is it possible to use this attribute within GM for labeling, rather than modifying the DBF file and adding that attribute, then reloading the SHP or GMW file? Index doesn't appear as an attribute option in the pulldown menu in labeling options, and I'm not sure if can make it one within GM.
Tagged:
Answers
-
Not sure why it isn't available for you. It appears in my list when I use this method:
- Double-click the layer
- Go to Labels tab
- Click on the Use Selected Attribute Value and choose <Index in Layer>
- OK
Also available via Use Custom Format String e.g. My label text with attribute %<Index in Layer>%
You can also copy the attributes to a new attribute - not sure if this is the same workflow in v14.2 though:- Select Feature with Digitizer
- Right-click > Attribute/Style Functions > Calculate/Copy Attributes for Feature Selection
- Enter an Attribute Name you want in the first box e.g. Order
- Choose <Index in Layer> as the Source Attribute
- Leave the Operation as Copy Source Attribute to New Attribute
- Claculate
-
Thanks for your input. You must be using a different (newer) version of Global Mapper. In the Overlay Control Center of v14.2, double clicking on the layer in question opens Vector Options on the tab Feature Types/Labels/Elevations. When I try to find the <Index in Layer>, there is no such choice.
However, if I type in <Index in Layer>, then it does actually label according to order, as desired.
-
To follow up, I tried your 2nd enumerated suggestion, but two problems:
1. I don't see a choice for <Index in Layer>, again, just a list of checkbox attributes. I assume if they aren't checked, they aren't found in the other shape. (I'm trying to transfer order from a line shapefile to area shapes that have coincident borders.)
2. Even if I add the same attribute name (ID_LABEL, for instance), to both the line and shape, going through the copy sequence doesn't copy values FROM the selected lineTO the selected area as indicated by the dialog at the top.
I see your other comment about Custom Format String, and I stumbled on the same option, just didn't use the %% symbols.
I have another thread I started about labeling here:
https://www.globalmapperforum.com/discussion/15950/is-it-possible-to-trim-the-field-used-for-a-label
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