Modeling - University of Arizona

Download Report

Transcript Modeling - University of Arizona

Linking a GIS to other computer programs
• Loose coupling
– Data exported from GIS/imported to statistical package
– Results returned to GIS for data visualization or display
• Tight coupling
– Gives a GIS & other programs a common user interface,
program resides outside the GIS
– Component-based software architecture
• Embedded system
– Bundles the GIS & other programs with shared memory
and a common menu interface
– Written in the GIS scripting language
Evolution of Modeling Tools
• Earliest – macro-scripting languages (ESRI AML,
IDRISI IML)
– Procedural, command line statements
• Map Calculators
• Script Tools
• Programming Standards for Interoperability
– Arcview Avenue (control and interface design)
– .Net Framework Complaint, Java-based
– Develop desktop and Internet Applications using the same
standards.
• Graphic Modeling Tools
Applications based on Map Calculator
Com Server – exposes functionality to
other applications (clients)
• ArcGIS
• IDRISI32
• Languages
–
–
–
–
–
VB
Java
C, C++
CSharp
Python
Python Scripting
Python
(python.org)
• Python is an open-source programming language
• Considered both a scripting and OOP language
• Advantages
– Easy to learn and excellent for beginners, yet
superb for experts
– Highly scalable, suitable for large projects or
small one-off programs known as scripts
– Portable, cross-platform
– Embeddable (making ArcGIS scriptable)
– Stable and mature
– A large user community
Using Python in ArcGIS
• Python Window
• Use ArcPy – provides access to Arctools
– Organized in tools, environments, functions,
classes, and modules
– “Import arcpy” command at top of script
• Import Modules and Classes
– Modules: mapping (.mapping), Spatial Analyst
(.sa) and Geostatistical Analyst (.ga)
– Classes: Environments (.env)
Example
• Environments
– Workspace
– Cell size
– Extent
– env.workspace = “C:/temp/bpgrid”
• Tools
– hardwood = Con(“trees”, 1,0,”Value = 1”)
– roadonly = Con(“roads”,1,””,”Value > 0”)
– roaddist = EucDistance(“roadonly”)
Example
•
•
•
•
•
•
•
•
•
•
•
•
•
•
>>> import arcpy
>>> from arcpy import env
>>> from arcpy.sa import *
>>> env.workspace = "C:/temp/bpgrid"
>>> hardwood = Con("trees",1,0,"Value = 1")
>>> roadonly = Con("roads",1,"","Value > 0")
>>> roaddist = Eucdistance("roadonly")
Runtime error <type 'exceptions.NameError'>: name 'Eucdistance' is not
defined
>>> roaddist = EucDistance ("roadonly")
>>> human = Con("roaddist",1,0,"Value > 200")
>>> Model1 = "hardwood" | "human"
Runtime error <type 'exceptions.TypeError'>: unsupported operand type(s)
for |: 'str' and 'str'
>>> Model1 = Raster("hardwood") | Raster("human")
>>>
MapBuilder – Graphic Modeling Tool
Flow Diagram
Loop
Distributed GIS
• Until recently GIS was applied by assembling the application
software (e.g. ArcMap) and data on the same computer and
users had to sit in one place to use it.
• Today, because of Internet and Wireless technology, application
software, databases and users can be distributed in space and
need not be located together.
• In other words the Network now allows for the other five
components of GIS, users, data, hardware, software and
procedures to be located separately.
Distributed GIS
• Distributed People
• Distributed Data
• Distributed Applications
Location of Users
Interface
Controls
Location of Applications
Data Processing
Information Creation
Location of Data
DBMS – GIS
Data Storage
Location of Study Area
Benefits of Migrating to the Internet
• Internet technologies provide high level GIS/Modeling
capabilities to diverse audiences.
• Effective method to delivering information to diverse and
dispersed audiences – method of choice for rural residents
• Users do not need to have software, hardware or data to use
applications ($$).
• Developed using standards based technology allowing
components to be utilized by other applications.
• Promotes information sharing – all using the same data.
• Promote equity – all have access to the same data.
Distributed Applications
• GIServices - Move beyond just data delivery,
tools that allow users to create new data and
execute models.
• Design tools tailored to the audience with select
spatial and statistical analysis tools.
• Design visualization for target audiences.
• Design for hardware restriction – Bandwidth.
• Provide direct linkages to databases.
Data Service
Conceptual Design of Automated Geospatial Watershed
Assessment Tool (AGWA) – a GIS-based tool
PROCESS
PRODUCTS
STATSGO
NALC, MRLC
USGS 7.5' DEM
Build GIS Database
Discretize Watershed
f (topography)
Contributing
Source Area
Characterize Model Elements
f (landcover, topography, soils)
Gravelly loam Soil
 Ks = 9.8 mm/hr
 G = 127 mm
 Por. = 0.453
intensity
Derive Secondary Parameters
look-up tables
View Model Results
link model to GIS
runoff
Build Model Input Files
10-year, 30-minute event
time
time
runoff, sediment hydrograph
Internet-based Applications
Wrapper
Model
Hydrologic/
Erosion
The User
Web Server
Spatially
Distributed Erosion
DotAGWA
GIService
Browser
Grazing
Management
Economic
Evaluation
Application Server
Simulation
Models
GIS
Spatial
Server
Database – RS/GPS
DotAGWA: Model Service
Watershed Delineation
Other GIS Software
• GRASS (Geographic Resources Analysis
Support System) – open source
– Originally developed by U.S. Army - Construction
Engineering Research Laboratory (USA-CERL)
– Primarily a raster system
– Available in Linux, Mac, Windows
– Can obtain the source code
– Resources available, including a new book
– Websites: grass.itc.it, many mirror sites
Other GIS Software
• IDRISI
– Clark University – Clark Labs (Dr. Ron Eastman)
– Original developed to support instruction
– Big international audience, worked with
Conservation International
– Raster GIS and Image Process, over 300 modules
including many modeling tools
• IDRISI Taiga
• Land Change Modeler
– Single seat license ($295 Student, $675 other)
– Website: www.clarklabs.org
Other GIS Software
• SPRING – open source
–
–
–
–
–
–
Brazil’s National Institute for Space Research
Portugues, English, Espanol, Francais
Image Processing and GIS
Available in Linux and Windows XP
Downloads
Resources are available including online support,
data, tutorials and manual – in English
– Central American Geographic Informaction
Project (http://www.procig.org)
Other GIS Software
• MapWindow – open source
– Idaho State University – Geospatial Software Lab.
– Application development platform
– MapWinGIS Active X control that allows users to
develop there own tools
– C# GIS Programmer Library called DotSpatial
– Handles ESRI shapefiles, rasters, and dbf attribute
tables.
– http://www.mapwindow.org
Other GIS Software
• List of Free GIS Software
– FRAGSTATS
• Spatial Pattern Analysis Program for Categorical Maps
• http://www.umass.edu/landeco/research/fragstats/fragstats.html
– Center for Spatially Integrated Social Science
• www.csiss.org
• Spatial Tools
– Open Source Geospatial Foundation
• www.osgeo.org
• Web Mapping tools