53
Designing, Deploying, and Using Designing, Deploying, and Using Cached Cached Map Services Map Services David Crosby David Crosby David Crosby David Crosby & Craig Craig Mesimer Mesimer

Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Designing, Deploying, and UsingDesigning, Deploying, and UsingCachedCached Map ServicesMap Services

David CrosbyDavid CrosbyDavid CrosbyDavid Crosby&&

CraigCraig MesimerMesimer

Page 2: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

What should you expect in this session?What should you expect in this session?yy

•• Basic to advanced topicsBasic to advanced topics

•• OutlineOutline–– What is map caching?What is map caching?What is map caching?What is map caching?–– Why should I cache?Why should I cache?–– Caching workflowCaching workflow–– How to create a cacheHow to create a cacheHow to create a cacheHow to create a cache–– Caching strategiesCaching strategies–– Clients to the cache Clients to the cache –– Web and desktopWeb and desktop–– More 9 3 & 9 3 1 improvementsMore 9 3 & 9 3 1 improvementsMore 9.3 & 9.3.1 improvementsMore 9.3 & 9.3.1 improvements–– Questions?Questions?

22

Page 3: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

What is map caching?What is map caching?

33

Page 4: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

What is a cache?What is a cache?

Page 5: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

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 been A cached service has a set of map images that have been prerenderedprerendered for rapid display.for rapid display.

1:500,000

1:250,000

•• Created at predetermined scale levelsCreated at predetermined scale levels•• Tiles stored on Web server for fast retrievalTiles stored on Web server for fast retrieval

55

Page 6: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Why Cache Maps?Why Cache Maps?

WorldWorld--Class CartographyClass CartographyBest Performance & ScalabilityBest Performance & Scalability

Page 7: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Internet users expect the performance of cached maps.Internet users expect the performance of cached maps.

What users expect todayWhat users expect todayWhat users expected 10 years agoWhat users expected 10 years ago•• Cached mapCached map•• FastFast•• Beautiful cartographyBeautiful cartography

•• Dynamically drawn mapDynamically drawn map•• SlowSlow•• Compromised cartographyCompromised cartography

77

Beautiful cartographyBeautiful cartographyCompromised cartographyCompromised cartography

Page 8: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

DemoDemo

•• Cache example Cache example –– Orange County Property AppraiserOrange County Property Appraiserhttp://paraster ocpafl org/Webmap3/default aspxhttp://paraster ocpafl org/Webmap3/default aspxhttp://paraster.ocpafl.org/Webmap3/default.aspxhttp://paraster.ocpafl.org/Webmap3/default.aspx

88

Page 9: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Caching WorkflowCaching Workflowgg

1.1. Select coordinate system and scales.Select coordinate system and scales.2.2. Author and publish your map document.Author and publish your map document.3.3. Set up tiling scheme.Set up tiling scheme.44 Create tilesCreate tiles4.4. Create tiles.Create tiles.

99

Page 10: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

1. Choose coordinate system and scales.1. Choose coordinate system and scales.yy

•• Choose from wellChoose from well--known tiling schemes of Web map known tiling schemes of Web map services:services:

–– ArcGIS Online (new and old)ArcGIS Online (new and old)–– Google Maps & Bing MapsGoogle Maps & Bing Maps

•• Import from file or service.Import from file or service.

•• Create your own.Create your own.

1010

Page 11: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Choosing your own scalesChoosing your own scalesg yg y

•• Build just the Build just the scales you need.scales you need.

D t i l t i dD t i l t i dLevel Scale Tiles % of total

Sample 10 level cache

–– Determine closest required Determine closest required scale.scale.

–– Double scale denominator Double scale denominator until full extent is reacheduntil full extent is reached

1 1:16,000,000 1 0.000%2 1:8,000,000 4 0.001%3 1:4,000,000 16 0.005%until full extent is reached. until full extent is reached.

–– Adjust smallest scale Adjust smallest scale to full extent of map service.to full extent of map service.

