76
ESRI Developer Summit 2008 ESRI Developer Summit 2008 1 1 Sterling Quinn Sterling Quinn Jeremy Bartley Jeremy Bartley David Wilcox David Wilcox Implementing and Optimizing ArcGIS Server Map Implementing and Optimizing ArcGIS Server Map Caches Caches

Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

ESRI Developer Summit 2008ESRI Developer Summit 2008 11

Sterling QuinnSterling QuinnJeremy BartleyJeremy BartleyDavid WilcoxDavid Wilcox

Implementing and Optimizing ArcGIS Server Map Implementing and Optimizing ArcGIS Server Map CachesCaches

Page 2: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Schedule

• 75 minute session– 60 – 65 minute lecture– 10 – 15 minutes Q & A following the lecture

• Cell phones and pagers

• Please complete the session survey – we take your feedback very seriously!

Page 3: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Introductions

• Who are we?– Sterling Quinn: ArcGIS Server Product Engineer– Jeremy Bartley: ArcGIS Server Product Engineer– David Wilcox: ArcGIS Online Product Engineer

• Who are you?– Who’s created a map cache before?– Who’s created large map caches (more than a few hours to

create)?– Who doesn’t know what a map cache is?

Page 4: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

What to expect in this session

• Basic to advanced topics• 9.2 and 9.3 solutions

• Outline– What is map caching?– Why should I cache?– How to create a cache– Common caching questions– Case study: ArcGIS Online– 9.3 improvements– Q & A

Page 5: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

What is map caching?

Page 6: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

What does it mean to cache a map service?What does it mean to cache a map service?

•• A cached service has a set of map images that have A cached service has a set of map images that have been prebeen pre--rendered for rapid display.rendered for rapid display.

•• You create map and globe service caches at preYou create map and globe service caches at pre--determined scale levels.determined scale levels.

1:500,000

1:250,000

Page 7: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

The cached images are stored on diskThe cached images are stored on disk

Page 8: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Why cache a map service?Why cache a map service?

•• Which is faster?Which is faster?

–– Let the server draw the map Let the server draw the map OROR

–– Get the image from a Get the image from a prebuiltprebuilt cache cache

•• By caching, you only have to render the map By caching, you only have to render the map once: When you create the cache.once: When you create the cache.

•• Caching is an Caching is an investmentinvestment..

Page 9: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Industry StandardIndustry Standard

•• Google Maps and Google EarthGoogle Maps and Google Earth•• Microsoft Virtual EarthMicrosoft Virtual Earth•• Yahoo! MapsYahoo! Maps•• ArcGIS OnlineArcGIS Online•• othersothers……

•• You want You want performanceperformance, , scalabilityscalability, and , and high qualityhigh quality!!

Page 10: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

•• Shaded ReliefShaded Relief•• Transparent LayersTransparent Layers•• MaplexMaplex LabelingLabeling

•• LowLow--res reliefres relief•• Solid colorsSolid colors•• AnnotationAnnotation

Keep Cartographic Quality and Performance with ArcGIS Keep Cartographic Quality and Performance with ArcGIS Server cached map servicesServer cached map services

Page 11: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Demo

• Viewing a high-quality cached map service

Page 12: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Why should I cache?

Page 13: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

““PrePre--cached map dayscached map days””

•• Dynamic mapsDynamic maps–– Not scalableNot scalable–– Will Will NEVERNEVER be as fast as cached mapsbe as fast as cached maps

•• ““SimpleSimple”” Cartography Cartography –– Simple maps to aid in performanceSimple maps to aid in performance–– Not simple in map authoringNot simple in map authoring----defined by XML (defined by XML (ArcIMSArcIMS))

Page 14: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

““PrePre--cached map dayscached map days””

•• Map authoring was for the developerMap authoring was for the developer–– Complicated map authoring led to the disconnect between GIS Complicated map authoring led to the disconnect between GIS

Analysts and GIS DevelopersAnalysts and GIS Developers–– Caching encourages non GIS developers to get involved in Caching encourages non GIS developers to get involved in

putting maps on the webputting maps on the web

•• Hated by CartographersHated by Cartographers–– Simple cartography for performance was not aesthetically Simple cartography for performance was not aesthetically

pleasingpleasing

