38
Geoprocessing with ArcGIS Server Tim Hensley Esri St. Louis Regional Office March 2, 2011 Author Serve Use Cloud

ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

Embed Size (px)

Citation preview

Page 1: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

Geoprocessing with

ArcGIS Server

Tim Hensley

Esri – St. Louis Regional OfficeMarch 2, 2011

Author

ServeUse

Cloud

Page 2: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 2

• ArcGIS Server

– What is ArcGIS Server?

– ArcGIS Overview

– ArcGIS Server Components and Capabilities

– Working with ArcGIS Server

• Geoprocessing Services

– What is Geoprocessing?

– Geoprocessing Services Overview

– Working with Geoprocessing

Page 3: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 3

What is ArcGIS Server?

• Out-of-the-box Web GIS

– Maps

– Globes

– Web Editing

– Locators (Geocoding)

– Geoprocessing Tasks

– Geodatabase Management

• Server Technology

– Multitude of users (clients)

– Centrally managed processing

– Centrally managed data

• Development platforms

– Java

– .NET

ArcGIS Desktop

ArcCatalog

ArcGIS Server

Manager

Data

ArcGIS Server

Web Server

Internet

Web browsersMobile devices

Page 4: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

ArcGIS Server Components

• Web Server

• GIS Server

– Server Object Manager – SOM

– Server Object Container – SOC

– Manager

• Desktop

– ArcMap

– ArcCatalog

– ArcToolbox

• Clients

– Browser

– Desktop

– Mobile

– ArcGIS Online

– ArcGIS Explorer

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 4

Page 5: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

ArcGIS Server Components

• Web ADF

– Application Developer Framework

– Visual Studio .NET 2005

• Web ADF Components

– .NET assemblies

– .NET Framework 2.0

– Developer Help

– ESRI Developer Network

edn.esri.com

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 5

Page 6: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 8

ArcGIS Server Capabilities

• 2D Maps

– ArcMap (.MXD, .MSD)

– ArcPublisher (.PMF)

– Image Caching

• 3D Maps

– ArcGlobe (.3DD)

– Image Caching

• Standards Compliant

– Web Mapping Services (WMS)

– Keyhole Markup Language (KML)

• Web Editing

– Versions

– Snapping

– Undo/Redo

– Subtypes / Domains

Page 7: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 9

ArcGIS Server Capabilities

• Locators

– Address Finder

– Place Finder

• Geoprocessing Tasks

– ArcToolbox

– Model Builder

• Geodatabase Management

– Extraction

– Replication

Page 8: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 10

ArcGIS Server Resources

• Support

http://support.esri.com

http://training.esri.com

http://edn.esri.com

http://stlouis.esri.com/AGSstudio

http://webhelp.esri.com/arcgisserver/9.2/dotnet/

http://webhelp.esri.com/arcgisserver/9.2/java/

• System Design Strategies (white paper)

http://www.esri.com/library/whitepapers/pdfs/sysdesig.pdf

• ArcGIS Enterprise Security (white paper)

http://www.esri.com/library/whitepapers/pdfs/arcgis-security.pdf

• Help Files

Page 9: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 11

ArcGIS Server

Mapping

3D Visualization

Locators

Geoprocessing

Geodatabases

Web Map

Applications

ArcGIS

Mobile

ArcGIS

Online

ArcGIS

Desktop

3. ConsumeVarious Clients

1. AuthorArcGIS Desktop

ArcGIS

Desktop 2. PublishArcCatalog or

ArcGIS Server Manager

Page 10: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 12

1. Author

• ArcGIS Desktop

– ArcMap

– ArcGlobe

– ArcPublisher

– ArcToolbox

– Model Builder

– Python

Page 11: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 13

2. Publish

• ArcCatalog

• ArcGIS Server Manager

– Java

– .NET

Page 12: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

• ArcCatalog

– Publish to ArcGIS Server

– Add New Service

• Publish

– Maps

– Globes

– Locators

– Geoprocessing

– Geodatabases

• ArcGIS Server Manager

– Publish a GIS Resource

– Add New Service

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 14

2. Publish

Page 13: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 15

3. Consume

• Web Applications

• ArcGIS Online

• ArcGIS Desktop

• Google Earth

• Mobile Devices

Page 14: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 16

Leveraging Resources

• ToolShareName– A system folder anywhere on your system

• Toolbox– A geoprocessing toolbox (File or Geodatabase).

• ArcMap mxd– ArcMap, ArcScene, or ArcGlobe documents (use relative pathname

option)

• Readme.txt– Brief purpose statement, date, and contact information.

• Doc – Images used in a model diagram

– XML stylesheets for custom Help dialog, external compiled help files (.chm) referenced by tools or toolboxes

– Other files referenced in the help you provide, such as .pdf and .doc.

• Scratch– Intermediate data in models.

– Scratch file geodatabase

• Scripts – All scripts and content used by script tools

• script libraries

• Dynamic link libraries (DLLs) and executables

• ToolData– Small datasets, lookup tables, connection files to ArcSDE

Page 15: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 17

Sharing and Permissions

Page 16: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System
Page 17: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 20