4 1:2,000,000 64 0.018%5 1:1,000,000 256 0.073%6 1:500 000 1 024 0 293%6 1:500,000 1,024 0.293%7 1:250,000 4,096 1.172%8 1:125,000 16,384 4.688%9 1:62,500 65,536 18.750%10 1:31,250 262,144 75.000%

1111

Final level is always ~75% of the total.

Page 12: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Organizing cached servicesOrganizing cached services TransportationOrganizing cached servicesOrganizing cached services•• With others in your organizationWith others in your organization

–– Departments should agreeDepartments should agreeon cache properties.on cache properties.

p

Hydrography

•• With online contentWith online content–– ArcGIS OnlineArcGIS Online–– Google MapsGoogle Maps

Bi MBi M

Land Base

–– Bing MapsBing Maps•• Best practiceBest practice

–– Use same coordinate system Use same coordinate system and tiling scheme for all caches.and tiling scheme for all caches.gg

1212

Page 13: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

DemoDemo

•• Load scales for map documentLoad scales for map document–– New tiling scheme using Web Mercator Auxiliary Sphere New tiling scheme using Web Mercator Auxiliary Sphere

(WKID 102100)(WKID 102100)–– Old tiling scheme still available, but will be removedOld tiling scheme still available, but will be removed–– http://blogs.esri.com/Support/blogs/arcgisonline/archive/2009/http://blogs.esri.com/Support/blogs/arcgisonline/archive/2009/

12/22/arcgis12/22/arcgis--onlineonline--mapsmaps--updatedupdated--andand--migratedmigrated--toto--googlegoogle--mapsmaps--bingbing--mapsmaps--tilingtiling--scheme.aspxscheme.aspx

–– Google and Bing scale levels available under the “Designing a Google and Bing scale levels available under the “Designing a map to overlay Google Maps or Bing Maps” help topicmap to overlay Google Maps or Bing Maps” help topic

–– http://webhelp.esri.com/arcgisserver/9.3.1/dotNet/index.htm#dhttp://webhelp.esri.com/arcgisserver/9.3.1/dotNet/index.htm#designing_overlay_gm_mve.htmesigning_overlay_gm_mve.htm

1313

Page 14: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

2. Author and publish map.2. Author and publish map.•• Choose a set of scale levels and design at Choose a set of scale levels and design at

those.those.–– ArcGIS Online, Google Maps, Bing scales, or ArcGIS Online, Google Maps, Bing scales, or

your own?your own?–– Add the scales to the ArcMap dropAdd the scales to the ArcMap drop--down list.down list.–– Make the map look good at each scale.Make the map look good at each scale.

•• Copy layers.Copy layers.–– Can set a different scale range and symbology Can set a different scale range and symbology

for each copyfor each copy

•• Group layers by scale level.Group layers by scale level.p y yp y y–– Only have to set the scale range at the group Only have to set the scale range at the group

layer levellayer level

1414

Page 15: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Map authoring tipsMap authoring tipsgg

•• Background colorBackground color–– Data frame (ArcMap) background = transparency colorData frame (ArcMap) background = transparency color–– Transparent color defaults to near white (253, 253, 253).Transparent color defaults to near white (253, 253, 253).p ( , , )p ( , , )–– Explicitly define a background color that is not already in your Explicitly define a background color that is not already in your

map.map.

•• Use the Maplex labeling engine Use the Maplex labeling engine –– for MXDfor MXD--based map based map services services –– as this will give the best label placement during as this will give the best label placement during caching.caching.gg

1515

Page 16: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

DemoDemoAuthor the map and publish it.Author the map and publish it.

•• Design at viewing scalesDesign at viewing scales•• Grouping layers togetherGrouping layers together•• Layer generalizationLayer generalization•• ScaleScale--level labeling considerationslevel labeling considerations•• ScaleScale--level labeling considerationslevel labeling considerations

1616

Page 17: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

3. Set up tiling scheme.3. Set up tiling scheme.gg

•• Cache creation toolsCache creation tools•• Properties of a cacheProperties of a cache

–– Tiling schemeTiling scheme•• Tile sizeTile size•• DPIDPI•• ScalesScales•• OriginOrigin

