Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
1 of 18

Harnessing Python

1

Share

Download to read offline

2013 Esri International User Conference Lightning Talk

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Harnessing Python

  1. 1. Harnessing Python Blue Raster @blueraster - blueraster.com/blog Brendan Collins @brendancol - bcdcspatial.blogspot.com
  2. 2. Gui do van Rossum | Cr eat or of Pyt hon | Benevol ent Di ct at or f or Li f e
  3. 3. Pr ogr ammi ng f or ever ybody • Designed as a teaching language – Heavily influenced by ABC (dead language) – “Perfect language for beginners and non- programmers” – Adopted by MIT as primary course language • Integrated into ArcGIS Suite in the 9.x series • Matured nicely in ArcGIS 10.x series
  4. 4. You Al r eady Use Pyt hon…
  5. 5. Hello C# using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace hello.world { class Hello { static void Main() { System.Console.WriteLine( “Hello C#!“ ); } } }
  6. 6. print ‘Hello Python!’
  7. 7. open(‘C:fileName.txt’, ‘r’)
  8. 8. Visit documentation help.arcgis.com docs.python.org/2/using
  9. 9. 8. A language for all seasons • Object-oriented; functional; procedural • Desktop; Web; Mobile;
  10. 10. School Boundaries Geodatabase US Department of Education • Effort to collect every school attendance polygon in the country • Using Python for: – Fuzzy joining of attributes (fuzzy wuzzy library) – Standardizing boundary geometry (arcpy) – QA/QC (arcpy)
  11. 11. Emammal Smithsonian Institute • Tool to assist citizen scientists collect and analyze wildlife photo • Uses Python to combine: – EXIF metadata read/write (exiftool) – Thumbnail generation (PIL) – Database connections (django) – Amazon Web Services (boto)
  12. 12. Spatial Data Repository Measure DHS / USAID • Tool to dynamically create compressed, downloadable packages of spatial data • Use Python for: – Fancy clip, zip, ship (arcpy) – Automation of ArcGIS tools (arcpy) – Enrichment with using legacy database. (urllib2) – Published as Geoprocessing Service (ArcGIS Server)
  13. 13. In conclusion… • If you work with data, work w/Python • Esri’s arcpy library has matured: – data access module is fast – Python toolboxes rock • Python Resources: – Core Python by Wesley Chun – Follow @pypi on twitter!
  14. 14. Thank You. Visit us at www.blueraster.com! Blue Raster @blueraster - blueraster.com/blog Brendan Collins @brendancol - bcdcspatial.blogspot.com

×