Select to view content in your preferred language

Can I label a grid component within a Pro Layout?

2944
7
07-28-2020 04:57 PM
m_neer
by
Frequent Contributor

Simply want to know if my layout grid in ArcGIS Pro which is a alphanumeric grid [REFERENCE GRID] can be labeled in my map series dynamically.  I can use arcade to label feature objects that fall within a current map frame extent but where do I levearge the GRID it associates with in this case a reference grid which is alphanumeric?  How can this be done?   I would think you need to leverage the label component of the grid maybe?  anyone have any thoughts?

7 Replies
AubriKinghorn
Esri Regular Contributor

This sounds like it might be a good case for the new custom grids (Custom grids—ArcGIS Pro | Documentation) available in Pro 2.6. If you create a grid feature class for the entire map area using the Grid Index Features tool (Grid Index Features (Cartography)—ArcGIS Pro | Documentation) you can use a custom grid to draw the reference grid labels on your map. Custom grids use existing line or polygon features as the grid lines, then let you label the grid outside of the map frame using a column in the feature or an Arcade expression. Using a custom grid, I was able to create this alpha numeric grid:

Cheers,

Aubri K

Cheers,
Aubri
m_neer
by
Frequent Contributor

I think we are close here.  What I'm looking for is the example of arcade language that would leverage the Grid Index Feature and the corresponding feature objects within my map series pages in this case restaurants.   

Example:

NAME     LOCATOIN

McDonalds ...B1

Burger King ...C2, A2

Taco Bell …D2

Wendys .. A2, D3

Currently I can use dynamic text labeling by leveraging the "attribute table"  setting the Map Frame, Table, and Query to Visible Rows, and even do a advanced expression in the field calculator, but am only able to successfully leverage but just one feature at a time.

If I have a feature polygon restaurants and feature polygon grid index with values A1, B2, C3 etc - I should be able to label in ArcGIS Pro where those two intersect dynamically only the fly right?

AubriKinghorn
Esri Regular Contributor

Ah, okay I think I understand now. I can make this work, as long the page number is stored in the polygon class I want to report on (in your case, restaurants). To do that I ran an intersect of the polygon and the grid index:

Then, using the new feature class for the polygon area containing the grid number I inserted Value Dynamic Text showing Visible Rows with this Arcade expression: 

$feature.City_Name + "... " + $feature.PageName + TextFormatting.NewLine

That worked for me, I got the names to update on every page in the map series.

Note: If you use TextFormatting.NewLine to show each restaurant on a new line, be sure that your Delimiter is cleared. It defaults to a space, which throws off the alignment for the new lines. 

Cheers,
Aubri
m_neer
by
Frequent Contributor

This is helpful, but not really 100% what I'm looking for.  But extreemly close - I was hoping not to make a new feature class to acquire the intended results.   Another slight hicup is if my Alpha Numeric Grid Size (If it is to small)  I get the following:

* please know that although the following output  is correct in its output nature it is really not what I am intending to show dynamically with Pro dynamic text.

<A>

NAME     LOCATOIN

McDonalds ...A1

McDonalds ...B1

McDonalds ...A2

McDonalds ...B2

Burger King ...C2

Burger King ...B2

Burger King ...B3

Burger King ...C3

Taco Bell ...D1

Taco Bell …D2

Wendys ...A1

Wendys .. A2

now, this out put is what I'm hoping for - something like such:

<B>

NAME     LOCATOIN

McDonalds ...A1, A2, B1, B2 

Burger King ...B2, B3, C2, C3

Taco Bell ...D1, D2

Wendys ...A1, A2

<A>     $feature.City_Name + "... " + $feature.PageName + TextFormatting.NewLine

<B>     $feature.City_Name + "... " + $feature.PageName    (  If $feature.City_Name = $feature.City_Name then just label the $feature.PageName Else +TextFormating.NewLine + $feature.City_Name  + "..." so on and so forth kind of thing.

            

             

AubriKinghorn
Esri Regular Contributor

Unfortunately, I don't think an Arcade expression can get the result you want. The Arcade expression for dynamic text is applied to each individual row, it can't read through all the rows in the table and aggregate them. To do that, you'd need to manipulate the data so the table column listed all the pages with a McDonalds. The Summarize tool might be able to do that, although I'm not sure. 

Cheers,
Aubri
m_neer
by
Frequent Contributor

Thank you again for your kind help Aubri.  Maybe in the future ESRI software will accommodate this.  I'll keep my eye out for it.   

SarahHartholt
Frequent Contributor

I think I was able to achieve what you are asking for. Let me know if you have any questions

Solved: Re: Populate Street Name Index using Arcade - Esri Community