–– Image format and compressionImage format and compression–– AntialiasingAntialiasing–– Fused or multilayerFused or multilayer

1717

Page 18: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

New caching dialog box at 9.3 reflects multistep process.New caching dialog box at 9.3 reflects multistep process.

S h ili h h h ilS h ili h h h il•• Set the tiling scheme, then create the tiles.Set the tiling scheme, then create the tiles.–– Use Manage Map Server Cache Tiles tool for both create and update.Use Manage Map Server Cache Tiles tool for both create and update.–– Cannot change tiling scheme after clicking OK or Apply.Cannot change tiling scheme after clicking OK or Apply.

1818

Page 19: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Caching tab is also available in Manager in 9.3.Caching tab is also available in Manager in 9.3.

Y itY it tt•• You can use it You can use it toto–– Define the tiling scheme for a Define the tiling scheme for a service. service. –– Enable cache on Enable cache on demand.demand.

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

1919

Page 20: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Tile size and DPITile size and DPI•• Tile sizeTile size

–– Pixel dimensions of each imagePixel dimensions of each image–– 256 x 256 and 512 x 512 are de facto standards256 x 256 and 512 x 512 are de facto standards–– 256 x 256 and 512 x 512 are de facto standards.256 x 256 and 512 x 512 are de facto standards.

•• ArcGIS Online previously used 512 x 512, but now uses 256 x 256.ArcGIS Online previously used 512 x 512, but now uses 256 x 256.•• Google Maps and Bing Maps use 256 x 256.Google Maps and Bing Maps use 256 x 256.•• Use caution outside these sizes.Use caution outside these sizes.

–– Larger dimensions are faster to build, but tiles take longer to download.Larger dimensions are faster to build, but tiles take longer to download.

•• DPIDPIDPIDPI–– Resolution of the cache tiles that the server will generateResolution of the cache tiles that the server will generate–– Set higher than default (96) if clients printing cached services.Set higher than default (96) if clients printing cached services.

•• Use caution when changing defaultUse caution when changing defaultUse caution when changing default.Use caution when changing default.•• Symbol sizes are affected by dpi.Symbol sizes are affected by dpi.

2020

Page 21: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Choosing output image typeChoosing output image type

Transparency # of colors Storage Best for

JPEG No 16 million Lossy (1%-100% compression) Raster( p )

PNG8 Yes 256 Lossless Vector

PNG32 Yes 16 million Lossless Raster / Vector

PNG24 Yes (No in IE 6) 16 million Lossless Raster / Vector( )

Data Frame (ArcMap) Background = transparency color

Raster and VectorData

512 X 512 pixels

PNG32 = 189 KBJPEG = 40 KB PNG24 = 178 KB PNG8 = 92 KB

Vector OnlyData

512 X 512 pixels

PNG32 = 22 KBJPEG = 43 KB PNG24 = 21 KB PNG8 = 14 KB

A 2121

Page 22: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Tips for choosing a cache image formatTips for choosing a cache image format

Transparency # of colors Storage Best for

JPEG No 16 million Lossy (1%-100% compression) Raster( % % p )

PNG8 Yes 256 Lossless Vector

PNG32 Yes 16 million Lossless Raster / Vector

PNG24 Yes (No in IE 6) 16 million Lossless Raster / Vector( )

•• Use Use PNG8 for overlay PNG8 for overlay services.services.––Boundaries,Boundaries, streetstreet network for overlaying imagery, etc.network for overlaying imagery, etc.Boundaries, Boundaries, street street network for overlaying imagery, etc.network for overlaying imagery, etc.

•• Use Use JPG image format for JPG image format for basemapsbasemaps..––Compression quality = Compression quality = lower means smaller/faster fileslower means smaller/faster files

•• Avoid Avoid PNG24 with Web PNG24 with Web applications.applications.––IE 6 does not honor transparency in PNG24.IE 6 does not honor transparency in PNG24.

• http://blogs.esri.com/Dev/blogs/arcgisserver/archive/http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2008/10/17/Tips-for-choosing-a-cache-image-format.aspx

Page 23: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Basemaps (aerials): Image format guidelinesBasemaps (aerials): Image format guidelines

