77
Geoprocessi ng By: Nima Khalili Moghadam Ehsan Hamzei

Geoprocessing

Embed Size (px)

Citation preview

Page 1: Geoprocessing

Geoprocessing

By: Nima Khalili MoghadamEhsan Hamzei

Page 2: Geoprocessing

Content 1- Geoprocessing (Big Picture) 2- Geoprocessing in Arc GIS

2-1 Different Procedures 2-2 About Data Sources 2-3 Result from Running Tools 2-3 Geoprocessing Settings

3- Working With toolboxes 3-1 Working With toolsets and tools

Page 3: Geoprocessing

Geoprocessing? A GIS provides a spatial framework to

support decisions to help manage the natural and man-made environment and resources of the earth.

Geoprocessing allows you to define, manage, and analyze the information used to form these decisions.

Page 4: Geoprocessing

Geoprocessing? The concept of Geoprocessing is based

on a framework of data transformation. A typical Geoprocessing operation takes

an input dataset, performs an operation on that input dataset, and returns the result of the operation as an output dataset.

Page 5: Geoprocessing

Geoprocessing: The big picture Geoprocessing is one of the most

powerful components of a GIS. A GIS is composed of a GIS database and software tools used to manipulate the data from that GIS database

Page 6: Geoprocessing

What problems can Geoprocessing help solve? Geoprocessing can help you with an

extensive range of tasks from preparing datasets, such as extracting a subset from a larger dataset or converting datasets to a different format, to performing analyses—finding possible answers to multiple spatial questions, such as “Where is the best location?” or “Whom will this affect?”

Page 7: Geoprocessing

Introducing Geoprocessing methods Geoprocessing forms a vital part of the

work many companies do with a GIS. Countless Geoprocessing tasks may be performed on a daily basis. Such tasks include converting data from one format to another or performing analysis by creating buffers or overlaying datasets.

Page 8: Geoprocessing

Introducing Geoprocessing methods Within ArcGIS, there are different

methods available for performing Geoprocessing tasks.

The method you choose depends on the method best suited to the particular task and your personal preference.

Page 9: Geoprocessing

Geoprocessing in ArcGIS Within ArcGIS you can perform

Geoprocessing tasks in a number of ways:

Dialog Box

Command Line

Model

Script

Page 10: Geoprocessing

Geoprocessing in ArcGIS 1- Run a tool using its dialog box 2- Run tools at a command line 3- Build and run a model that runs a

sequence of Geoprocessing tools 4- Create and run a script that runs

Geoprocessing tools

Page 11: Geoprocessing

Dialog Box ExampleA dialog box is a form on which you supply the parameter values for the tool, then click OK to run the tool.

Page 12: Geoprocessing

Running tools via dialog boxes Dialog boxes guide you through the

process of running a tool by giving you a form where you specify the data and other necessary parameter values.

Page 13: Geoprocessing

Command Line ExampleAt the command line, you type the tool name and its parameter values, then press Enter to run the tool

Page 14: Geoprocessing

Running tools at the command line Regardless of the ArcGIS product (Arc

Info, Arc Editor, or ArcView) you have installed, you can access a command line in any ArcGIS Desktop application, such as Arc Map or Arc Catalog.

Page 15: Geoprocessing

Model Exampleyou can create your own models inside, or add scripts to, toolboxes. Models you create may run a chain of tools in sequence, and scripts are useful for batch processing multiple inputs, such as when converting multiple datasets to a different format

Page 16: Geoprocessing

Building a model For more complex Geoprocessing tasks

that involve multiple tools, you can create a new model by linking processes together in a graphical environment (a Model Builder window). This enables you to create a visual diagram of the steps needed to complete a Geoprocessing task. The diagram you build represents a model.

Page 17: Geoprocessing

Building a model

Page 18: Geoprocessing

Running a model You can run the model

from within the Model Builder window or from its dialog box. Variables in the model can be set as model parameters, so values for these parameters can be specified within your model’s dialog box.

Page 19: Geoprocessing

Script ExampleScripts can be written in any COM compliant scripting language, such as Python, JScript, or VBScript, and they do not have to be added to toolboxes

Page 20: Geoprocessing

Running a script In many instances, the Geoprocessing

work that must be done is repetitive. Whether it involves Geoprocessing a large number of datasets or large datasets with numerous records, these Geoprocessing tasks require automation.

To Choice for Script: 1- Export from Model Builder 2- Create a script

Page 21: Geoprocessing

Export From Model Builder

Page 22: Geoprocessing

Create Script

Page 23: Geoprocessing

When should you write a script? Scripts let you execute simple processes

that include single tools, complex processes linked together, or looping to perform batch processing on a set of input datasets.

