Dynamic Text in ArcGIS Pro not always correct

638
5
08-18-2023 10:13 AM
SarahRijneke
Occasional Contributor

I've created a pro project with 25+ layout showing tree planting locations around my city. Inside of each map layout, I have a dynamic text box that automatically calculates the total tree count in the layout view. About 5 of the layouts display the wrong tree count. In the following screen capture, the dynamic text produces a count of 47 trees. In the bottom left corner I can see that there are only 37 trees in the attribute table (I use the select by location tool to only select trees within Zone 5). What's up with this discrepancy?

SarahRijneke_2-1692378420774.png

SarahRijneke_3-1692378482145.png

 

 

5 Replies
BarryNorthey
Occasional Contributor III

You possibly have a Definition Query filter running.

0 Kudos
TomBole
Esri Regular Contributor

Hi @SarahRijneke 

It is possible that the extra10 features in the count are features that are on the edge of the map frame, maybe "hidden" by the border of the map frame, and were not selected. 

To troubleshoot try setting the map frame border to 0.  See if you have tree features along the edge.  You may also use the dynamic text "Values" and list the ID of the visible features and compare this to the the features you see in the map frame (you may need to turn on the labels for the layer).

It it is still a mystery you may be running into a bug.  If so, we would need more information to properly troubleshoot.

Hope this helps,

Tom 

0 Kudos
SarahRijneke
Occasional Contributor

Thanks for that suggestion. I added dynamic text to the map to show a list of the ID's of the points that are 'visible' in the map. This revealed the extra points that are being counted which appear to be outside of Zone 5 (top right corner). I'm using a mask in the map to exclude points that are outside of the zone from appearing on the map and in turn should not be included in the total tree count so this looks like a bug to me.

SarahRijneke_0-1692622851405.png

SarahRijneke_1-1692622876838.png

 

 

0 Kudos
TomBole
Esri Regular Contributor

Hi @SarahRijneke 

I've confirmed that dynamic layout elements do honor layer clipping. Since the "extra" features are right along the edge of the clip shape, my guess is that the symbology of the points intersect with the edge of the clip shape and are counted as being in view.

To confirm this you can set the border symbol of the clip to 0 and do a page zoom (not a map zoom) into the area of interest. You may find that features, or part of the symbol, are visible.

For example, in the screenshots below I have 2 point layers with the same geometry. One is clipped (masked) while the other is not.  There is a legend that shows the count of features visible in the map frame.

Here you see that there are 3 "Masked" features.

Screenshot.PNG

I've moved a feature to the edge of the outside of the clip shape (highlighted in yellow). The number of visible "Masked" features has increased and is now 4. 

Screenshot1.PNG

At first glance it appears that this feature is not visible and that the visible feature count reported by the legend is incorrect. However, if I zoom into the page (not the map), I see a sliver of the "blue star" symbol of the "Masked" layer.

Screenshot2.PNG

If the symbol is visible, even if very small, it counts.  

Currently there is no way to set a tolerance level for how much of the symbol needs to be visible to be counted.

As a work around I would suggest copying the tree location layer into a new layer with a symbology of 1 point in size. I would place this layer at the bottom of the layer order so that it would not draw on top of any other layer. I would use this layer to derive my count. This should help in most of these edge cases.

Hope this helps.

Tom

SarahRijneke
Occasional Contributor

Thanks, Tom. I was trying to avoid having to create copies of the data in order to automate this process (I need to produce these maps several times per year). The dataset comes from Cartegraph and is managed by another department. They update several data tables in Cartegraph and in this situation I was able to join the point feature class to another layer that contains the zone information (unfortunately this makes my pro project very slow to work with). From there I used a definition query to only show points in zone 5 rather than using masking but I will keep your suggestion in mind for other projects!

0 Kudos