gis 4107 – introduction to programming instructor: david viljoen (last name pronounced vil-john)...

40
GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) [email protected] Vide o

Post on 19-Dec-2015

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

GIS 4107 – Introduction to Programming

Instructor:David Viljoen (Last name pronounced vil-john)

[email protected]

Video

Page 2: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

Passion matters

(Passion & B+) > (A+)

Page 3: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

It will rain … what will your attitude be?

Page 4: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

Our goal, yours and mine …

Page 5: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

Reference call, interview, life

1. Useful skills

2. Ability to learn and focus

3. Attitude & enthusiasm

4. Ability to work with others

Page 6: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

Why am I here?

Page 7: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

Everyone is different

I learned a lot

Teacher couldn’t teach

Page 8: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

“… learning, critical thinking, creativity, and invention – all those mind expanding skills – are all up to you. You don’t get taught; you have to learn. We tend to look at the teacher/learner relationship the wrong way round: it’s not that the teacher teaches; it’s that the student learns. The learning is always up to you” Hunt, p. 3

Page 9: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

Flipped classroom

Everyone’s differentOne-on-one mentoring is best way to learnFlipped classroom is best we can do …

At home …Review PowerPoint+ watch lectures for part/all of PPT+ play with Python (~45-90 min)Email questions about lectures to meFinish exercises (~0-120 min)

In class …Review any e-mailed questionsWork with partner on exercises with my help

Problem Analysis & Design Solution Questions for Quizzes

Coding … in pairs, here’s why.

Lecture

Page 10: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

Marking

5%

80%

5%

10% Quizzes

Work in class+ submitWork at home

Working code

Page 11: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

“Textbook”

“Think Python”Not requiredFree PDF or HTMLAvailable in paper format

Other web resourcesLynda.com (Free Algonquin membership)TutorialsPointEtc.

http://www.greenteapress.com/thinkpython/thinkpython.html

Page 12: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

What do you need to do?

Getting lost? Ask!

Write code

Don’t fall behind

Page 13: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

Source: Wikipedia

e.g.a = 1, b = 1, c = -2

Why did I have to learn this %@#! ?

Page 14: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

Why would I ever want to learn to program …

… in a GIS Certificate program ?!

1. Better chance of getting a job2. More useful to employer 3. More $4. Better understanding of GIS software

Page 16: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

GIS Career Roulette

You bet $30,000 ($10k certificate + $20k opportunity cost)

You could win $500,000 ($25,000 for 20 years)

Red to win - which wheel will you play?

GIS jobs Programming an asset or required

GIS jobs Programming not required

Source: GIS4107 Students job search

(It’s never too early to start looking for a job)

Page 17: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

2. More useful to employer; 3. More $

10 sec per transfer to tab-delimited file 40,000 sec or ~11 hrs per file50 files to process 550 hours (15 weeks)

4,000 data points

20 min to code demo for boss10 min to modify code to run for all files inspecified folder42 seconds to let boss know task is completeTask completed in 30 min, 42 seconds

I can’t code, so this will takeme more than 15 weeks.

I can code, so this will takeme ~30 min.

Page 18: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

2. More useful to employer; 3. More $

Add custom menus, toolbars, menu items, buttons, and tools to ArcGIS

Customize a Web mapping application to perform on-line geoprocessing

Create a stand-alone, custom GIS

Get a job with ESRI and help build ArcGIS

Page 19: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video
Page 20: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

4. Better understanding of GIS software

Page 21: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

Why would I ever want to learn to program …

… in a GIS Certificate program ?!

1. Better chance of getting a job2. More useful to employer 3. More $4. Better understanding of GIS software

Page 22: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

GIS in the World

1975

Page 23: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

Transformation required …

PopulationPollution…

Source:

Page 24: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

You are the Transformation Generation …

… that must create a sustainable future.

“The significant problems we have cannot be solved at the same level of thinking with which we created them.” - Albert Einstein

Page 25: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

GIS is part of the solution

“Our world is changing, presenting many challenges. GIS professionals, working together, will author and share the knowledge that will make a difference. I strongly believe that this collaboration will help us bring peace and prosperity as well as a more sustainable world.”

Jack Dangermond, ESRI President

From “Manage and Shape Our Changing World with GIS”. Read entire article here.

Page 26: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

GIS is everywhere …AgricultureArchaeologyArchitecture, Engineering, and ConstructionAtmosphere, Climate, and WeatherBusiness GISCadastral and Land RecordsCartography and Map ProductionCensus and GeodemographicsClimate ChangeDefense and IntelligenceDisaster Management and Emergency ResponseEcology and ConservationEducationElectric UtilitiesEmergency Medical Services/FireEnvironmental ManagementFacilities ManagementForestry, Wildlife, and Fisheries ManagementHealth and Human ServicesHomeland SecurityInsuranceLaw Enforcement and Criminal Justice

LogisticsMining and GeosciencesOcean, Coastal, and Marine ResourcesParks and Natural ReservesPetroleumPipeline and Gas UtilitiesPublic WorksRemote Sensing ImagerySpatial Data InfrastructureState and Local GovernmentSurveyingSustainable Development and Humanitarian AffairsTelecommunications and Location-Based ServicesTransportationTribal/Indigenous GIS programsWater ResourcesWater, Wastewater, and Stormwater