Geoprocessing Services

• What is Geoprocessing?

• Geoprocessing Services

• ArcToolbox, ModelBuilder and Python

• ModelBuilder Considerations

• Publishing Considerations

• Review

Page 18: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 21

What is Geoprocessing?

• An operation for manipulating GIS data

• Data management and analysis for making

decisions

• Common geoprocessing operations:

– Geographic feature overlay

– Feature selection and analysis

– Topology processing

– Raster processing

– Data conversion

Page 19: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 22

What is Geoprocessing?

• A typical geoprocessing operation:

1. Starts with input dataset(s)

2. Performs an operation on the input

• Tools

• Scripts

• Parameters

3. Returns results as output dataset(s)

Input

Tool OutputInput Input

Output

InputOutput

Tool

Input

Tool

Parameters

Page 20: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 23

Geoprocessing Services

• GIS Functionality on the Web

1. Authored in Model Builder

2. Published to ArcGIS Server

3. Consumed

• Web Application

• ArcGIS Desktop

• ArcGIS Explorer

Page 21: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 24

Geoprocessing Services

• Advantages

– Centralizes data and geoprocessing

– Can be consumed in lightweight Web clients

– Simplifies complex tasks

• Much can be done without programming

Page 22: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 25

ArcToolbox and ModelBuilder

• ArcToolbox– Add Toolbox

– New > Model

• Drag and drop tools onto the Model

• Link components and set properties

• Model components:

– Inputs

– Outputs

– Tools

– Scripts

– Parameters

– Managed datasets

– Intermediate datasets

Page 23: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 26

ModelBuilder Considerations

• Overwrite outputs

• Geoprocessing > Environments

> Workspace > Scratch

Workspace

• Make settings at ArcMap or

ArcToolbox level, not on the

individual Model

Page 24: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 27

ModelBuilder Considerations

• Scratch Workspace

– %ScratchWorkspace% variable

– ArcGIS Server substitutes for

Server Jobs directory at

runtime

Page 25: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

Demo

Page 26: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

ModelBuilder Considerations

• Feature Set (or Record Set) allow for user input

– Schema determines the feature type

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 29

Page 27: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

Publishing Considerations

• Drag and drop Model to create a Tool Layer

• Publishing the MXD results in both Map and

Geoprocessing Services

– Both Services will always have the same name

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 30

Page 28: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

Publishing Considerations

• A Toolbox can be Published as a stand-alone Service

– Lacking TOC layers, the Model must point directly to the data

– A Feature Class must be converted to a Feature Layer

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 31

Page 29: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

• Synchronous vs. Asynchronous

– Asynchronous

• The default setting

• Client can continue

working

• Results are saved on

the Server

– Synchronous

• Client must wait for

process to complete

• Fastest and appropriate

for small result sets

Publishing Considerations

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 32

Page 30: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

• Toolbox vs. Map

– Toolbox

• Standalone

– Map Document

• ToolLayer

Publishing Considerations

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 33

Page 31: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

• Geoprocessing services should always be Pooled

– Pooled

• Instance is returned to

the Pool after process

has completed

– Not Pooled

• Instance is dedicated to

a given user

– Editing

Publishing Considerations

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 34

Page 32: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 35

Optimization with In_Memory

• Write intermediate data to Computer Memory rather than to Disk

in_memory\results

• Some rules– Tables and feature classes only

– Cannot create feature datasets

or folders

– Good for intermediate data

– Cannot edit or modify features

• Pros and Cons– Consumes internal memory

– Faster than writing to disk

– Too many features can bog-down server

– Deciding factors

• Amount of available RAM

• Number of other applications running on server consuming memory

Page 33: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

ModelBuilder Considerations

• Messages can be suppressed by encapsulating Model

into a Python Script

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 36

Page 34: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

Demo

Page 35: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 38

Geoprocessing Review

• GP Services centralize both data and tasks on the

server

• GP operations can be run through light weight clients

over the web

• Exposes spatial analysis functionality to less

experienced users

Page 36: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

Geoprocessing Review

• Use %ScratchWorkspace% variable for output paths

• Use a Feature Set for user defined input

– Record Set for user defined records

– Define symbology and schema for Feature Sets

• Important settings:

– Model Parameter

– Add to display

– Managed and Intermediate data

• GP Services can be based on either:

– Stand-alone Toolbox

– Tool Layer within a Map Document

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 39

Page 37: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

4/5/2011 ArcGIS Server - Copyright 2011 ESRI, All rights reserved 40

Geoprocessing Review

• GP Services can be either:

– Asynchronous

• Client can continue to work

• Results are saved on the Server

– Synchronous

• Client must wait for process to complete

• Fastest and appropriate for small result sets

– Results can be drawn on the server or returned to the client

• GP Services should always be Pooled

• Clients

– Web Mapping Applications

– ArcGIS Explorer

– ArcGIS Desktop

Page 38: ArcGIS Server Studio - IGICigic.org/archives-training/pres/conf/2011/Geoprocessing.pdf · ArcGIS Server Tim Hensley Esri –St ... Services (WMS) –Keyhole Markup ... • System

One Last Demo