Scripts are recyclable, meaning they can be data nonspecific and, therefore, used over and over again. They can increase efficiency because they can be executed at any time.

Page 24: Geoprocessing

About Data Sources A data source is any geographic data used as

input to or output from a Geoprocessing tool. Supported data sources include geodatabase feature datasets and feature classes, shapefile datasets, coverage datasets and feature classes, computer-aided design (CAD) datasets and feature classes, SDC feature datasets and feature classes, VPF datasets and feature classes, raster datasets and raster dataset bands, TIN datasets, layers, layer files, tables, and table views.

Page 25: Geoprocessing

Feature data Geodatabase feature datasets reside

inside geodatabase, personal or ArcSDE. They contain a collection of geodatabase feature classes that share the same extent and coordinate system.

store geographic features represented as points, lines, polygons, annotation, dimensions, and multipatches and their attributes.

Page 26: Geoprocessing

Feature data A shapefile dataset (.shp) is stored in a

folder, is composed of geographic features and their attributes, and contains one feature class. Geographic features in a shapefile can be represented with points, lines, or polygons (areas).

Page 27: Geoprocessing

Feature data A coverage is stored in a workspace

that is a folder in your file system. It contains an integrated set of feature classes that represent geographic features.

Coverage feature classes can store a set of points, lines (arcs), polygons (areas), regions, routes, tics, links, and annotation (text). They can also have topology, which determines the relationships between features

Page 28: Geoprocessing

Feature data A CAD feature dataset is composed

of five read-only feature classes: points, polylines, polygons, multipatches, and annotation.

Because they are read-only, CAD feature classes can only be used by Geoprocessing tools that produce a distinct output. They cannot be used by tools that alter the geometry or attributes of the input feature class

Page 29: Geoprocessing

Feature data A Smart Data Compression dataset

contains read-only feature classes, all of which have the same attribute information but with different levels of generality in the shapes. SDC data is encrypted and highly compressed

SDC feature classes can store a set of points, lines, and polygons. They can also have topology, which determines the relationships between features that are within or between feature classes.

Page 30: Geoprocessing

Feature data The VPF dataset is a U.S. Department of

Defense military standard that defines a standard format, structure, and organization for large geographic databases. A VPF dataset contains read-only feature classes.

A VPF feature class is a collection of features (primitives) that have the same attributes. Each feature class contains point (node), line (edge), polygon (face), or annotation features and has an associated feature attribute table

Page 31: Geoprocessing

Raster Data A raster dataset is any valid raster format

that is organized into bands. A raster dataset can contain one or more bands. It can be stored in a folder in a file system, a geodatabase (personal or ArcSDE), or a raster catalog

The following raster datasets are supported: ESRI GRID, ERDAS IMAGINE, TIFF, MrSID, JFIF (JPEG), ESRI BIL, ESRI BIP, ESRI BSQ, Windows Bitmap, GIF, ERDAS and…

Page 32: Geoprocessing

Raster Data A raster catalog is a collection of

raster datasets organized in a table, in which the records define the individual raster datasets that are included in the catalog. A raster catalog is used to display adjacent or overlapping raster datasets without having to mosaic them into a large file.

Page 33: Geoprocessing

TIN Data TIN datasets can be used to display and

analyze surfaces. They contain irregularly spaced points that have x,y coordinates describing their location and a z-value that describes the surface at that point. The surface could represent elevation, precipitation, or temperature

Page 34: Geoprocessing

Table Data A table can be stored in a folder or a

geodatabase. It contains a set of data elements arranged in rows and columns. Each row represents an individual entity, record, or feature, and each column represents a single field or attribute value. Tables can contain attributes that can be joined to datasets to provide additional information about geographic data.

Page 35: Geoprocessing

Results from running tools When you run a tool from its dialog box or the

command line, a result is produced. By default, results are not overwritten. If you are working in an application with a display, such as Arc Map, results are permanently created and added to the display by default. Such settings can be changed on the Geoprocessing tab of the Options dialog box, accessed via the Tools menu of the ArcGIS Desktop application in which you are working.

Page 36: Geoprocessing

Results from running toolsAdd to DisplayTemporary Result

Overwrite

Page 37: Geoprocessing

Geoprocessing settings Geoprocessing settings include the state of

the Arc Toolbox window, the state of the Environment Settings dialog box, and any variables that have been created at the command line.

Geoprocessing settings are saved automatically between Arc Catalog sessions and when you save a map document in Arc Map.

Page 38: Geoprocessing

About toolboxes Toolboxes can contain toolsets and tools.

Toolsets can also contain toolsets and tools. You can access toolboxes from the Arc Toolbox window or the Arc Catalog tree. There is a collection of system toolboxes that you can use, or you can create your own toolboxes to store a collection of system tools (tools installed with ArcGIS) or custom tools (models or scripts) that you have created.

