I hope to put labels of bounds inside of the polygon in intersection with like you can see in the picture below.

enter image description here

I have checked multiple solutions as a topology or Maplex but it doesn't create the relationship between the labels of the point layer and another polygon layer...

So I think I necessary should pass through a programmation.

I thought to make this algorithm :

  • Convert label to annotation
  • Calculate XY of each annotation
  • force each annotation to enter in the nearest corner of the polygon in intersection with

I'm not keen to follow this algorithm, I'm looking for any other suggestion.

I'm using ArcGIS 10.1, arcpy, ArcObjects

  • 2
    What an interesting problem. I wonder if you could create a centroid, explode the polygon to vertices, and then calculate the angle from the exploded points to the centroid. The points could be labeled via angle field and offset?
    – GISI
    Mar 8 '15 at 9:55
  • 1
    What about vertex to point, buffer, clip the buffers then label that with the 'inside' option - placing the buffers as invisible polygons with labels. Give the original polygon a high feature weight. This isn't an arcobjects solution though. How are you intending to place your text? As an IFeature object or as an IElement (ITextElement)? Is it going to be permanent or placed on refresh? Mar 9 '15 at 0:14
  • @geosevda I'm in the same problem, do you progress in a solution? Mar 15 '15 at 1:31
  • @GISI I do exacly as you mentioned, but do that to 1k points it's a hard work. Mar 15 '15 at 1:46
  • unfortunately i do not i was token by an other work and let that for later... if do you make any progress make me know it plz
    – geosevda
    Mar 26 '15 at 10:15

This is a non-programming workaround, but seemed to work for me with the example you gave. Cannot guarantee this will work for every polygon shape.

One option would be to create a polygon layer which is the exact inverse of your polygon layer using the Erase tool or similar. It should extend beyond your polygon layer. Mine looks like this:

enter image description here

Then, turn on Maplex and in the conflict resolution tab of the inverted polygon layer, set the Interior feature weight and the boundary feature weight to 1000. This will prevent labels from being placed on the inverted polygon.

enter image description here

Now label your points:

enter image description here

In my case, I had to tweak some of the label settings of the point layer. Particularly the maximum offset setting in the Label Offset:

enter image description here

You will need to keep this layer on, but you can set the fill and outline to no colour and you'll get your result:

enter image description here

  • This seems like more work than just converting the labels to annotation and moving them. A better solution would be to create a polygon to cover all your existing polygons then use the erase tool to remove the existing polygons from the new polygon
    – jbalk
    Feb 23 '17 at 3:03
  • While I didn't explicitly state it, it was implied that an erase function would be used to create the inverted polygon. I've edited my answer to clarify.
    – Fezter
    Feb 23 '17 at 3:05

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.