Upload
ehsan-hamzei
View
52
Download
0
Embed Size (px)
Citation preview
Geoprocessing
By: Nima Khalili MoghadamEhsan Hamzei
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
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.
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.
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
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?”
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.
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.
Geoprocessing in ArcGIS Within ArcGIS you can perform
Geoprocessing tasks in a number of ways:
Dialog Box
Command Line
Model
Script
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
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.
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.
Command Line ExampleAt the command line, you type the tool name and its parameter values, then press Enter to run the tool
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.
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
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.
Building a model
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.
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
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
Export From Model Builder
Create Script
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.
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.
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.
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).
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
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
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.
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
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…
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.
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
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.
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.
Results from running toolsAdd to DisplayTemporary Result
Overwrite
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.
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.
About toolboxes
Arc GIS toolboxes fundamental tools in Geoprocessing
Overlay and Proximity Surfaces Spatial and non-spatial statistics Table management Extraction
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?".
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.
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.
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.
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
Creating New Toolbox
Documentation Format For Toolbox
General Information
• Abstract• Keywords• Author• Constraints
Help
• Summary• Toolsets
Adding documentation toa toolbox
Exporting toolbox documentation to an HTML file
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
Creating/Delete a new toolset
Adding system tools
Adding tools from a DLL
Creating a new model
Adding a script (1)
Adding a script (2)
Practical Work
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
Input Layer
Set Model Parameter
Set Model Parameter
Create Model Structure (Overview)
Create Model Structure (Example)
Analysis Tools Used In This Work Interpolation (IDW)
Analysis Tools Used In This Work Surface (Slope)
Analysis Tools Used In This Work Distance (Euclidian Distance)
Analysis Tools Used In This Work Conversion (Raster to Polygon)
Analysis Tools Used In This Work Query Selection (Select)
Analysis Tools Used In This Work Overlay (Intersect)
Analysis Tools Used In This Work Overlay (Union)
Run Model And Create Output Layer
Output Layer (Final Result)
Python Script
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 = “….”
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()
Documentation
Thanks…