Wednesday
May092012

To cache or not to cache

A colleague recently asked us about offering some advice on delivering a fast web service  to a client who was using a combination of ArcGIS for Desktop and the web. The datasets are from the Ordnance Survey’s OpenData offering.

 

 

The datasets included:

1. OS Street View.

2. OS Vector Map District.

3. OS 50k  Raster.

4. OS 250k Raster.

5. OS Miniscale.

 

Their challenge was working out whether to deliver a cached map service to a client, a dynamic map service or a mixture of a cached map service and the original data as a Geodatabase? The issues he needed to deal with included the time it took to create the map caches versus performance versus utility versus cost. A multi-layered issue but ultimately it boiled down to answering the question ‘to cache or not to cache?’

Actually, his question was answered initially by another question, why bother? Consider signing up with Esri UK’s free cloud-enabled map services and become productive immediately. Leave the caching work to us. This is a route that a lot of organisations are already doing and Esri UK has been happily serving up fast, visually pleasing map services since the service went live in late 2011. However, the client in question was ‘air-gapped’ and could not connect to the internet for security reasons.

So back to the original question. Our recommendation is that it’s often best to cache your data rather than serve it out dynamically.

Server Performance

The resultant CPU and RAM for serving a cached map is tiny compared to the very CPU and RAM intensive operations of rendering the same image dynamically. Most applications will be unable to scale up to heavier use if the base map is not cached.

A map service that is cached can therefore scale very easily as more and more users are added.  Esri UK’s cloud-enabled map services are happily serving a vast number of map views a month and a high level of concurrent users with little effort.

A dynamic service would be unable to get close to the performance of a cached map service as users increase. Parity between dynamic and cached map services exists only at very low levels of usage, say one user. Also, LocalView Fusion[1] templates are designed for cached base maps and some functionality is limited when a dynamic base map is used.

Architecture

There are also architectural differences when using a cached map service:

 o   A web browser can cache tiles it has requested previously, thus reducing the number of hits each client makes on the services over time. Similarly, most users may have some sort of cache or proxy server that also performs the same task but at the network level.

 o   Web servers are designed and optimised for serving lots of files off disk and/or memory; it is how web apps should work.

 o   By comparison dynamic images usually involve a number of resource intensive tasks including: data search, results retrieval, image generation, disk I/O to save the image to disk (even when streaming as MIME[2]) and other such steps.

Other Considerations

Of course, a cached map service isn’t a magic bullet to all of one’s requirements. There are a number of issues to think about: 

  1. Time: One needs to spend time (in some cases, a lot of time) to produce the map cache. The process is dependent on many factors: the number of scales, image type and resolution to pick out three. With the need to potential roll out updates quickly, cached map services may not be the most agile option.[3]
  2. Size on disk: Disk space usage will be a concern as a map cache can take up a significant amount of space. The Esri UK map services currently have a disk foot-print of 3 terabytes (and growing) – all this has a cost in storing and managing.  
  3. Caching Processes: Resources required for creating cache – multi-servers may be required to reduce time but it increases cost. Faster servers may need to be provisioned.
  4. Update Frequency: If the data changes a lot, then it potentially means there is a need to re-cache the data; either all of it the changed portions. Workflows need to be developed to enable this introducing an overhead.
  5. Less Dynamic: If a client needs to perform client side processing such as online digitising, dynamic rendering of layers or some other function; a map cache may not be suitable.
  6. Scale limits: The largest available scale of a map cache may not contain enough detail for certain workflows and organisations.

So in some cases a more subtle and nuanced workflow may be needed such as combining the advantage of both dynamic and cached map services. For example, a client may require data to be available down to 1:500, 1:250 or 1:100 which is just not practical to build map caches using current prices and resources.  So a viable solution would be to use vector data from a File Geodatabase as a base map for these scales, then utilising cached raster maps as the base map once you’ve zoomed out far enough.

For those interested you can see the cache levels and hardware specifications we typically use for building national caches here.

 


[1] Esri UK’s Platform-as-a-service offering

