4

Is there a way to factor data frames and the legend when having placing labels using the Maplex Label Engine?

I am talking specifically about the labels for roads and contours. I really don't want to have to convert the labels to annotation and manually move them, and these are the labels that always seem to find a way to hide partially under an inset map, even when there is no apparent need to have the label in that one exact spot.

My current way around this is to create a polygon with no fill or border that fits under the inset and legend and give the polygon a suitable weighting. This works, and sometimes is quite handy at making the map look decent to show what is underneath the legend/inset map, but it seems like the placement of the labels should already factor in the map elements, and the process is becoming tedious enough to ask the question here.

Am I missing something in the labeling toolbar that allows this?

  • 1
    I can't really answer the why beyond stating how it works. The data view is independent of the layout view. Things in data aren't seen by layout - just the dataframe. The reverse is also true. This is similar to paper/model space in AutoCAD. They're completely different "spaces" or parts of the program that don't really have any awareness of each other. Although in AutoCAD you can create irregular viewports, which would avoid this problem without the use of masks. Not sure if the ArcGIS dataframe clip to shape works the same way. – Chris W Dec 8 '14 at 20:09
  • I'm not aware of a solution to this. I usually convert the labels to annotation and move them around but thanks for the tip on creating a polygon in the view window under the legend/inset/whatever, I'll try that next time this comes up. – Dan C Dec 8 '14 at 20:39
  • Did some investigation, and no, dataframe clipping in ArcGIS doesn't work the same. In AutoCAD you actually change the shape of the viewport (dataframe) itself, whereas in ArcGIS you have to have a polygon in the data view that basically the displayed data gets clipped to - doesn't really have anything to do with the frame itself per se. Related question for label masking - it's a common trick and the best workaround I know of. – Chris W Dec 8 '14 at 20:45
  • I just tried to do the opposite, create polygon that everything fits in except the dataframes, and use the Data Frame Properties - Clip Options - Clip to shape - Specify Shape and then use polygon shape to clip the data, but it apparently does not work on the labels as it did not affect them. – Adam Thom Dec 8 '14 at 22:32
2

As others have commented your only current option will be to use a workaround. I would approach that by using the position of your overlapping data frame or legend elements to create rectangular polygons that can be used to make/erase holes in copies of your data that are used just for labelling. The workaround is non-trivial but achievable and although I have not done it end to end I see no reason why it cannot be fully automated using arcpy.mapping.

There is an ArcGIS Idea for an enhancement request entitled Allow Maplex to "see" other dataframes:

I would like the Maplex engine to view any other dataframe as a conflict and not place labels such that they are infringed upon by another dataframe.

I think this covers the inset part of your question but you may want to consider submitting an ArcGIS Idea to request that there be conflict detection implemented for layouts that makes the Maplex labelling engine aware of any overlapping layout elements.

  • 1
    The issue with the workaround is that the data frames and other elements are dynamic, which means keeping track of changes, as well as editing the polygons to make sure they match. The workaround does work, as stated in the question, but has become a tedious part of the job – Adam Thom Dec 8 '14 at 22:28
  • 1
    That's precisely why I recommend using ArcGIS Ideas to try and get this addressed at source sooner rather than later instead of working around it forever. As an aside my tip is that this has little hope of ever getting into ArcMap so I would target the new ArcGIS Idea to be for ArcGIS Pro instead. – PolyGeo Dec 8 '14 at 22:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.