Page 15: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Maps on the web in today's worldMaps on the web in today's world

•• Maps for general public consumption MUST be cachedMaps for general public consumption MUST be cached

•• Cache + Dynamic services in web applications (while Cache + Dynamic services in web applications (while improved at 9.3) is not as scalable for mass improved at 9.3) is not as scalable for mass consumptionconsumption

Page 16: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Maps on the web in today's worldMaps on the web in today's world

•• Data that is truly dynamic (query and geoprocessing Data that is truly dynamic (query and geoprocessing results, changing data) should be treated as graphics in results, changing data) should be treated as graphics in the client applicationthe client application

•• Dynamic maps are for:Dynamic maps are for:–– INTRANET applicationsINTRANET applications–– Applications with a small, highlyApplications with a small, highly--focused audiencefocused audience

Page 17: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Other caching solutions

• Microsoft MapCruncher– Cuts up an existing single scale map

• OSGEO WMS-C Tile Caching– Prototype spec for building cache from WMS services

• KaMap pre-caching system– Works off of Minnesota MapServer

• Etc.

Page 18: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Why canWhy can’’t you just cut an existing single scale t you just cut an existing single scale thematic map? thematic map?

Page 19: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

The ArcMap advantageThe ArcMap advantage

•• The most challenging part of a cached map services The most challenging part of a cached map services solution is in the map authoringsolution is in the map authoring–– Not Not orthosorthos or imageryor imagery……that is easythat is easy–– ButBut……Street, Street, TopoTopo, Relief (see Google Maps), , Relief (see Google Maps), LanduseLanduse, etc. , etc.

mapsmaps–– A street map service cached at 20 levels is not one map, but A street map service cached at 20 levels is not one map, but

20 different maps integrated together20 different maps integrated together

•• ArcMap allows you to create a highArcMap allows you to create a high--quality map at quality map at many scale levels.many scale levels.

Page 20: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Example…

• You are the GIS Analyst at a county government. Your boss would like you to build a cached map service of your county. She would like you to build this map so that it can be viewable from 1:1,000,000 down to 1:10,000.

• Easy right?

Page 21: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

--122.25122.25, , 37.7537.75

Page 22: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

How to create a cache

Page 23: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Author the map

• Choose a set of scale levels and design at those– ArcGIS Online, Google Maps, VE scales, or your own?– Add the scales to the ArcMap dropdown list– Make the map look good at each scale

Page 24: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Authoring tips

• Copy layers – Can set a different scale range and symbology for each copy

• Group layers by scale level– Only have to set the scale range at the group layer level

Page 25: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

More authoring tips

• Set the Full Extent to the area that you want to cache– ArcMap allows a custom Full Extent

• Use the Maplex labeling engine

Page 26: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Tips for the background color

• Transparent color defaults to near-white (253, 253, 253)

• Avoid using a background color that’s already in your map

Page 27: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Anti-aliasing

• Smooths edges of labels and lines by blending them with the background– Choose background color carefully!

• Improves display quality (over standard rendering in ArcMap)• Cannot set this up in ArcMap. Use the caching tools. • Takes longer to cache

Page 28: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Publish the map as a service

• Use either ArcCatalog or Manager

• Raise the default Maximum Number of Instances if necessary– Access this setting in the Service Properties– Default is 2 instances max. If you have more server power, you

can raise it.

• Must start the service before caching

Page 29: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Create the cache

• Must do this from ArcCatalog or ArcToolbox

• Use the Caching tab of the Service Properties

Page 30: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Caching jobs are defined by…

• Cache tiling scheme• Full extent of the map service (derived from the data

frame full extent in the source MXD)

• For example:– Tiling origin is -180, 90– Map service extent is the bounding box of Colorado– Tiles will only be generated within and around the bounding box

of Colorado

• The tile rows and columns will be referenced from the tile origin (-180, 90)

Page 31: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Demo

• Basic cache creation

Page 32: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Two types of caching scenarios

1. Small scope: Cities, Counties, etc.

2. Large scope: The continental United States down to 1:10,000

• The geographic extent and the levels of detail (scale levels) of the area of your caching job directly influence the amount time you will need to devote to the caching process

Page 33: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Generating a large map cache

• Can be time consuming

• Tip: Create the cache for a small area before building the whole thing.

