O'Reilly logo

Programming ArcGIS 10.1 with Python Cookbook by Eric Pimpler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Restricting the list of feature classes returned with a feature type.

In addition to using a wildcard to restrict the feature classes returned by ListFeatureClasses(), you can also filter by feature type.

Getting ready

In addition to using a wildcard to restrict the list returned by the ListFeatureClasses() function, a type restriction can also be applied in conjunction with the wildcard or by itself. For example, the following code sample shows the two being used together to restrict the list returned to only polygon feature classes beginning with the letter B. In this recipe, you will restrict the feature classes returned through the use of a feature type parameter along with a wildcard:

fcs = arcpy.ListFeatureClasses("B*", "Polygon")

How to do ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required