List of “tracks” from ESRI International User Conference 2009http://proceedings.esri.com/library/userconf/proc09/index.html

Page 27: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

Examples of how GIS is used …

Example articles from ArcNews from ESRI

Researchers Study Carbon Footprints with GISImpact of Climate Changes on Gray Whale Feeding Grounds Tracked with GISCase Study: GIS Analyzes Deforestation and Its Impacts on Biodiversity in BoliviaGroundwater Quality Mapped in PakistanTraffic Data Visualized Using GISCity Turns to GIS to Model Flooding of Mighty MississippiGIS Helps Document Ravages of Australian FiresDisaster Response and Homeland Security System Uses GISHow Government Fleet Managers Can Lower Costs with ArcLogisticsNorwegian County Maps Biogas Production PotentialU.S. Forest Service Assesses Postfire Threats with GISGIS Is Used to Help Manage Tree MaintenanceFlorida Water Agency Maps Consumption with GISGIS Used to Create Earthquake Soil Liquefaction ModelsGoing Green with GISHow Does a Garden City Grow? With a Hand from GISMobile GIS: ArcPad and GPS Help Assess Health of British Columbia RangelandsAnalyze Hurricanes Using Web GIS

Page 28: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

Never been a more exciting time in GIS

Mobile computing

GPS

maps.google.com

SkyHook

Twitter (e.g. @CanadianGIS)

LinkedIn

FaceBookGarmin 305 GPS-enabled HRM

Your browser as geolocator …

Strava(one of my rides)

Page 29: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

Cool data collection

Page 30: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

IFTTT Channels

Page 31: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

About Me

GIS/Data Management ExpertGeological Survey of Canada(Aug 1991 – Nov 2000; Apr 2002 – Present)

GIS ConsultantESRI Canada – Ottawa (Dec 2000-Mar 2002)Specialized in ArcGIS/ArcObjects and ArcIMS consulting and training

Page 32: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

My Programming Experience

1980: Fortran on Carleton U. Mainframe (slower than my Mac)Programming assignments for engineering course.No display terminal. Used a line printer to write and run programs.

Self-taught …

1986: GW-BASIC on an IBM XT (8 MHz, 640k RAM).

1988: BASIC on MacIntosh Plus (8 MHz, 1 Mbyte RAM)

1989: QuickBASIC on IBM AT clone (16 MHz, 1 Mbyte RAM)

Wrote programs for • Automating Electromagnetic Compatibility testing procedures and plotting HPGL test results.• Raster processing (display, format conversion, localized regression analysis, histograms, scatter

diagrams, etc.) • Recording data from an A/D Converter that I built • Basic GIS processing point-in-polygon, polygon area, etc. for a university course.

Page 33: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

My Programming Experience (cont’d)

1990: VisualBasic 2.0 on IBM 386 (32 MHz, 2 Mbyte RAM)

1991: ArcInfo Workstation/AML on Unix (60 MHz, 64 Mbtye RAM)Self-taught and wrote many programs related to data pre-processing (Arc), map production (ArcPlot) and raster processing (Grid). Worked on Unix workstation for 9 years and developed expertise with csh, sed, grep, uniq, sort, etc. and AWK (!). Cost ~$45,000 (1.3 Gbyte hard drive cost ~$5,000)

2000-2005: VBA/VB6/ArcObjects (1396 MHz, 1024 Mbyte RAM)

2005-2010: ASP.NET - C# (~2400 MHz, 2048 Mbyte RAM)

2010 - Present: Apps involving Windows apps & services, Silverlight, jQuery, ArcGIS customization with VB.NET and C#, geoprocessing automation with Python and ArcPy … (~3300 MHz – 6 core, ~8000 Mbytes RAM)

Page 34: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

My teaching experience

Algonquin College – built and taught …GIS 8746 – Raster GIS Fundamentals (1998 - 2001) GIS 4207 – GIS Customization I (2002- )

GIS 4307 – GIS Customization II (2006-2008)

GIS 4107 – Visual Programming (2007- )

ESRI Canada – Ottawa Office (Dec 2000-Mar 2002). ESRI certified trainer for …

“Intro to Programming ArcObjects with VBA”, “Intro to ArcIMS”“Customizing ArcIMS with HTML & JavaScript

Page 35: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

My role in GIS4107

Help develop your passion for learningConvey value of programming and GISYou learn by doing. I help you do.Share non-programming things I have found useful in my career and life

Page 36: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

Marks from a real student

GIS4107 GIS4207

What happened between Quiz #2 and #3?

Page 37: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

I shared my story …

Page 38: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

Enough about me, what about you?

Name

Apart from GIS and programming, what do you enjoy in life?

On assessment quiz … What do you hope to get out of this course (e.g. particular skills or experience)?

Page 39: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video

If you’re going to watch a non-Python video …

… watch this one

Page 40: GIS 4107 – Introduction to Programming Instructor: David Viljoen (Last name pronounced vil-john) gis4x07@gmail.com Video