1. Set a custom Full Extent on your map to a small area.2. Build the test cache3. Examine appearance of symbology, labels, etc.4. Test the performance of the cache in your preferred client

application5. Make necessary adjustments and build again

Page 34: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Factors that influence cache creation time

• Geographic extent• Number and choice of scale levels• Complexity of the map

– If it takes a long time to draw in ArcMap, it will take a long time to cache.

• Anti-aliasing – Generally twice as long to generate

• Data source type– Enterprise geodatabase vs. local copies of data

• Server resources – For example, SOC machines and available service instances

• Network bandwidth between SOC machine and cache directory

Page 35: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Tile size influences cache creation time

• Larger size produces fewer tiles– Less disk space (block size)– Faster creation– Easier to manage

• Smaller size produces more tiles– Allows partial update of the display

• Takes approximately 5X as long and takes up 1Gb more of space when creating a cache at 128x128 tile size versus 512x512 tile size with the same data (Hawaii)

• ArcGIS Online uses 512 X 512• Google Maps and Virtual Earth use 256 X 256

Page 36: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Tips for large scope caching jobs

• When caching very large geographic areas break up caching job to distinct areas.– Use UpdateMapServerCache to cache each area– You can use a script if you have many areas– See blog post: Strategies for large caching jobs

Page 37: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Using the cache

• Map caches can be used in– ArcMap– ArcReader– Web Mapping Applications– ArcGlobe– ArcGIS Explorer– Google Maps– Virtual Earth– Etc.

Page 38: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Using map caches in ArcMap

• Gives you a high level of control of how you view the cache

• Continuous zoom– Associates current view with a level of detail in the map cache and then

resamples up to match the current view– Image quality can vary depending on how far away you are from a

cached scale

• Can easily blend with other services and data

• Reprojection supported– ArcMap reprojects an existing tile instead of generating a dynamic map.

Some performance lost.

Page 39: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

ArcMap creates a local cache

• Improves performance for areas you’ve already visited

• Can get out of sync with server side cache

• Cache administrator must notify clients to clear their caches when an update is available

• Clear cache in layer Properties

Page 40: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

ArcGIS Server Web mapping applications

• 9.2 Service Pack 2 or above highly recommended– Allows for easier overlay of caches

• To get the performance benefit of the cache:– Navigation is limited to the cached scales– Cached tiles cannot be projected on the fly

• Use a common tiling scheme when overlaying caches– Don’t have to cache at all scales

Page 41: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Using map caches in 9.2 Service Pack 2 and above

• Internet Explorer 6 with transparent PNG images.– IE 6 and earlier does not honor transparency in PNG24– Best practice is to use PNG8 or PNG32

• In .NET Web mapping applications with IE 6– If you try to use PNG24 for an overlay cache, the Web

application will generate the image dynamically, thereby slowingperformance.

• In Java Web mapping applications with IE 6– If you try to use PNG24 for an overlay cache, you will not be able

to see what’s below it.

Page 42: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Updating the cache

• Necessary if you want to see changes in your data

• Gives you the performance benefit of caching, even with changing data

Page 43: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Will updating allow me to cache my data?

• How up to date does my map need to be?– Determines update frequency– If real-time display is not required, you may be able to cache

with scheduled updates – If real-time data display is required, use graphics layer or

dynamic map

• How big is my cache?– Determines update time– What is the acceptable amount of time that my cache update can

take before it becomes inefficient?

Page 44: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

How to update a cache

• Manually: Launch update tool from Caching tab of the Service Properties

• Automatically: Use scripting to call the update tool– Schedule a job on your operating system to run the script– See the ArcGIS Server Development Blog for an example Python

script

• Note: Users must clear local cache to see updates– ArcGIS Desktop and ArcGIS Explorer maintain these local

caches

Page 45: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Common Caching Questions

Page 46: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

How do I choose the best cache settings?

• Choose your closest scale level carefully– Zoom in just as far as you need without getting any closer

• Use fused caches whenever possible – Create logical groups of layers and overlay the fused caches to

get a multi-layer effect

• Choose one tiling scheme for all your caches– But you don’t have to create tiles at all of the scale levels

Page 47: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

How do I create tiles for only some of the levels in my tiling scheme?

1. Cancel Generate Map Server Cache while in progress2. Run Update Map Server Cache and check only the

