ArcGIS Server’s Hidden Gems
Jennifer Hughey ESRI CA/HI/NV
Agenda • Overview of ArcGIS Server editions • ArcGIS Server development team blog • Hidden gems – Printing – Identifying layer in the Web Mapping Application – Working with Task Results – Security techniques for .NET web applications – Geoprocessing tips – Caching
• Tips from tech support
2
ArcGIS Server editions and capacity levels
Three Levels of Functionality
Spatial Analysis & Editing Visualization & Mapping
Advanced Standard
Scaled by Capacity
Enterprise
Basic Data Management Workgroup Workgroup
3
ArcGIS Server 9.2: Levels of Functionality Advanced
Standard
Basic
MultiMulti-user Geodatabase Support
YES
YES
YES
Geodatabase Replication
YES
YES
YES
Mapping
YES
YES
NO
3D Globe & KML Services
YES
YES
NO
ArcView Level Geoprocessing
YES
YES
NO
Web ADF (Java or .NET)
YES
YES
NO
Network & Data Interoperability Extensions Support
YES
YES
NO
3D & Spatial Analyst Extensions Support
YES
NO
NO
ArcInfo Level Geoprocessing
YES
NO
NO
WebWeb-based Editing
YES
NO
NO
Mobile ADF
YES
NO
NO 4
ArcGIS Server development team blog • http://blogs.esri.com/Dev/blogs/arcgisserver/ • Blog posts added by ESRI staff • Content includes: – Tutorials – Sample applications – Tips and tricks – Code samples – General ArcGIS Server knowledge – Tips from ESRI Technical Support – More…
5
Printing - Common Print Task • Works with ArcGIS Server and ArcIMS Web ADFs • User may choose print size, resolution and scale • Administrator can configure properties of the task in Manager
6
Printing - Print task .NET Web ADF 9.2 • Print using an MXDbased layout • Available only for ArcGIS Server local services • Task configured in Manager and in ArcCatalog
7
Identifying a single layer • Default behavior is to identify all features from all layers in the map at the location the user clicks • Can change the code used when the identify tool is clicked
Default
– Need to know the order of layers in that map service – Determine the index position of the layers to identify Customized
string[] lids = { "15" }; // 15 is the index position of the parcel layer try
{ }
ds = query.Identify(mapFunc.Name, mapPoint, m_IdentifyTolerance, m_IdentifyTolerance, m_idOption, lids); 8
Working with task results • Displaying results in a table – The standard Web ADF controls render task results with a tree view – Sample uses a GridResults control – Also includes rows with buttons and check boxes to enable Pan, Zoom, and Select for each feature
9
QueryAttributes Task: Zooming to selected features • Extends the QueryAttributes out-of-the-box task • Automatically selects and zoom to the features
10
Security techniques for .NET web apps • Requires users to log in • Display content based on user role Login
Staff
Manager
11
Geoprocessing with ArcGIS Server • Publish tools and scripts to be used as tasks • Centralize data and processing on the server • Provide geoprocessing operations for light weight clients • Analyst expertise stored in models can be exposed to wider audiences and skill levels • No programming necessary
12
Geoprocessing Services – Author, Publish, Use • Author – designing the service – A model is authored containing the geoprocessing functionality
• Publish – creating the service – Publish a toolbox that contains a model – Publish a map document with a Tool Layer
• Use – using the service – Use the geoprocessing service in out-of-the-box clients or custom clients
13
Authoring a Model suitable for publishing • Changes will likely be required to allow existing toolboxes with models and/or scripts to be published • Things to consider when creating a model for use as a Geoprocessing Service – Data Type of Parameters – Data Management (Source, Intermediate, Output) – Symbology – Optimization
14
Parameter types • A subset of desktops data types are supported as valid parameters – Subset determined by ESRI’s outof-the-box light weight clients • ArcGIS Explorer • Web Mapping Applications
-String -Long -Double -Boolean -Date -Linear Unit -Feature Set -Feature Class* -Record Set -Table* -Table View -Raster Dataset -File -Feature Layer -Raster Layer -Layer *output only
15
Parameter types – Features and records • Feature Set and Record Set variables – Use Feature/Record Set for interactive input of features or rows – Schema defined in properties from existing layer, feature class or table • Fields • Field domains • Feature type • Symbology
• Feature Class and Table variables – Publish only as output parameters
16
Parameter Types – Layers • Layer parameter type allows clients to select from layers in a map on the server – Enables the use of datasets on the server – Gives ability to work with “non publishable” data types
• Models that use layers must be published as Tool Layers in Map Documents
17
Parameter Types - File • Publishes as input or output parameter • Can be used to upload zip files to a server – Samples in the help: http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?id=907&pid=899&topicnam e=Python_scripts_to_zip_and_unzip_data – Can send anything up to the server in a zip file and unzip on the server side
18
Data Management – Source Data • Source data, maps and models are the information the service uses to run – Needs to be accessible by the SOC account
• The Server Object Container account (SOC) executes the geoprocessing tools in a geoprocessing service • Data / Tools / Scripts must be accessible by this account • Troubleshooting technique – Login as the SOC account and run the tool you want to publish. If there is an accessibility problem, the tool will fail
19
Data Management – Data Generated by Job Submissions • The arcgisjobs directory holds data created by geoprocessing jobs • A new directory is created for each job submitted to the server – Use the %ScratchWorkspace% variable in your intermediate and output paths – A scratch file geodatabase will be in the created for each job submission – Examples: • %ScratchWorkspace%\output.shp • %ScratchWorkspace%\scratch.gdb\output
20
Symbology • Service author can set the symbology for the client to use • ESRI’s out-of-the-box clients (ArcGIS Desktop and Explorer) will render symbology set on services • When publishing a toolbox…
Variable properties
– Symbology is stored in the variables of a model • Import from a layer in the map or a layer file • Can be defined for inputs and outputs
• When publishing a model… – Symbology stored in a Tool Layer – The associated map service draws the result using the symbology of the tool layer for inputs and outputs
Tool Layer
21
Optimization • In Memory – Data can be written out to the “in_memory” workspace – Use when there is a large amount of overhead writing to disk – If output is “in_memory” the client must draw the result, therefore you must publish a toolbox – Use the “in_memory” key word
• Source Data – Models with many source datasets can be optimized by using layers in a map – Referencing layers in a map reduces the time it takes to open the data when a job is run
22
Two ways of publishing • Publish a toolbox – Creates a geoprocessing service
Published Toolbox
• Results (features, rasters, etc) are sent to the client • Client is responsible for drawing the results
• Publish a map document with a Tool Layer – A Tool Layer is a group layer in the table of contents – Creates two services, a geoprocessing service and a map service
Published Tool Layer
• Map Service is used by the server to draw the results of the geoprocessing service • Server is responsible for drawing the results – Good for large results – Results are not sent to the client
• Control over the rendering of raster results • Map layers can be used in your model 23
Using a geoprocessing service – Configuring a geoprocessing task in Manger
Add the geoprocessing service
24
Using a geoprocessing service – Configuring a geoprocessing task in Manger
Add the geoprocessing service
Add the geoprocessing task
25
Using a geoprocessing service – Configuring a geoprocessing task in Manger
Add the geoprocessing service
Configure the geoprocessing task
Add the geoprocessing task
26
Using a geoprocessing task – The Web Mapping Application client
Geoprocessing task
Model input parameters
Task results
27
Caching
• Map and globe services support image caches to significantly improve performance while delivering maps • Clients can still access the underlying data of the cached map service: – Identify, Query, Highlight feature geometry
• Before you cache… – Plan a tiling scheme for your organization – Designing maps that will be cached – Choose cache properties – Anticipate cache creation time
28
Caching - Planning a tiling scheme • Your organization may have several different base data layers that you would like to cache • Select one tiling scheme and use it for all of the maps that you will cache • Choose the number of scale levels – Increased number of scale levels means more levels to explore the map and also more storage
• Generate Map Server Cache Tiling Scheme generates a tiling scheme xml file for use when creating Map Service cache
Levels of detail
Scale levels
29
Caching - Designing maps that will be cached • Fine-tuning your map for accurate generalization, symbology, and labeling • Scale dependency – The map needs to look good at each scale level – Choose the right number of scale levels
• Text and symbols change to convey more information at larger scales
Full scale
Layer visibility changes
Labels turn on 30
Caching - Choose cache properties • Tiling scheme origin – Default origin is set to the upper left of the coordinate reference defined by the map document
• Scale levels – Standard and Custom options
• Tile output size – Smaller tile width and height may improve performance, but results in larger caches and longer creation time
• Antialiasing – Smoothes the edges of labels and lines by blending them with the background
• DPI (Dots per inch) – Used to compute the resolution of an individual pixel for the cache tile that the server generates 31
Caching - Anticipate cache creation time • Cache type – Multilayer cache - the server makes a set of cached images for each layer • Takes longer to create (more caches to generate)
– Fused cache - the server makes a set of cached images for all layers in the map
• Scale levels – The more tiles that are required to cover the map extent, the longer it will take your cache to generate – Every time you divide the scale factor by two, it takes approximately four times as many tiles to cover a square area of the map
• Server resources – For example, SOC machines and available service instances
• Map document and layer properties play a role – Advanced cartography, detailed data and labeling, complex symbology, bitmap fills and colors, etc. can increase cache time
• Determine the number of tiles that will be generated at each map scale http://arcscripts.esri.com/details.asp?dbid=15045 32
Tips from ESRI Technical Support •
Found on ArcGIS Server blog
•
Some general questions that might help you to diagnose a problem before contacting ESRI Support
•
Knowledge Base articles – Grouped into the categories •
Problems
•
How To’s
•
FAQs
•
Errors
•
Bugs
33
Resources • http://blogs.esri.com/Dev/blogs/arcgisserver/ • http://arcscripts.esri.com/ • http://webhelp.esri.com/arcgisserver/9.2/dotNet/ • Training
• http://training.esri.com • Introduction to ArcGIS Server (2 Days) • Developing Applications with ArcGIS Server Using the Microsoft .NET Framework (3 Days) • Developing Applications with ArcGIS Server Using the Java Platform (3 Days) • ArcGIS Server: Web Administration Using the Microsoft .NET Framework – This course will be available July, 2008
34
Thank You
ESRI 380 New York Street Redlands, California 92373-8100 USA Phone: 909-793-2853 Fax: 909-793-5953 E-mail:
[email protected]