[2] http://en.wikipedia.org/wiki/MIME

[3] Though many options and alternative workflows exist to maintain a continuously changing map cache; we will explore some of these options in future blog posts.

[4] http://aws.amazon.com/ec2/instance-types/

Wednesday
Apr252012

New ArcGIS Performance calibration tool

Do you wish to analyse the performance of your layers within a map? Are your layers taking longer to render than expected? Are you about to publish your maps to ArcGIS Server and you wish to optimise their performance?

If so, help is at hand. A new tool for ArcGIS 10 and ArcGIS 9.3.1 has recently been released which allow you capture performance information. The tool, PerfQAnalyzer, integrates into ArcGIS Map (or it can be run as a stand-alone ArcGIS Engine application) which helps by allowing you to analyse on a layer-to-layer basis the performance of your desktop application. Furthermore, the workflows captured within the tool are fully automatable and can be scripted and executed simply at the command prompt or within ArcMap.

The PerfQAnalyzer tool is a free, unsupported, downloadable tool. More information about the PerfQAnalyzer can be found in the following blog article http://blogs.esri.com/esri/supportcenter/2012/04/03/new-arcgis-performance-calibration-tool/ which also contains links to download the tool.

Tuesday
Apr102012

Having trouble starting ArcMap 10? 

There is probably nothing more frustrating than to see the below screenshot. Thankfully, most of us will not experience it very often (if at all), but if you do experience this screen more frequently than you would like on start-up, then read on as help is at hand!

The reasons for this crashing or hanging might be varied but listed below are some of the more common causes that you may try to resolve the issue.

Get up-to-date

This is one of the most basic rules in Technical Support, but also one of the most successful! Often, issues have already been identified and fixed in Service Packs, so by keeping your software up-to-date, you may fix many known issues before you come across them, saving you time, and a headache! All of the latest software updates can be downloaded from:

Esri core products: http://resources.arcgis.com/content/patches-and-service-packs

Esri UK products: https://www.myesriuk.com/

Beware of the bug!

NIM061743 - ArcMap creates thousands of default.gdb files on start-up and eventually fails to start

This bug was introduced at ArcGIS 10, and has been one of the biggest causes of ArcMap crashing upon start-up. At start-up, ArcMap verifies the existence of the default.gdb or creates one if it doesn’t already exist. This is used by ArcMap for many tasks and processes, and is required for the software to run properly. The bug causes the software to fail the validation stage. The following article discusses how to resolve this issue:

http://support.esri.com/en/knowledgebase/techarticles/detail/38523

Restore the default settings

All of the user preferences for the toolbar configurations in ArcMap are stored in a special file called the normal.mxt. This is useful as it allows the user to setup ArcMap to have only the toolbars that they require available, and where they want them for ease of use and familiarity. ArcMap loads these settings during the start-up process. On occasions however, the normal.mxt can become corrupted. If this happens the normal.mxt cannot be opened, and hence ArcMap fails to start and crashes.

It is possible to test if it is the normal.mxt that is causing ArcMap to crash. This is done by renaming the normal.mxt to OLD_normal.mxt, which can be found in the following location:

Location of the version 10 normal.mxt in Windows XP:

C:\Documents and Settings\username\Application Data\ESRI\Desktop10.0\ArcMap\Templates
Location of the version 10 normal.mxt in Windows 7:

C:\Users\username\AppData\Roaming\esri\Desktop10.0\ArcMap\Templates

Once renamed, try restarting ArcMap. A new normal.mxt should be created in the above location. If this does not resolve the issue, delete the new normal.mxt, and then rename the OLD_normal.mxt back to normal.mxt to restore your user preferences again.

If this does not work, we can try resetting the entire Esri profile. The ESRI folder stores additional user defined information. For example, custom toolboxes, models, address locators and database or server connection files. Again, it can be that ArcMap is trying to access a corrupt file within this directory thus hanging when initializing.

Location of the ESRI folder in Windows XP:

C:\Documents and Settings\username\Application Data\ESRI
Location of the ESRI folder in Windows 7:  

