1 / 25

Python Beyond the Basics ….

Python Beyond the Basics …. Ghislain Prince Jeff Bigos. Comprehensions. Modules. Cursors. Geometry. Comprehensions. Comprehensions. List Comprehensions Loop and filter items from an existing list List is returned. Comprehensions. List Comprehensions

fsalazar
Download Presentation

Python Beyond the Basics ….

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Python Beyond the Basics …. Ghislain Prince Jeff Bigos

  2. Comprehensions Modules Cursors Geometry

  3. Comprehensions

  4. Comprehensions • List Comprehensions • Loop and filter items from an existing list • List is returned

  5. Comprehensions • List Comprehensions • Loop and filter items from an existing list • List is returned

  6. Comprehensions • List Comprehensions • Loop and filter items from an existing list • List is returned

  7. Comprehensions • List Comprehensions • Loop and filter items from an existing list • List is returned

  8. Comprehensions • Dictionary Comprehensions • Loop and filter items from an existing Dictionary • Dictionary is returned

  9. Comprehensions • Dictionary Comprehensions • Loop and filter items from an existing Dictionary • Dictionary is returned

  10. Comprehensions • Dictionary Comprehensions • Loop and filter items from an existing Dictionary • Dictionary is returned

  11. Cursors

  12. Cursors • Two varieties • Arcpy.da cursors (10.1 onwards) • ‘Classic’ cursors

  13. Understanding Data access Cursors • Fields parameter • Index position in fields parameter defines value access • Provide needed fields

  14. Understanding Data access Cursors • Fields parameter • Index position in fields parameter defines value access • Provide needed fields

  15. Understanding Data access Cursors • Where Clause • Filters the records returned • Spatial Reference • Project data on the fly

  16. Geometry

  17. Creating Geometry

  18. Creating Geometry • List of coordinates • *coords

  19. Geometry Operators • Relational: • Is a point within a polygon • Return Boolean Values

  20. Geometry Operators • Touches: • Crosses: • Contains: • Additional Methods in the documentation

  21. Modules

  22. Modules: Included with python • urllib: functions and classes for using internet resources • Urlencodings, POST, GET • json: work with json data • Encoding, decoding • zipfile: create and extract from zipfiles • Resources: • Python help: Global Module Index • Python module of the week

  23. Modules: Included with ArcGIS • numpy: n- dimensional array • Spatial Analyst, arcpy.da conversion functions • matplotlib: Graphing and Charting • Spatial Statistics visual outputs • xlrd / xlwt: read and write excel files • Used in the excel toolset • Resources: • Python help: Global Module Index • Python module of the week

More Related