Page 39: Geoprocessing

About toolboxes

Page 40: Geoprocessing

Arc GIS toolboxes fundamental tools in Geoprocessing

Overlay and Proximity Surfaces Spatial and non-spatial statistics Table management Extraction

Page 41: Geoprocessing

Overlay and Proximity The first two sets of tools answer two of

the most basic questions in geography: "what's on top of what?" and "what's near what?".

Page 42: Geoprocessing

Surfaces Geographic phenomena are not limited

to discrete points, lines, and polygons, but includes data that varies continuously across the Earth's surface (or whatever planet you're studying), such as elevation, slope, rainfall, and temperature.

Page 43: Geoprocessing

Statistics One of the axioms of geography is that

things that are close together are more similar than things that are further apart. This axiom forms the basis of powerful spatial statistics tools that allow you to discover and characterize geographic patterns , along with standard non-spatial statistical tools, such as minimum, maximum, sum, frequency, mean, and standard deviation. 

Page 44: Geoprocessing

Table management ArcGIS stores data in easily accessible

tables, and the majority of workflows involve some sort table management, such as adding or deleting fields, creating relationships between tables, or creating features from columns containing coordinates.

Page 45: Geoprocessing

Extraction GIS data sets often contain much more

data than you need, and a common set of tasks is to reduce or extract data from larger, more complex data sets

Page 46: Geoprocessing

Creating New Toolbox

Page 47: Geoprocessing

Documentation Format For Toolbox

General Information

• Abstract• Keywords• Author• Constraints

Help

• Summary• Toolsets

Page 48: Geoprocessing

Adding documentation toa toolbox

Page 49: Geoprocessing

Exporting toolbox documentation to an HTML file

Page 50: Geoprocessing

Working with toolsets Toolsets and tools are contained within

toolboxes. Toolsets are used to group collections of tools together into logical groupings. A tool is a Geoprocessing operation that performs a Geoprocessing task. There are hundreds of system tools available, categorized into toolsets for ease of access.

Toolsets can be created inside writable toolboxes, and you can create toolsets inside toolsets to further organize the contents of a toolbox

Page 51: Geoprocessing

Creating/Delete a new toolset

Page 52: Geoprocessing

Adding system tools

Page 53: Geoprocessing

Adding tools from a DLL

Page 54: Geoprocessing

Creating a new model

Page 55: Geoprocessing

Adding a script (1)

Page 56: Geoprocessing

Adding a script (2)

Page 57: Geoprocessing

Practical Work

Page 58: Geoprocessing

Site Selection (working with Model) 1- Input data 2- Create our Toolbox 3- Create Model 4- Set Model Parameters 5- Create Model Structure(Functions) 6- Run Model 7- Output data

Page 59: Geoprocessing

Input Layer

Page 60: Geoprocessing

Set Model Parameter

Page 61: Geoprocessing

Set Model Parameter

Page 62: Geoprocessing

Create Model Structure (Overview)

Page 63: Geoprocessing

Create Model Structure (Example)

Page 64: Geoprocessing

Analysis Tools Used In This Work Interpolation (IDW)

Page 65: Geoprocessing

Analysis Tools Used In This Work Surface (Slope)

Page 66: Geoprocessing

Analysis Tools Used In This Work Distance (Euclidian Distance)

Page 67: Geoprocessing

Analysis Tools Used In This Work Conversion (Raster to Polygon)

Page 68: Geoprocessing

Analysis Tools Used In This Work Query Selection (Select)

Page 69: Geoprocessing

Analysis Tools Used In This Work Overlay (Intersect)

Page 70: Geoprocessing

Analysis Tools Used In This Work Overlay (Union)

Page 71: Geoprocessing

Run Model And Create Output Layer

Page 72: Geoprocessing

Output Layer (Final Result)

Page 73: Geoprocessing

Python Script

Page 74: Geoprocessing

Python Codes (Outline) 1- Import arcpy module

2- Set Geoprocessing environments arcpy.env.extent = "624948.291276022

3269578.6509806 627860.920276022 3271636.3789806"

arcpy.env.cellSize = "10" arcpy.env.workspace = “….”

Page 75: Geoprocessing

Python Codes (Outline) 3- Local variables

Example: DTM = "C:\\Dtm”

4- Process arcpy.gp.EucDistance_sa() arcpy.Union_analysis() arcpy.gp.RasterCalculator_sa() arcpy.RasterToPolygon_conversion() arcpy.Select_analysis() arcpy.Intersect_analysis()

Page 76: Geoprocessing

Documentation

Page 77: Geoprocessing

Thanks…