Building rather complex labeling expressions for labeling street block ranges can be very challenging. I think it would be cool if there was an option to remove duplicate based on an attribute. If one has various fields with the same attribute (in this example '0') then one could easily remove that duplicated label across everything.
Depending on your preference, there are a few ways to remove duplicate address number labels. Each of these suggestions uses the Street address placement label placement style. In the examples below, note the address placements along S KENOSHA DR, which has some duplicate (0) placements along one side of certain segments. Orange arrows indicate line direction. Red labels are from/low address ranges and blue labels are to/high address ranges.
If the segment has the same address range for the from/low and to/high, use an arcade expression to only show the duplicated address range value once - in the to/high position.
Default placement | Removing duplicate values along same side |
|
|
The label expression for the From addresses uses this arcade expression:
var l_from = $feature.l_lo_addr;
if ($feature.l_lo_addr == $feature.l_hi_addr) {
l_from = "";
}
var r_from = $feature.r_lo_addr;
if ($feature.r_lo_addr == $feature.r_hi_addr) {
r_from = "";
}
return l_from + TextFormatting.NewLine + r_from
The label expression for the To addresses uses the usual arcade expression for street address labeling:
$feature.l_hi_addr + TextFormatting.NewLine + $feature.r_hi_addr
Use Arcade expressions in the label classes to suppress "0" values. Similar to the above, but just suppressing all address range values of zero.
Default placement | Removing all zero values |
|
|
The label expression for the From addresses:
var l_from = $feature.l_lo_addr;
if (l_from == 0) {
l_from = "";
}
var r_from = $feature.r_lo_addr;
if (r_from == 0) {
r_from = "";
}
return l_from + TextFormatting.NewLine + r_from
The label expression for the To addresses:
var l_to = $feature.l_hi_addr;
if (l_to == 0) {
l_to = "";
}
var r_to = $feature.r_hi_addr;
if (r_to == 0) {
r_to = "";
}
return l_to + TextFormatting.NewLine + r_to
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.