Presentation is loading. Please wait.

Presentation is loading. Please wait.

arcpy.Describe and arcpy.List*

Similar presentations


Presentation on theme: "arcpy.Describe and arcpy.List*"— Presentation transcript:

1 arcpy.Describe and arcpy.List*

2 Describing objects ArcGIS interacts with a number of types of objects arcpy.Describe(object) exposes object properties that can be used in Python to control program flow, tool parameter values, etc. of geoprocessing scripts e.g. Clip all polyline feature classes in a workspace.

3 gp.List*  Python list of objects ArcGIS 10
Overview gp.Describe(object)  Describe object gp.List*  Python list of objects ArcGIS 10 arcpy.Describe(object) arcpy.List*

4 Evolution Describe Object Properties
An example of how Python is evolving with ArcGIS 9.2 9.3

5 Describing data in 10.x

6 Describe Example (feature class)
… if you plan to do multiples in same workspace

7 Describe a Feature Class

8 Describe a Geodatabase
some are case sensitive, others not arcpy.env.workspace is

9 Fields in a Feature Class via Describe
ArcGIS 8.x, 9.x ArcGIS 10

10 Describe a Raster

11 List functions Scripts allow you to iterate through lists
arcpy provides many list functions that create lists of objects e.g. For each feature class in a given workspace, create a report that shows how many are point, line, and polygon (uses ListFeatureClasses and Describe)

12 Lists of Objects in Geoprocessing OMD

13 List*: Python List (i.e. returns a Python List)
Listing Data List*: Python List (i.e. returns a Python List) Know number of * in a Python list Use a for loop

14 ListFeatureClasses([wildCard], [FeatureType])

15 ListFeatureClasses examples

16 ListFields(pInputValue, [wild card], [FieldType])
Same Field object as each Field object in list that is returned by Fields property of the Describe Object

17 ListFields examples

18 os.walk(top, topdown=True, onerror=None, followlinks=False)

19 os.walk() simple example

20 os.walk() not-so-simple example
Find all Flash videos (SWF) in the entire tree under a given root folder If the SWF file has the “slide”, and not “group”, as part of its name convert the first frame of the video to a JPG with the name of the SWF

21 Dependencies Python for Windows Extensions
Interfacing with Windows, Windows applications & libraries SWF To Image ActiveX library

22 os.walk() not-so-simple example


Download ppt "arcpy.Describe and arcpy.List*"

Similar presentations


Ads by Google