desired scales

Page 48: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Case study:

Creating caches for ArcGIS Online

Page 49: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

ArcGIS Online is…

• A set of GIS services hosted by ESRI

• Includes a variety of maps– Imagery– Street map– Shaded relief– Etc.

• All map services on ArcGIS Online are cached

• Demo...

Page 50: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Planned scales and tiling scheme ahead of time

• Chose one tiling scheme for all caches– Chose scales that wouldn’t overlap at 180 degrees longitude– This tiling scheme is available on the ArcGIS Server

Development Blog

• Cartographers designed the maps around these chosen scales

• Cached each map only at the scales appropriate for its intended use

Page 51: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Chose cache settings carefully

• Used anti-aliasing with lines and text

• PNG8 format for overlay services – Boundaries, Street network for overlaying imagery, etc.

• Used JPG image format for base maps– Street map, imagery, etc.

Page 52: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Set “Tile Compression Quality” = 90 for JPG tiles

• Higher quality than default JPGs– Default quality is 75– Increasing to 90 removes “chatter” around text and linework

• Tile sizes about 30% greater than default JPGs– A reasonable increase

Page 53: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Image Format comparison

PNG24JPG75(Current Service)

JPG100JPG90

Page 54: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Made small test caches of a known area

• Chose Salt Lake City for its mix of landscapes– Urban and rural– Flat and mountainous

• Used test caches to verify map design choices– Did the maps look good at all scales?

• Ran code to report the rows and columns in the test caches– This gave an estimate of the size of the final cache– See blog post Working with map caches programmatically to get

the code

Page 55: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Monitored the caching jobs

• Used Windows Performance Monitor (perfmon) to see where hardware was being stressed during caching

Page 56: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Copied caches to production server

• Windows Copy/Paste inefficient for moving large numbers of files– Large caches contain millions of files– Windows indexes files before copying

• SecureCopy a more reliable option– Reports if there are failures

• Experimented with other methods (xcopy, RoboCopy, imaging software, scripting zip file creation, etc.)

• Always looking for new alternatives...

Page 57: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Additional work

• Created globe caches– Overlayed map cache on globe and then cached the globe– This factored into original choice of scales – See blog post: Creating a 3D globe cache from a 2D map cache

• Configured web server to return a “No data” tile for uncached areas– See blog post: Configuring your server to return a “Data not

available” tile for empty map cache areas

Page 58: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Caching improvements in ArcGIS Server 9.3

Page 59: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

New workflowNew workflow•• Set the tiling scheme, then create the tilesSet the tiling scheme, then create the tiles

–– Uses Manage Map Server Cache Tiles tool for both Create and UpdaUses Manage Map Server Cache Tiles tool for both Create and Updatete

Page 60: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Caching tab is also available in ManagerCaching tab is also available in Manager•• You can use it to:You can use it to:

–– Define the tiling scheme for a service Define the tiling scheme for a service –– Enable cache on demandEnable cache on demand

•• You cannot use it to launch the caching toolsYou cannot use it to launch the caching tools

Page 61: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Easier to select tiling schemesEasier to select tiling schemes

•• Select tiling scheme from common mapping Select tiling scheme from common mapping solutions:solutions:–– ArcGIS Online, Microsoft Virtual Earth, Google MapsArcGIS Online, Microsoft Virtual Earth, Google Maps–– Allows for successful overlay of cachesAllows for successful overlay of caches–– Your map must match the coordinate system of the service Your map must match the coordinate system of the service

whose tiling scheme youwhose tiling scheme you’’re using (WGS 84 for ArcGIS Online, re using (WGS 84 for ArcGIS Online, WGS 84 Web Mercator for VE/Google)WGS 84 Web Mercator for VE/Google)

Page 62: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Other tiling scheme options

•• Select tiling scheme from an existing serviceSelect tiling scheme from an existing service

•• Browse to a tiling scheme file (9.2 solution)Browse to a tiling scheme file (9.2 solution)

Page 63: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Cache on demand

Page 64: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

OnOn--demand cachingdemand caching

•• Creates tiles as they are visited by users and adds them Creates tiles as they are visited by users and adds them to your cacheto your cache

•• First visitor to an area must wait for the tiles to be First visitor to an area must wait for the tiles to be createdcreated

