Changing the feature that is displayed in the legend

1086
7
01-31-2021 12:56 PM
Ed1
by
New Contributor II

Hi, so basically I want my legend to display a different column from the attribute table than it is currently displaying. As per screenshots, it is currently displaying the values for mapSymbol or plotSymbol and I want this to be changed to name. 

For context I am using a downloaded NZ geology map called QMAPs that came with predefined symbology that I assume is tied to plotSymbol. I don't know if this means that plot symbol is then made the default display for the legend or if it is mapSymbol as it is the first unique column in the attribute table. 

Thanks in advance,

Ed :)

P.S I know my legend is all over the show in the photo but it is due to my playing around in frustration, I know I can make it double column etc.

0 Kudos
7 Replies
jcarlson
MVP Regular Contributor

Ed,

Your legend is going to be based on the symbology settings for the layer. Based on your screenshot, it looks like it's coming from either the mapSymbol or plotSymbol fields, but I don't see a difference in the values.

In order to change the value being displayed, you can do a couple of things.

  1. Tedious, but simple, would be to change the displayed name for the various attribute values in the currently symbolized field. See the ArcMap docs for reference. You'll need to type the new value into the Label column for each symbol.
    You can also group your symbols as well. It appears that your preconfigured symbols are based on what comes before the '.' character in the attribute, so you may want to look into that as well.
  2. Less typing, more clicking: change the symbolized field to the "name" field. Your legend labels will be updated right away, but your symbology will probably get re-set, and you'll have to go in and change the symbols to match the desired style.
- Josh Carlson
Kendall County GIS
0 Kudos
Ed1
by
New Contributor II

Hi Josh,

I appreciate the solutions but I don't think these are what I am looking for. Manually doing these would take far too long as there are close to 51,000 entries (sorry I should have mentioned this before). Also any deviation in the symbology would subtract from the map as it is based upon a kind of 'NZ standard' for geologic mapping.

Is there a way to maintain the symbology tied to map/plotSymbol and simply change the output displayed by the legend? It seems like a big flaw by ArcGIS if not...

Thanks :)

0 Kudos
jcarlson
MVP Regular Contributor

It looks like they themselves (GNS) don't even do what you're asking, at least going by the default symbology in their public services. They appear to be grouping the values, but using the same field as the data you've got.

jcarlson_0-1612129715164.png

I don't know that I'd call it a flaw. There's no way for ArcMap to know that each value in a given field has a corresponding unique value in another field. But there is still a way to do this without manually doing it!

There are a few steps, but I think it'll come out ahead with 51k values!

  1. Add your layer to a file geodatabase, if you haven't already.
  2. Summarize the layer
    1. Use both "plotSymbol" and "name" as your case fields
    2. The statistics fields aren't important here, just set it to count one of the fields
    3. The output will be a table with one row for every combination of the two case fields
  3. Use the table to domain tool
    1. Use the newly-derived statistics table as your input
    2. For code field, select "plotSymbol"
    3. For description field, select "name.
    4. After running the tool, you'll now have a domain that associates the values in the plotSymbol field (your codes) with the corresponding values in the name field (your descriptions).
  4. Open the Fields view for the imported polygon layer.
  5. For the "plotSymbol" field, assign it to the newly created domain
  6. Values in "plotSymbol" will automatically be associated with their stored descriptions in the domain. Importantly, this includes inserting the description instead of the code on things like legends.

I know that probably seems like a lot, but it should run fairly quickly.

Final note! If you had to import the feature class into a file geodatabase (I don't know what format you got it in, but am assuming SHP?), the newly imported feature class might not have picked up the symbology from the source layer. If that happens, just import it from the other layer.

- Josh Carlson
Kendall County GIS
Ed1
by
New Contributor II

Hi Josh, 

Thanks for this, a few things...

1. After summarizing the layer I was given a table as expected. Is this meant to be save to the same geodatabase as the layer?

2. After using the Table to Domain tool, I was prompted for a 'workspace entry', I selected the layer that I was wanting to change the legend entry for. Was this the correct thing to do?

3. I'm not sure how you assign the field plotSymbol to the newly created domain. Is there something to select in the feild tab of the properties window that I am missing?

Sorry I didn't make it very far, I am by no means a GIS master!

Cheers,

Ed

Fields.JPG

0 Kudos
jcarlson
MVP Regular Contributor
  1. You only need the table temporarily, so it doesn't really matter where you put it, but you can keep it in the same GDB for simplicity.
  2. The workspace would be the GDB where your layers are.
  3. Try using the assign domain to field tool. I'll admit I haven't used ArcMap in over a year, so I may have mistakenly assumed where the domain gets applied. In Pro, it's on the Fields view, but appears not to be the case for ArcMap.
- Josh Carlson
Kendall County GIS
Ed1
by
New Contributor II

Hi Josh,

It worked! Kind of... The legend has remained the same although checking the attribute table it has changed the name of "plotSymbol" to that of "name" without changing the symbology. 

I assume that by undertaking this process again but for "mapSymbol" this time, it should work. I'll keep you posted.

Cheers,

Ed

0 Kudos
Ed1
by
New Contributor II

Unfortunately it didn't work. Now all three fields in the attribute table "plotSymbol", "mapSymbol", and "name" share the same values however, the legend still displays the initially set values. 

I think at this point, unless there is an easy fix, I will leave as is and keep the initial legend as it is a minor detail. Thanks for all your help Josh, you almost cracked it!

0 Kudos