Many colorsMany colors——Continuous symbologyContinuous symbologyCompression range for JPEG: 55 (aerials) Compression range for JPEG: 55 (aerials) –– 90 (vectors)90 (vectors)

JPEG 55 / 45.5K JPEG 90 / 116K

2323

Page 24: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

AntialiasingAntialiasing

AntialiasingNo antialiasing

•• SmoothsSmooths edges of labels and lines by blending them with the edges of labels and lines by blending them with the backgroundbackground

–– Choose background color carefully!Choose background color carefully!–– Choose background color carefully!Choose background color carefully!•• Cannot set this up in Cannot set this up in ArcMapArcMap for caching for caching -- use the caching tools. use the caching tools. •• Takes longer to cacheTakes longer to cache

N t th t ti li i IS il bl ith ti i d iN t th t ti li i IS il bl ith ti i d i•• Note that antialiasing IS now available with optimized map services.Note that antialiasing IS now available with optimized map services.

2424

Page 25: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Fused or MultilayerFused or Multilayeryy

•• FusedFused–– Single image tiles for all map layers Single image tiles for all map layers

at each scale levelat each scale level–– Best performanceBest performance–– No control over individual layer visibilityNo control over individual layer visibility

•• MultilayerMultilayer–– Image tile for each map layer at each scale levelImage tile for each map layer at each scale level–– Only practical with ArcMap clientsOnly practical with ArcMap clients–– Avoid with Web applicationsAvoid with Web applicationspppp

•• Blending on Web tier reduces scalability and performance.Blending on Web tier reduces scalability and performance.•• Internet users expect the performance of fused cached maps.Internet users expect the performance of fused cached maps.

2525

Page 26: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Fused Fused vs. vs. Multilayer CachesMultilayer Cachesyy

Create Map Server Cache Tool Advanced Cached Service Properties

Fused caches are recommended for the full Fused caches are recommended for the full performance benefits of performance benefits of server server caching.caching.

Page 27: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

DemoDemoSet Up Tiling SchemeSet Up Tiling Scheme

2727

Page 28: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

4. Create tiles.4. Create tiles.

•• Manage Map Server Cache TilesManage Map Server Cache Tiles–– New tool at 9.3New tool at 9.3–– Similar to Update Map Server Cache Tiles at 9.2Similar to Update Map Server Cache Tiles at 9.2–– Allows fineAllows fine--grained control over scales that are cachedgrained control over scales that are cached

•• Launch this tool fromLaunch this tool from–– ArcCatalog by clicking “Create tiles” or “Update tiles” in the ArcCatalog by clicking “Create tiles” or “Update tiles” in the

Caching tab of Service PropertiesCaching tab of Service PropertiesCaching tab of Service PropertiesCaching tab of Service Properties–– ArcToolboxArcToolbox–– Command promptCommand prompt–– Scripting environment such as PythonScripting environment such as Pythonp g yp g y

•• Service must be started to create tiles.Service must be started to create tiles.•• Use N+1 instances where N = the number of cores on Use N+1 instances where N = the number of cores on

server.server.

2828

Page 29: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Demo: Create tiles.Demo: Create tiles.

Tools inTools in ArcCatalogArcCatalog for cachingfor caching•• Tools in Tools in ArcCatalogArcCatalog for cachingfor caching•• Cache folder structureCache folder structure

•• JavaScript applications showing cached and dynamic mapsJavaScript applications showing cached and dynamic mapsJa aSc pt app cat o s s o g cac ed a d dy a c apsJa aSc pt app cat o s s o g cac ed a d dy a c apshttp://localhost/CompMapPerform.htmlhttp://localhost/CompMapPerform.html

•• Fiddler & FirebugFiddler & Firebug

Page 30: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Demo: Create tiles.Demo: Create tiles.

Portland (Notification):Portland (Notification):•• Portland (Notification): Portland (Notification): http://mapapps.esri.com/serverdemos/mailinglist/index.htmlhttp://mapapps.esri.com/serverdemos/mailinglist/index.html