C:\Users\username\AppData\Roaming\Esri

As with the normal.mxt, this is done by renaming the ESRI folder to Old_ESRI. Once renamed, try restarting ArcMap. A new ESRI folder should be created in the above location. If this does not resolve the issue, delete the new ESRI folder, and then rename the Old_ESRI folder back to ESRI to restore your user preferences again.

Ensure your graphics card drivers are up-to-date

Out-of-date Graphics Card drivers are another of the common causes for the software to crash or hang when initializing. The ArcGIS Desktop 10 System Requirements state that the machine must have a minimum of 64MB RAM, have a 24 bit capable graphics accelerator, and have OpenGL v2.0 or higher.

You are able to check the OpenGL version by installing an OpenGL viewer, such as the OpenGL Extensions Viewer Utility. Select the File as “OpenGL Extension Viewer” and the platform as "Windows XP/Vista/7" and Click Download. The following Esri Inc blog describes this utility in further detail.

You may also update the graphic card drivers directly from the following manufacturer’s websites:

AMD: http://support.amd.com/us/gpudownload/windows/Pages/auto_detect.aspx

nVIDIA: http://www.nvidia.com/Download/Scan.aspx?lang=en-us

Intel: http://www.intel.com/p/en_US/support/detect

Further information regarding graphics cards can be found here.

If, after trying the above suggestions, ArcMap still does not open, please get in touch with the Technical Support Team (support@esriuk.com). We will be happy to look into your issue and help you resolve the problem as quickly as possible to get you back up and running.

Related Articles

http://support.esri.com/en/knowledgebase/techarticles/detail/32797

http://support.esri.com/en/knowledgebase/techarticles/detail/38237

Tuesday
Apr102012

Understanding which Transformation to choose in ArcGIS

We recently published an article on the basics of Coordinate and Projections for UK users in ArcGIS. In response to this article we received a really interesting follow-up question:

“Please can you provide some more information on why the Petroleum transformation should be used? Are there any cases where another transformation in the list should be used?”

When transforming data between WGS-84 and BNG it can be confusing which options to choose. At ArcGIS 10 you are presented with 7 different options.

So, what are the differences and which one should you choose?

Essentially each option has a different accuracy depending on the output accuracy you require on your data but also the geographic area in which it resides. This is best summarised using the following table (reproduced by kind permission from Jim Sibbald).

* with configuration 

As you can see the OSGB_1936_To_WGS_1984_Petroleum has the best accuracy around the UK out of the box within ArcGIS.

However, what if you are collecting data from a GPS device in WGS-84 and when transforming you require greater accuracy than ±2 meters? The most accurate transformation between British National Grid and WGS 1984 would be using the OSTN02 transformation.

At present, out of the box, ArcGIS doesn’t support this type of transformation.  If you require this level of accuracy there are a number of options depending on the version of ArcGIS that you’re using. However, after working in collaboration with DGC and Ordnance Survey, Esri UK have released OSTN02 support within ArcGIS desktop.  

Configuring OSTN02 Transformation in ArcGIS 10.1

Users of ArcGIS 10.1 will be able to take advantage of OSGB_1936_To_WGS_1984_7  supported as shown in Figure 1. This requires the user to download the .grb file from Ordnance Survey and to place it in the appropriate folder. 

Figure 1 - OSTN02 in NTv2 in ArcGIS 10.1 

To utilise this transformation method simply download and paste the OSTN02_NTv2.gsb into a folder called ‘C:\Program Files\ArcGIS\Desktop10.1\pedata\ntv2\uk’. You will need to create the folder called ‘uk’ which must be in lower case. Next time you restart ArcGIS 10.1 you will be able to use this transformation from the Geographic Coordinate Systems Transformations dialog box.

Details of the copyright and liability of the files are here.

Configuring OSTN02 Transformation in ArcGIS 10

To add this support in ArcGIS 10 you will need to download and install an add-in. More information about this add-in can be found in the following blog article: OSTN02 supported in ArcGIS desktop.