•• Enable in ArcCatalog or ManagerEnable in ArcCatalog or Manager––Use the Caching tab Use the Caching tab

of the Service Propertiesof the Service Properties

Page 65: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Performance tips for on-demand caching

•• Use with ArcGIS Server Internet connectionsUse with ArcGIS Server Internet connections

•• Tip:Tip: PrePre--create tiles for areas that you anticipate will create tiles for areas that you anticipate will be most popular, then create the rest on demandbe most popular, then create the rest on demand

Page 66: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Cache by feature classCache by feature class

•• Cache only within boundary of features you supplyCache only within boundary of features you supply–– You can supply a feature class with just one featureYou can supply a feature class with just one feature–– Avoid numerous features or geographically small featuresAvoid numerous features or geographically small features

•• Saves time and disk spaceSaves time and disk space

•• California example:California example:

Page 67: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Cache by feature class

•• Set the feature class in the Manage Map Server Cache Set the feature class in the Manage Map Server Cache Tiles toolTiles tool

•• Optionally, track the status of which features have been Optionally, track the status of which features have been cachedcached

•• Tip: Create the rest of the tiles on demandTip: Create the rest of the tiles on demand

Page 68: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Fixed memory leak / locking situations

•• Affects caching scenarios with:Affects caching scenarios with:–– SDC dataSDC data–– Compressed File Geodatabase dataCompressed File Geodatabase data–– TIFF imagesTIFF images–– MrSIDMrSID imagesimages

Page 69: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Add and remove scales from an existing cache

•• Use the Manage Map Server Cache Scales toolUse the Manage Map Server Cache Scales tool

•• Edits the cache configuration and the cache folders on Edits the cache configuration and the cache folders on diskdisk

Page 70: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Improvements to ArcMap as a client

•• Improved display of resampled cached tilesImproved display of resampled cached tiles

–– Improves the look of Improves the look of ArcGIS Online Street MapArcGIS Online Street Map

–– Helps eliminate issues like Helps eliminate issues like ““disappearing boundariesdisappearing boundaries””::

Page 71: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Improvements to ArcMap as a client

•• Zooming in past the lowest level uses a resample of the Zooming in past the lowest level uses a resample of the last available resolutionlast available resolution

•• New Caching tab on the layer propertiesNew Caching tab on the layer properties

9.2 9.3

Page 72: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Client-side caching improvements

• Clients can opt out of caching locally

• Server administrators can prohibit local caching of tiles on client– Set in Caching tab of Service Properties– Use this option if you’re updating your cache frequently

Page 73: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

WMS services take advantage of cache

1.1. Enable the WMS capability on a cached map serviceEnable the WMS capability on a cached map service2.2. The WMS service will use the cached images instead The WMS service will use the cached images instead

of generating an image on the flyof generating an image on the fly

•• Only uses cached images when there is no need to Only uses cached images when there is no need to change projection, layer order, layer visibility, change projection, layer order, layer visibility, background, etc.background, etc.

Page 74: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

Updated documentation

• Caching Help greatly expanded between 9.2 and 9.3

•• Web help Web help is constantly updatedis constantly updated–– Web Help is available at 9.3 Beta (requires a login): Web Help is available at 9.3 Beta (requires a login):

http://http://webhelp.esri.comwebhelp.esri.com

•• ArcGIS Server Development Blog ArcGIS Server Development Blog posts address posts address specific problems and are later moved to the web help specific problems and are later moved to the web help

Page 75: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

9.3 caching demo

1. Open ArcMap and show projection2. Build a full cache for small scales (zoomed out)3. Create the rest of the tiles on demand

Page 76: Implementing and Optimizing ArcGIS Server Map Caches · 2008-06-26 · Caching jobs are defined by… • Cache tiling scheme • Full extent of the map service (derived from the

In ConclusionIn Conclusion……

•• Slides and code will be available on EDNSlides and code will be available on EDN

•• Please fill out session surveys!Please fill out session surveys!

•• Still have questions?Still have questions?1.1. Tech talk, Meet the TeamTech talk, Meet the Team2.2. ““Ask a DeveloperAsk a Developer”” link on web pagelink on web page

ESRI Developer Summit 2008ESRI Developer Summit 2008 7676