•• ArcGISArcGIS Online (Site Selection): Online (Site Selection): http://mapapps.esri.com/serverdemos/siteselection/index.htmlhttp://mapapps.esri.com/serverdemos/siteselection/index.html

•• Fiddler & FirebugFiddler & Firebug

Page 31: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Clients to Cached Map ServicesClients to Cached Map Services

•• ArcMapArcMap (2D)(2D)•• ArcGlobeArcGlobe andand ArcGISArcGIS ExplorerExplorer•• ArcGlobeArcGlobe and and ArcGISArcGIS Explorer Explorer

(3D)(3D)•• ArcGISArcGIS Web Mapping Applications Web Mapping Applications pp g pppp g pp

–– .NET, Java, JavaScript/Flex/Silverlight.NET, Java, JavaScript/Flex/Silverlight

•• ArcGISArcGIS for AutoCADfor AutoCAD•• OGC clients (Gaia, etc.)OGC clients (Gaia, etc.)•• Google Maps, Bing Maps, and Google Maps, Bing Maps, and

Google EarthGoogle Earth

Page 32: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

WMS services take advantage of cache.WMS services take advantage of cache.gg

1.1. Enable WMS capability on a cached map service.Enable WMS capability on a cached map service.2.2. WMS service uses cached images instead of generating WMS service uses cached images instead of generating

an image on the fly.an image on the fly.

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

3232

Page 33: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Using caches in Web applicationsUsing caches in Web applicationsgg

•• Navigation limited to the tiling scheme scalesNavigation limited to the tiling scheme scales•• Tiles cannot be Tiles cannot be reprojectedreprojected..•• ArcGIS Online ArcGIS Online mashupsmashups

–– Map must use Web Mercator coordinate systemMap must use Web Mercator coordinate systemMap must use Web Mercator coordinate system.Map must use Web Mercator coordinate system.–– Must use ArcGIS Online tiling schemeMust use ArcGIS Online tiling scheme

•• Google Maps and Bing Maps Google Maps and Bing Maps mashupsmashupsMap must use WGS 1984 Web Mercator coordinate systemMap must use WGS 1984 Web Mercator coordinate system–– Map must use WGS 1984 Web Mercator coordinate systemMap must use WGS 1984 Web Mercator coordinate system

–– Must use Microsoft Bing/Google Maps tiling schemeMust use Microsoft Bing/Google Maps tiling scheme

3333

Page 34: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Using caches in ArcGIS DesktopUsing caches in ArcGIS Desktopgg

•• ArcMapArcMap–– High level of control over tile appearanceHigh level of control over tile appearance

•• Continuous zoomContinuous zoom•• Supports Supports reprojectionreprojection –– not the best ideanot the best idea

–– Can easily overlay with other services and dataCan easily overlay with other services and data

•• ArcGIS ExplorerArcGIS Explorer–– Can overlay 2D cache on globe surfaceCan overlay 2D cache on globe surface–– ArcGIS Online tiling scheme recommendedArcGIS Online tiling scheme recommended

•• Must clear local cache after updateMust clear local cache after update

3434

Page 35: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Desktop clients and cache updatesDesktop clients and cache updates

•• ArcGIS Desktop and ArcGIS Explorer maintain local caches.ArcGIS Desktop and ArcGIS Explorer maintain local caches.

•• Users must clear local cache to see updates.Users must clear local cache to see updates.

•• User can disable local caching.User can disable local caching.

SS•• Server administrator can also disable local caching.Server administrator can also disable local caching.–– New at 9.3New at 9.3–– Overrides client settingsOverrides client settings

3535

Page 36: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

ClientClient--side ArcMap parametersside ArcMap parameters•• ArcMap ArcMap creates a local creates a local cache.cache.

–– Located: %temp%Located: %temp%\\esrimapcacheesrimapcache\\–– Can get out of sync withCan get out of sync with serverserver--side cacheside cacheCan get out of sync with Can get out of sync with serverserver side cacheside cache–– Administrator can allow/disallow client caching.Administrator can allow/disallow client caching.–– ArcMap users can also control caching behaviors.ArcMap users can also control caching behaviors.