In both cases, if you are using ArcGIS Server then remember that you need to install it in both areas, especially if you are publishing maps from an MXD with it applied.

However, you also need to be aware that the accuracy of the Petroleum and NTv2 (OSTN02) transformations also fluctuates around different parts of the UK. There are a couple of interesting maps on the Esri forum, created by Steve Baker, which show the variation between

Summary

As such, the OSTN02 transformation is the most accurate but not included by default. With most UK data requiring an accuracy of approximately  ± 2 meters the Petroleum transformation is fine for common applications and uses. 

Monday
Mar262012

Coordinate systems and projections for beginners

This blog post gives a basic introduction to coordinate systems and projections, with a focus on UK data. To seasoned geographers, I apologise for all the things I've simplified or simply left out! My intention is to provide GIS novices who are a bit confused by the topic with just enough about various different coordinate systems to get started working with them in ArcGIS. Anyone looking for an excellent comprehensive introduction should refer to Ordnance Survey's guide.

A coordinate system lets us define where a location is in space. In GIS, there are many types of coordinate systems, of which the two most used are geographic (3D) and projected (2D). The difference is shown below:

A geographic coordinate system (GCS) uses a grid on the surface of a 3D globe (the technical term for this grid is graticule; the North/South lines are lines of longitude and the East/West lines are lines of latitude). Graticule lines are not parallel to each other because they are defined using angles (e.g. degrees) from the centre of the globe, not linear units (e.g. metres) on a flat surface.

A projected coordinate system (PCS) is a flattened version of a 3D coordinate system. Grid lines are parallel, and coordinates are given in "flat" units like metres or feet. Although the Earth isn't flat, we often use flat surfaces to represent it (paper surfaces, computer screens, etc), so we frequently need to convert 3D coordinates to 2D coordinates. However, there's a problem: imagine peeling the skin off an orange and trying to make it sit flat on a table. It's not possible to do this without ripping or stretching the peel! It's the same with a 3D coordinate system. Whenever we flatten, or "project", a 3D coordinate grid to a 2D coordinate grid, we have to distort the grid's proportions somehow. Distances, shapes, areas, and angles, or some combination of all four, are deformed.

If you work with UK data, there are two geographic and two projected coordinate systems that you should know about. They are shown in the diagram below, along with the numeric WKID (Well-Known ID) of that GCS/PCS, as well as their relationships with one another and example coordinates in each system showing the location of Esri UK's head office in Aylesbury.

World Geodetic System (WGS-84) is familiar to many non-geographers because it is used by GPS devices to describe locations all over the Earth. A different GCS, called OSGB-36, which is more accurate for describing locations in Britain but not as good for other countries, is used specifically for British data. Web Mercator is a PCS based on WGS-84 used for global maps, and British National Grid is a PCS based on OSGB-36 used for British maps.

For each GCS, there are many different ways of converting, or "projecting", 3D coordinates to 2D coordinates. Web Mercator and British National Grid are the most important projections for their respective geographic coordinate systems. There are alternative projections, each with its own pros and cons (this link has more information, as well as an entertaining video clip).

Converting between coordinate systems that are based on the same GCS is relatively straightforward, but when converting, for example, GPS (WGS-84) coordinates to BNG eastings and northings, a mathematical transformation is required. The "Petroleum" transformation is an accurate transformation from WGS-84 to OSGB-36 (and vice-versa) included with ArcGIS.

To convert data between WGS-84 and BNG in ArcGIS Desktop, you should use the Project tool. Make sure you select the "Petroleum" transformation otherwise your results will not be accurate.

Select the optional Petroleum transformation for the best results

For GB data, you only really need to know about WGS-84 and BNG, and that you should use the Petroleum transformation to get an accurate conversion between them. You will also need to use "Petroleum" to convert between BNG/OSGB-36 and Web Mercator (or WGS 1984 Web Mercator Auxiliary Sphere, to give it the name used by Esri). Web Mercator has become the standard projection for international consumer web maps, such as Google Maps, Bing Maps, and OpenStreetMap. All ArcGIS Online basemaps are also in this projection.