Select to view content in your preferred language

Symbology: Add in a buffer radius symbol

1075
6
Jump to solution
08-17-2023 05:30 PM
AlfredBaldenweck
MVP Regular Contributor

 Hi all, 

I have a series of buffers of various sizes around points.

AlfredBaldenweck_1-1692318511073.png

 

I'd like to add in a radius symbol to each buffer to show its length.

AlfredBaldenweck_0-1692318498058.png

 

I was able to do it manually, but it only worked at one scale; if I zoom in or out, the radius doesn't scale correctly.

AlfredBaldenweck_2-1692318551862.png

AlfredBaldenweck_3-1692318607891.png

 

 

Is it possible to add a radius symbol that correctly scales with the rest of the poylgon?

Thanks!

1 Solution

Accepted Solutions
JohannesLindner
MVP Frequent Contributor

You can do it with symbol property connections and Arcade, using the $view global.

  • In your polygon symbology, add a marker layer
  • Set it to this shape, deactivate proportional scaling
    JohannesLindner_0-1692353201116.png

     

  • Set the placement and position parameters
    JohannesLindner_3-1692353986467.png

     

  • Allow symbol property connections
    JohannesLindner_1-1692353247152.png

     

  • Switch to the text element, set the angle to 0°, set the text properties to appropriate values (I'm using centered, 12 pt, some vertical offset)
    JohannesLindner_2-1692353359156.png

     

  • Activate the attribute mapping for the  Text string parameter, enter a custom Arcade expression. Use this script, switch to your units
    JohannesLindner_7-1692354429601.png

     

 

 

// If you don't have a distance attribute, calculate the radius yourself
// This will be inexact!
var a = Area($feature, "square-meters")
var r = Sqrt(a / PI)

// Else just use your distance field
//var r = $feature.BUFF_DIST
return Round(r, 1) + " m"​

 

 

 

  • Switch to the line element, activate the attribute mapping for the Size parameter, use this expression

 

 

 

// Like before
//var a = Area($feature, "square-meters")
//var r = Sqrt(a / PI)
var r = $feature.BUFF_DIST

return r / $view.scale * 2835

// I have no idea where the 2835 is coming from. I guess it has something to do with my map's / monitor's DPI.
// It might be a different number for your units and setup.

 

 

 

 

Scale 1:20.000

JohannesLindner_4-1692354029626.png

 

Scale 1:50.000

JohannesLindner_5-1692354087378.png

 

Scale 1:10.000

JohannesLindner_6-1692354124682.png

 

Note that the displayed radius is not exact. I used 500, 750, and 1000 meters. But the Area() function densifies the COGO lines of the buffers to like 35 vertices, which shaves off some area around the rim.


Have a great day!
Johannes

View solution in original post

6 Replies
AndreasHall
Esri Contributor

You can use Convert Labels To Annotation (Cartography) to convert your labels to static annotations. 

0 Kudos
JohannesLindner
MVP Frequent Contributor

You can do it with symbol property connections and Arcade, using the $view global.

  • In your polygon symbology, add a marker layer
  • Set it to this shape, deactivate proportional scaling
    JohannesLindner_0-1692353201116.png

     

  • Set the placement and position parameters
    JohannesLindner_3-1692353986467.png

     

  • Allow symbol property connections
    JohannesLindner_1-1692353247152.png

     

  • Switch to the text element, set the angle to 0°, set the text properties to appropriate values (I'm using centered, 12 pt, some vertical offset)
    JohannesLindner_2-1692353359156.png

     

  • Activate the attribute mapping for the  Text string parameter, enter a custom Arcade expression. Use this script, switch to your units
    JohannesLindner_7-1692354429601.png

     

 

 

// If you don't have a distance attribute, calculate the radius yourself
// This will be inexact!
var a = Area($feature, "square-meters")
var r = Sqrt(a / PI)

// Else just use your distance field
//var r = $feature.BUFF_DIST
return Round(r, 1) + " m"​

 

 

 

  • Switch to the line element, activate the attribute mapping for the Size parameter, use this expression

 

 

 

// Like before
//var a = Area($feature, "square-meters")
//var r = Sqrt(a / PI)
var r = $feature.BUFF_DIST

return r / $view.scale * 2835

// I have no idea where the 2835 is coming from. I guess it has something to do with my map's / monitor's DPI.
// It might be a different number for your units and setup.

 

 

 

 

Scale 1:20.000

JohannesLindner_4-1692354029626.png

 

Scale 1:50.000

JohannesLindner_5-1692354087378.png

 

Scale 1:10.000

JohannesLindner_6-1692354124682.png

 

Note that the displayed radius is not exact. I used 500, 750, and 1000 meters. But the Area() function densifies the COGO lines of the buffers to like 35 vertices, which shaves off some area around the rim.


Have a great day!
Johannes
AlfredBaldenweck
MVP Regular Contributor

Thanks Johannes!

This works well for me.

One thing I had to was multiply my buffer field to convert it from miles to meters (my spatial reference units) before dividing by $view.scale.

Another thing to look out for is making that "Scale Proportionally" is unchecked, or else you get this:AlfredBaldenweck_0-1692372312578.png

This was at 1pt and way too thick, also the text kept getting bigger.

AlfredBaldenweck_1-1692372730361.png

This one ("Scale Proportionally" unchecked) draws correctly.

 

I am curious about how you got the 2835 number? I know you don't know what it means but how did you arrive there?

0 Kudos
JohannesLindner
MVP Frequent Contributor

I am curious about how you got the 2835 number?

Trial-and-error. I knew that

screen_dist / real_dist = 1 / scale    ->   screen_dist = real_dist / scale

The lines weren't long enough, but they were proportional to the buffer distance, so I was on the right track. I figured I'd have to convert from "meters on screen" to "pixels", so I started putting in some common dpi values, but they ere all too small, so I just started iterating until I got something that looked right.

 

I think I just found out what that value is. Go to scale 1:1, place a point, symbolize it with the line symbol, make it really wide to reduce the relative error (I used 1500pt). Measure the distance / create a line feature over the symbol and get it's length (0.5292 meters in my case).

1500 pt / 0.5292 m = x / 1m   ->   x = 2835 pt

So it's the points needed to display one meter at scale 1:1.


Have a great day!
Johannes
0 Kudos
MarkBockenhauer
Esri Regular Contributor

If you zoom the map to where the symbol aligns the way you want, and set the Map Reference Scale,  would that work for you?  

MarkBockenhauer_0-1692364195631.png

 

0 Kudos
Robert_LeClair
Esri Notable Contributor

Using a combination of the circle and line from the Distance and Direction tools (Insert tab->Measurements group), I created a 1-mile circle first by clicking the circle tab, for the center point, snapped to a point and set the radius/diameter to 1-mile. Next, I used the Line tab and again set my starting point snapped to the point and my ending point snapped to the circle polygon.  Created the line and it labels distance and angle.  You can update the label expression to not label an angle if you want.  Works well!


DistDirection.JPG