Limiting Labels with SQL Queries in ArcGIS Pro

by | Jan 11, 2021

There may be times when it makes sense to limit the features that will be labeled in a layer.  This is often the case when you have a layer that contains many features that would look very cluttered if you attempted to label all the features.  Attempting to label all features in a layer can result in a cluttered looking map.

You can apply a SQL query to limit the features in a layer that will be labeled. 

You can view a demonstration of this functionalityh below or simply read on.

To set a SQL query on a layer to limit the features that will be labeled, select the layer to be labeled from the ArcGIS Pro Contents pane and then click the Labeling tab from the Feature Layer context menu.

Click the SQL button just to the right of the class selector.  This will initiate the Label Class pane with the SQL button selected.  From here you can build the expression using the point and click expression builder.

Clicking the SQL button will display the pane seen below on the Label Class pane.

Use the expression builder to define a SQL query where MKT_VALUE >= 1,000,000. 

Click the Apply button.  Notice how many of the smaller parcels are not labeled at this point because they have a market value of less than $1,000,000.

Learn more about labeling in ArcGIS Pro in our new 4 hour ArcGIS Pro Shorts Series – Labeling Features class. This class is also part of our Annual GIS Training License and ArcGIS Pro Training Bundle.



Categories

Recent Posts

Eric Pimpler
Eric is the founder and owner of GeoSpatial Training Services (geospatialtraining.com) and has over 25 years of experience implementing and teaching GIS solutions using ESRI, Google Earth/Maps, Open Source technology. Currently Eric focuses on ArcGIS scripting with Python, and the development of custom ArcGIS Server web and mobile applications using JavaScript. Eric is the author of Programming ArcGIS with Python Cookbook - 1st and 2nd Edition, Building Web and Mobile ArcGIS Server Applications with JavaScript, Spatial Analytics with ArcGIS, and ArcGIS Blueprints. Eric has a Bachelor’s degree in Geography from Texas A&M University and a Master's of Applied Geography degree with a concentration in GIS from Texas State University.

Sign up for our weekly newsletter
to receive content like this in your email box.