Page 37: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Caching strategiesCaching strategies

3737

Page 38: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Cache size affects strategyCache size affects strategyCache size affects strategyCache size affects strategy

•• Small caches Small caches –– Create all tiles.Create all tiles.–– Update all tiles frequently.Update all tiles frequently.

•• Large caches Large caches –– Create the most accessed areas first.Create the most accessed areas first.–– Create tiles on demand.Create tiles on demand.Create tiles on demand.Create tiles on demand.–– Update strategically.Update strategically.

3838

Page 39: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Cache by feature classCache by feature class

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

–– Saves time and disk spaceSaves time and disk space

•• Optionally track theOptionally track the•• Optionally, track the Optionally, track the status of which features status of which features have been cached.have been cached.

•• http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2009/02/05/http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2009/02/05/TipsTips--forfor--cachingcaching--byby--featurefeature--class.aspxclass.aspx

3939

Page 40: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

OnOn--demand cachingdemand caching

•• Creates tiles as they Creates tiles as they are visited by users and are visited by users and add them to your cache.add them to your cache.

•• First visitor to an area First visitor to an area must wait for tiles must wait for tiles to be created.to be created.

•• PrecreatePrecreate tiles for areas tiles for areas that you anticipate will that you anticipate will be most popular.be most popular.

•• Set as a service property in Set as a service property in ArcCatalog or Manager.ArcCatalog or Manager.

4040

Page 41: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

http://hotmap.msresearch.us/http://hotmap.msresearch.us/

Page 42: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Cache by feature class + cache on demandCache by feature class + cache on demandyy

•• Southern California populated places exampleSouthern California populated places example

4242

Page 43: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Updating the cacheUpdating the cachegg

•• Necessary if you want to see changes in your dataNecessary if you want to see changes in your data•• Gives you the performance benefit of caching, even with Gives you the performance benefit of caching, even with

changing data changing data

•• Update with Manage Map Server Cache Tiles toolUpdate with Manage Map Server Cache Tiles tool–– Execute manually or via a scheduled scriptExecute manually or via a scheduled script–– See the See the helphelp for an example Python scriptfor an example Python script

4343

Page 44: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Strategic updatesStrategic updatesgg

•• Geoprocessing model can be used to update only areas Geoprocessing model can be used to update only areas that have changed.that have changed.

•• Custom geoprocessing tool:Custom geoprocessing tool:Custom geoprocessing tool:Custom geoprocessing tool:Show Edits Since ReconcileShow Edits Since Reconcile

–– Use geodatabase versioning to track changes.Use geodatabase versioning to track changes.–– Generate a feature class of where changes have occurred.Generate a feature class of where changes have occurred.gg–– Update the cache using feature class output.Update the cache using feature class output.

•• Repeat on a regular basis.Repeat on a regular basis.Repeat on a regular basis.Repeat on a regular basis.

4444

Page 45: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Update a cache using a staging server (scenario)Update a cache using a staging server (scenario)

Production ArcGIS Server Instance

Staging ArcGIS Server Instance

parcelsMap service on staging

Map service on production server has layers to support queries and TOC.

parcelsFile Geodatabase

Map service on staging server has all layers to support cache creation.

C h f ldX

Queries

Geodatabase

Cache folder

Cache folderXcopy or Securecopy

or …

Displayp y

#1#1

Sho Edits SinceSho Edits Since

#2#2

Multiuser Versioned Geodatabase

Show Edits SinceShow Edits SinceReconcile + Cache Reconcile + Cache

Rebuild PythonRebuild Python scriptscript

OneOne--Way Way RReplicationeplication

Page 46: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Globe cachesGlobe caches

•• 3D globe caches give optimal performance in ArcGlobe 3D globe caches give optimal performance in ArcGlobe and ArcGIS Explorer.and ArcGIS Explorer.

•• Image format and tiling scheme is preconfigured.Image format and tiling scheme is preconfigured.Image format and tiling scheme is preconfigured.Image format and tiling scheme is preconfigured.

•• Requires a globe service and use of globe caching tools.Requires a globe service and use of globe caching tools.

