Pictures in Labels
I have a layer file with points that represent the location of signs along a trail. Each sign point represents one of approximate 20 different signs. In the attribute table, we have several fields in which we can prescribe which one of the 20 possible sign designs should be associated with each point/record.
We have graphic files (pictures/JPEG images) for each of the 20 sign types. How can we associate the appropriate JPEG in a new field in the attribute table and then have the label function illustrate the proper JPEG or sign picture in our display?
Mapping Center Answer:
You have correctly surmised that it is possible to use an attribute in a field to identify which image graphic is related to each point. This is done using the "Match to symbols in a style" option in ArcMap. With this option on the Symbology tab for the layer, each attribute value is used to select its associated symbol in a specified style. For this to work, the attribute value must be exactly the same as the name of a symbol in a style. You will first have to create a new style (if you do not have one already, then you need to create picture marker symbols – one for each of the attribute values – making sure that the name of the picture marker symbol is exactly the same as the attribute value (including spaces, capitalization, etc.) You need to start by creating .emf or .bmp graphics from your image files and resizing them to a smaller size (you will be able to control the size to some extent by setting the marker symbol size as well). If your graphics are too complex, they will not scale down as well, although .emf files will scale better than .bmp files. Once you have the picture marker symbols created, you also need to add a field in the attribute table that contains the very same name as the marker symbols. You could make this the same as a label if you plan to label the points as well – this is not something you mentioned but it is a possibility so I wanted to mention it. Then, once you have the attributes and the marker symbols in a style, you can use the Match to Symbol in a Style. Setting the style and the attribute field (value) and then clicking "Match Symbols" will automatically set the symbology.
OK – so now you have the graphic images associated with the points. You probably want to copy the layer in the Table of Contents and then use a simple point symbol to denote its exact location. When you do this you will see that the two graphics will overlap and you will either have a point on top of the image or you will hide the point behind the image, depending on the order in which the tow layers are displayed. So you have to deal with the displacement of the images.
The easiest and most straight-forward solution, and the one over which you have the most placement control, is to convert the features to graphics and then edit their locations, while adding leader lines. The other solution employs the use of cartographic representations and will get you most of the way there, but you will still have to add the leader lines.
To take the easy route, once you have the points symbolized as images, right click the layer in the Table of Contents and use the Convert Features to Graphics option. At this point, you simply need to move the images where you want them, and add graphic leader lines. To speed up the addition of leader lines and to assure that they are all angled the same, you can create one line feature then simply copy and paste it and move it to the new location. You can also use the Flip Horizontally and Flip Vertically drawing functions to assure that all the leader lines are at the same relative angles.
If you want a more automated solution, you can use cartographic representations. Again, start by symbolizing the point feature with the picture marker symbols using the style you create and the Match to Symbols in a Style option. Then convert the symbology to representations. You can now use the Disperse Markers tool. This tool finds representation markers that are overlapping or too close to one another and spreads them apart based on a minimum spacing and dispersal pattern. This would take care of displacing the image graphics in your layer but not the circle symbols and the image symbols. To have it deal with both, you would have to have duplicate point features in a new feature class, assign circle symbology to each feature and then assign the image symbology to the point duplicates. Then you can use the Disperse Markers tool to automatically shift the symbols off of each other. However, this solution still would not add leader lines. You would have to add those lines graphically yourself at the end.
I tried the first solution and it took me about half an hour for about 20 points. I had complete control over the leader line and the image symbol placement, and I was also able to assure that my leader lines were all angled similarly.
If you would like to post a comment, please login.