Label Distance Between Features

672
3
11-17-2023 07:14 AM
NickCoxwell
New Contributor

I'm putting together a map series and I want to automatically label distances between features. One example of this is to show the distance from a point to the edge of a polygon like the picture below. Can someone help point me in the right direction on how to do this?

DISTANCE LABEL.jpg

0 Kudos
3 Replies
TomBole
Esri Regular Contributor

Hi @NickCoxwell,

You will not be able to do this in a layout context. You can use dimensions to get labels for distance. These will draw in the map which will also be visible in a map frame on a layout. Depending on how your map series is set up (index layer, page name) you can use Page Queries on the dimension feature class to filter what draws for a particular map series page.

Hope this helps,

Tom

JesseWickizer
Esri Contributor

Convert the polygon features to lines and split at each of the corners to make 4 separate features for each polygon side you want to calculate distances to. This line layer doesn't need to draw in the map, but you'll use it to compute the distances. 

Use the Generate Near Table tool to calculate distances from each point to the nearest 4 polygon side line features. 

Use the XY To Line tool to create lines from the output of the Generate Near Table tool results. Keep the original attributes when you run the tool so they get transferred to the lines.

Symbolize the new lines with arrows, configure the distance labels, and add a Page Query to the layer to only draw the lines related to each map series index point. 

JesseWickizer_2-1700500749137.png

0 Kudos
NickCoxwell
New Contributor

Great info! I'll play around with those. Thanks, Jesse!

0 Kudos