4646

Page 47: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Creating a 3D globe cache from a 2D map cacheCreating a 3D globe cache from a 2D map cacheg gg g

•• Create a 3D cache from a globe containing a Create a 3D cache from a globe containing a draped 2D map cache.draped 2D map cache.

–– Gives better cartographic quality and performance than you Gives better cartographic quality and performance than you g p q y p yg p q y p ywould get if you authored the .3dd in ArcGlobewould get if you authored the .3dd in ArcGlobe

–– This is how ESRI created the ArcGIS Online globe caches.This is how ESRI created the ArcGIS Online globe caches.gg

–– For instructions, For instructions, see see ArcGISArcGIS Server Development Blog post: Server Development Blog post: Creating a 3D globe cache from a 2D map cacheCreating a 3D globe cache from a 2D map cache

–– http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/3http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/30/Creating0/Creating--aa--3D3D--globeglobe--cachecache--fromfrom--aa--2D2D--mapmap--cache.aspxcache.aspx

4747

Page 48: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

9.3 to 9.3.1 Improvements9.3 to 9.3.1 Improvements

•• Optimized map services were introduced at 9.3.1:Optimized map services were introduced at 9.3.1:

•• Ensures designers adhere to best map design practices Ensures designers adhere to best map design practices S l d d iS l d d i•• Scale dependenciesScale dependencies

•• Mixed projectionsMixed projections•• Unsupported (slow) data types like TINsUnsupported (slow) data types like TINs

•• Using MSDs will iUsing MSDs will improve the computation time required to generate cached map services.

•• If you do not use MSD files to create your map service,If you do not use MSD files to create your map service,use the map optimization toolbar to make some decisions.use the map optimization toolbar to make some decisions.

4848

•• Will optimized map services negate the need for a cache?Will optimized map services negate the need for a cache?

Page 49: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Add and remove scales from an existing cache.Add and remove scales from an existing cache.gg

•• Use the Manage Map Server Cache Scales tool.Use 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 diskdiskdiskdisk

4949

Page 50: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Improvements to ArcMap as a clientImprovements to ArcMap as a client

•• Improved display of Improved display of resampledresampled cached tilescached tiles

–– Improves the look of Improves the look of ArcGIS Online ArcGIS Online StreetMapStreetMap

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

5050

Page 51: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Updated documentationUpdated documentation

•• Caching help greatly expanded between 9.2 and 9.3 and Caching help greatly expanded between 9.2 and 9.3 and 9.3.19.3.1

•• Web help is constantly updated.Web help is constantly updated.Web help is constantly updated.Web help is constantly updated.–– Web help is available at Web help is available at http://webhelp.esri.comhttp://webhelp.esri.com..

•• ArcGIS Server Development BlogArcGIS Server Development Blog posts address specific posts address specific p gp g p pp pproblems and are later moved to the Web help.problems and are later moved to the Web help.

–– http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/07/1http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/07/12/Strategies2/Strategies--forfor--largelarge--cachingcaching--jobs.aspxjobs.aspx

5151

Page 52: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

TrainingTraininggg

•• ArcGISArcGIS Server: Web Administration Using the Microsoft Server: Web Administration Using the Microsoft .NET Framework.NET Framework

–– Two full lessons on map cachingTwo full lessons on map caching

•• Free Live Training SeminarFree Live Training Seminar–– Implementing and Optimizing Implementing and Optimizing ArcGISArcGIS Server Map CachesServer Map Caches

•• Demo drivenDemo driven•• Focuses on strategiesFocuses on strategies•• Available from ESRI Virtual CampusAvailable from ESRI Virtual Campus

•• Visit training.esri.com for more information.Visit training.esri.com for more information.

5252

Page 53: Designing, Deploying, and Using Cached Map Services€¦ · Designing, Deploying, and Using CachedCached Map Services Map Services David CrosbyDavid Crosby & CraigCraig Mesimer Mesimer

Questions?Questions?

Thank you!Thank you!Thank you!Thank you!Please remember to fill out your survey.Please remember to fill out your survey.

5353