Introduction to GIS Programming By Jun Liang Department of Geography UNC-CH.

Slides:



Advertisements
Similar presentations
How to enter the world of Python Programming for ArcGIS Or, a funny thing happened on the way from an ESRI conference By Katherine Paybins WVAGP Membership.
Advertisements

Programming Paradigms and languages
Environmental GIS Nicholas A. Procopio, Ph.D, GISP Some slides from Lyna Wiggins (Rutgers University)
Introduction to GIS and ArcGIS How a GIS works Introduction to ArcGIS The ArcGIS Interface.
IS 466 ADVANCED TOPICS IN INFORMATION SYSTEMS LECTURER : NOUF ALMUJALLY 20 – 11 – 2011 College Of Computer Science and Information, Information Systems.
A New World for Mapping John Spencer Spatial Analysis Unit October 5, 2009.
GIS Topics and Applications
Data Grids: Globus vs SRB. Maturity SRB  Older code base  Widely accepted across multiple communities  Core components are tightly integrated Globus.
What is GIS? Introduction.
Spatial Analysis, Geoprocessing,
Chapter 2: Developing a Program Extended and Concise Prelude to Programming Concepts and Design Copyright © 2003 Scott/Jones, Inc.. All rights reserved.
ESRM 250/CFR 520 Winter 2010 Phil Hurvitz (with thanks to J. Lawler & P. Schiess) Introduction to GIS and ArcGIS 1 of 48.
Geo 118/318 – Introduction to GIS Programming Dr. Jim Graham.
7. GIS Software. Overview Evolution of GIS software Architecture of GIS software Building GIS software systems Types of software Example products GIS.
Programming Logic and System Analysis
Course: Introduction to Computers
GIS Lecture 1 Introduction to GIS Buildings. Poly Streams, Line Wells, Point Roads, Line Zoning,Poly MAP SHEETS.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Building Applications.
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
Activity 1 - WBs 5 mins Go online and spend a moment trying to find out the difference between: HIGH LEVEL programming languages and LOW LEVEL programming.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
© Paradigm Publishing Inc Chapter 12 Programming Concepts and Languages.
Arc: Programming Options Dr Andy Evans. Programming ArcGIS ArcGIS: Most popular commercial GIS. Out of the box functionality good, but occasionally: You.
Introduction to InVEST ArcGIS Tool Nasser Olwero GMP, Bangkok April
Using the Google Public Data Explorer as a Learning Tool in the University Geography Classroom Thomas J. Pingel and Devin Moeller Department of Geography.
CIS Computer Programming Logic
Introduction to Spatial Analysis and Spatial Modeling
Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language.
Network Analysis with Python
Python: An Introduction
Introduction to ArcGIS for Environmental Scientists Module 1 – Data Visualization Chapter 1 – GIS Basics.
ArcGIS Network Analyst: Automating Workflows with Geoprocessing
Leveraging ArcGIS Online Elevation and Hydrology Services
Programming Concepts Chapter 3.
Python – Part 1 Python Programming Language 1. What is Python? High-level language Interpreted – easy to test and use interactively Object-oriented Open-source.
Introduction of Geoprocessing Topic 7a 4/10/2007.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
UNIT 1: GIS DEFINITIONS AND APPLICATIONS
Esri UC2013. Technical Workshop. Technical Workshop 2013 Esri International User Conference July 8–12, 2013 | San Diego, California Automating Geodatabase.
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 1: Introduction.
Introduction of Geoprocessing Lecture 9. Geoprocessing  Geoprocessing is any GIS operation used to manipulate data. A typical geoprocessing operation.
Geo 118/318 – Introduction to GIS Programming Dr. Jim Graham.
Oman College of Management and Technology Course – MM Topic 7 Production and Distribution of Multimedia Titles CS/MIS Department.
Introduction of Geoprocessing Lecture 9 3/24/2008.
GEO 5159 GIS Applications in Environmental Systems Seminar 3: Question, Models, Data, Download, Learning.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Microsoft Visual Basic 2015 CHAPTER ONE Introduction to Visual Basic 2015 Programming.
Software Engineering Algorithms, Compilers, & Lifecycle.
Geo 118/318 – Introduction to GIS Programming Dr. Jim Graham.
Esri UC 2014 | Technical Workshop | Address Maps and Apps for State and Local Government Allison Muise Nikki Golding Scott Oppmann.
Computer Language
CST 1101 Problem Solving Using Computers
Introduction to InVEST ArcGIS Tool
Metrics of Software Quality
Introduction to Visual Basic 2008 Programming
PYTHON: AN INTRODUCTION
Environmental GIS Nicholas A. Procopio, Ph.D, GISP
System Design.
Geog 192 – Urban GIS Applications
UNIT 1: GIS DEFINITIONS AND APPLICATIONS
Lecture 9 Using Python for Geoprocessing
Lecture 10 Accessing tools and environment setting in Scripts
Lecture 9 GIS-based Urban Modelling
Leveraging ArcGIS Online Elevation and Hydrology Services
Network Analysis using Python
Network Analyst – Automating Workflows with Geoprocessing
Geographical information system: Definition and components
Digital Designs – What does it take
Presentation transcript:

Introduction to GIS Programming By Jun Liang Department of Geography UNC-CH

Audiences Who might be interested in this topic? -Bored with repeating GIS operations -Do not like the default look (GUI) of Commercial software -Has difficulties in standardizing map output -Functions you need are not available in your GIS software

Preparing for GIS Programming - GIS software operations: know what are you doing - Spatial Data Models: Understand what are dealing with - Basic Spatial Analytical Functions: Have a GIS brain - Knowledge on Programming: Integer? Binary? Loops? Logical operators?

Can I do it? Question – can I write programs for GIS applications? Is it difficult to do? Answer – It depends on what do you want to do. At most time, you can, at least I believe. It is just another language – easier than most foreign languages.

Where to start?  It may already exist somewhere. If you are looking a tool, a function, which you could not find in your GIS software, you may google it first, or try to find it in a community website, such as arcscripts.esri.com.  Write your own.

GIS Interests are Growing Mapping/GeoVisualization Spatial Information Management Spatial Analysis Spatial Modeling Government Education/Research Business/Industry

Application Examples -Public Health -Environmental Studies -Urban Planning -Water Resources Management -Crime Mapping / Crime Pattern Analysis -Store Location Optimization -Internet Mapping / Routing -Transportation/Logistics

Complexity of GIS Applications Simple Complex Data manage, Mapping Query, Measurement Basic spatial analysis Advanced spatial analysis Integrated expert systems GIS programming could be used for different level applications.

Data Volume Before proceed to write programs for your GIS applications, you may already have finished data collection. The size of your data collection will affect the way you are going to code. -Large volume: multiple Gig bites -Intermediate volume: 100Mb – 1 Gig -Small volume: ~100Mb

Geo-Computation Complexity/CPU time is another factor you need to estimate, before you design your program. -Several days + -Within a day - Several hours - Several hours - Within an hour - Within an hour Issues you may need to decide: hardware and algorithm Issues you may need to decide: hardware and algorithm

Data Flow – Program Flow Chart CensusTracts (Input Features) Clip (Analysis Tools/Proximity Toolset) CensusTractsClip (in TransformScratch.mdb) StreamBuffer (Clip Features) The flow chart will explain: Spatial functions/tools you need to use Parameters for functions Output definitions Program Logic Structure/Work flow

Implementation Structures There are different ways you can implement your GIS programs, based on: -GIS software you used -Availability of tools/functions -The nature of your application (share with other people? Going to used by other people who have limited GIS experiences? Etc.)

First Approach – Write your own code without help from existing GIS software Your Research Project/Application/Model GIS functions – needed by your model Do not need spatial visualization; data management; hard to be shared or reused by other people; one time application.

Programming – on your own Some examples of the first approaches – (1)Downloading data routinely from a website and use them for your model. (2)Analyzing the average transportation cost from one point to a set of points. (location optimization.) You can use any programming languages you are familiar with, such as Java, C, etc.

Approach 2 – Customizing existing GIS software - Using macro language to customize existing GIS software: GUI focused application. Providing service to general public.

Approach 3 – Creating new functions using GIS macro/scripts GIS Software Your GIS Program Coding spatial models, or other non-spatial models with GIS macro languages, scripts.

Approach 4 – Loosely and tightly coupled integration GIS Software – Provides basic commands, macros, etc. External Program Module Loosely-Couple Architecture for integrating your Models (scripts, codes, etc) with GIS software Data

Tightly Coupled Applications GIS Software – Provides basic commands, macros, etc. Pre-compiled Programs Data GIS software can talk to some pre-compiled programs during execution – the integration usually looks seamless. It is just like that you can edit Excel object in your Word document.

ArcGIS Programming   The most recent release of ESRI’s ArcGIS® suite incorporates both Visual Basic and Python scripts. However, Python is well- suited to geoprocessing and much of the code in ArcGIS 9 that performs these types of functions is written in Python. GUI-Interface Geo-processing

Changing A Layer’s Name MxDocumentMap * Layer * ApplicationFeatureLayerRasterLayerr

LineElement ElementGeometry ColorSymbolGraphicElementFrameElement TextElementMarkerElementPolygonElement To make graphics on a map, you create objects out of the coclass under GraphicElement.

Class Diagram to help programming

Using Python for Geoprocessing ESRI chose Python as the support language for geoprocessing because: Python is easy to learn because of its clean syntax and simple, clear concepts. Python supports object-oriented programming in an easy- to-understand manner. Documenting Python is easier because it has readable code. Complicated data structures are easy to work with in Python. Python is simple to integrate with C++ and Fortran. Python can be seamlessly integrated with Java. Python is free from the Web and has a widespread community.

Scripting Functionalities

An simple python example   import arcgisscripting   gp = arcgisscripting.create()   gp.Workspace = “c :\\Data\\Canada.mdb”   gp.Buffer(”Streams”, “NoBuildZone”, 100)   gp.Erase(”LandUse”, “NoBuildone”, “BuildZone”)