Tag Archives: Best Practices
Working with Microsoft Excel in ArcGIS Desktop
There are several questions that people often ask me about working with Excel data in ArcGIS: Can I export a table directly to Excel? Why are the attributes in my Excel table all null after creating a join? Why can’t I see my .xlsx file in the Catalog window? For those of you who have used Microsoft Excel data in ArcGIS, you know that there are some special conditions to do so. Those conditions include understanding the limitations and guidelines for working with Excel data. By the way, the answer to the first question is yes, of course you can export to Excel, and I will tell you how.
Working with Excel Spreadsheets
Excel acts like containers for worksheets and named ranges, which can be added to ArcMap like other tabular datasets. For those of you who don’t already know, a named range is when you select a subset of cells in an Excel worksheet and label it. In ArcMap, worksheets will have a $ at the end of their name, while named ranges will not. For example, the QuadrantOne range of cells can be added to ArcMap as a table:
Field naming guidelines for Excel worksheets
You can see from the named range graphic that I’ve made my column headings (field names) one-word names, like PercentContaminated and RemediationDate. There is a very good reason for this. Using a space in your field names in Excel can cause you problems when working with the data in ArcMap. What usually happens when a space is left in a field name is that the values for these fields can show up as Null in ArcMap (this will happen when you’re trying to join to an Excel table). There are several other field naming guidelines that everyone needs to know:
-Field names need to start with a letter.
-Field names should only include alphanumeric characters or underscores.
– None of these: `~@#$%^&*()-+=|\,<>?/{}.!’[]:;
– No spaces (That includes before the field name, in the middle, or after it.
-Field names will be cut off after 64 characters
-Do not used reserved words as field names.
If you follow these guidelines, you will have a lot more success when using Excel data in ArcMap.
Supporting XLS and XLSX files
Have you ever shared your Excel data with colleagues and had them come back to you saying they can’t see it in ArcCatalog or the Catalog window? ArcGIS can read both XLS and XLSX files, but you may need to install an additional driver on your machine, depending on what version of Microsoft Excel you are using.
- If you have Office 2003 installed, you can read XLS files, but you will need to install 2007 Office System Driver to read XLSX files.
- If you have Office 2007 installed, you can read XLS and XLSX files.
- If you have Office 2010 installed, you can read XLS files, but you will need to install 2007 Office System Driver to read XLSX files.
Exporting directly to Excel
I know what you are thinking: it can’t be done. Let me further clarify. Exporting to Excel is not a core feature of the software; it is not something you can do out of the box. However, you can use Python to write to Excel, and there is a tool for you to do just that available from the Geoprocessing Script & Tool Gallery in the ArcGIS Resource Center. All you have to do is download the tool and unzip the toolbox, and just like that, you will be able to export directly to Excel using the Table to Excel script tool.
Kent Marten
ArcGIS Desktop Tips and Shortcuts handout updated for v10
The popular ArcGIS Desktop Tips and Shortcuts handout has been updated for version 10 and is available online at
http://www.esri.com/library/brochures/pdfs/arcgis-desktop-tips.pdf
Using feature templates effectively
When you want to create features in ArcGIS 10, you’ll use feature templates. Feature templates have properties that define all the information required to create a feature. Effective use of feature templates can help make your editing easier and more efficient. See the earlier post, “Getting started with creating features in ArcGIS 10,” for an introduction to feature templates.
When you first begin an edit session, ArcMap helps you get started with feature templates by creating some for you based on the current symbology in your map. At this point, you should review the feature templates and refine them for your particular editing needs. You can click the Organize Templates button on the Create Features window to open the Organize Feature Templates window, where you can manage feature templates and their properties.
If you know you won’t be creating features in some of the layers, delete the extra feature templates to make it easier to find the templates you will be using. If you need to make new feature templates, start the Create New Templates Wizard. The wizard walks you through the process of making templates: first, choose the layer or layers, then, if applicable, choose any or all classes (based on symbology) within that layer to make into individual templates.
Feature template properties
Once a feature template is created, you can review and set its properties on the Template Properties dialog box. In particular, you should specify (1) some text to help organize your templates, (2) the default tool used to create features using that template, and (3) the default attribute values for the new features. Two of the items on the Template Properties dialog box, the target layer and the preview of the drawing symbol, are set for you based on the layer information and cannot be changed there.
Let’s say you are digitizing new buildings. How should you set up your feature templates? The following sections provide examples of how you might specify the properties in this scenario.
Feature templates have a name, description, and tags that can help you find them. To identify a template easily, give it a clear and descriptive name. For example, naming a feature template Buildings is too generic if you are creating different kinds of buildings. Naming a feature template Buildings – residential makes it easier to locate the feature template you should use when creating residential structures. Enter a description to provide additional information about the contents and intended use of a particular template. The description also appears as ToolTip pop-up text when you rest your pointer over a template on the Create Features window. In addition, you can add tags to a template. A tag is generally a short keyword, metadata item, or any other term that helps identify a template when searching for it. Tags can be used as a form of categorization so only the templates that meet certain criteria are displayed on the Create Features window.
Another property of a feature template is the default tool, which is the construction tool that automatically becomes active when you choose a feature template on the Create Features window. Setting the most appropriate default tool can help you avoid making an extra click to choose a different tool in cases where the Line or Polygon tools are not the primary ones you will be using. For example, when you are drawing rectangular building footprints, set the template’s default construction tool to Rectangle so that tool automatically becomes active instead.
Default attribute values in feature templates
The most significant feature template properties are the default attribute values, since setting them can really save you lots of time and improve accuracy. When creating residential building features, you should set the default building type to Residential so that the value is automatically populated in new features created with that feature template. Any default values that are already set up in your geodatabase are included automatically in the feature template properties as well. However, any ArcGIS system fields, such as Shape_Length or OBJECTID, and fields storing COGO values, are not shown on the Template Properties dialog box since ArcGIS supplies those attribute values. You can click the buttons above the attribute grid to change how fields are listed, such as to display all or only visible fields or to list fields by their names or aliases.
When choosing which default attribute values to set in a feature template, you should not provide a default value for fields such as a name or ID code that would not be common to many features. For fields that should have specific content, add the individual attribute values after you have created the feature. Otherwise, you will have to clear out the values assigned by the feature template every time you want to supply different attributes.
Once a feature is created, there is no link to the original feature template. For example, if you update the default attribute values of a feature template, those attribute values are not retroactively applied to existing features. Changes made to a feature template’s properties are only reflected in new features that are created with that feature template. To update the attribute values of a feature that has already been created, use the attribute table or the Attributes window.
Multiple feature templates for the same layer
A layer can have multiple templates associated with it, allowing each template to have different default attributes. If the Buildings layer had unique value symbol categories of residential, commercial, industrial, and so on, you could have three different templates with each one having a different default attribute for the type of structure. To create a residential feature, simply click the Buildings – residential template; the new features are automatically created as being residential and are attributed and symbolized properly. 
You can also create multiple templates for a layer even if you are symbolizing with a single symbol. For example, if you are creating lines to represent pipeline features, you could create several feature templates with different default attributes for the common types of material or diameter sizes. You can create the feature templates quickly by copying the existing pipeline feature template. Simply right-click the feature template on the Create Features window, click Copy, open the properties of the copied template, then change the default attributes to another material or diameter.
Missing feature templates
What if the feature templates you want to use are not displaying on the Create Features window? The most common cause is that the layer is not being displayed on the map. When a layer is not visible because it is turned off in the table of contents, is beyond its visible scale range, or does not satisfy the current definition query, its associated templates are hidden. You need to make the layer visible again before you can create features in it. In addition, if you added a layer to the map or changed the symbology significantly after you started an edit session, ArcMap would not have created those feature templates automatically. You need to create them yourself with the Create New Templates Wizard. 
To illustrate this, the graphic below shows the Table Of Contents window with layers listed by visibility and docked next to the Create Features window. Notice that feature templates for only the Visible layers are shown on the Create Features window. The feature templates are hidden for the National park boundary layer, which is listed under Out of Scale Range because the layer does not draw at the map’s current scale, and the Trails layer, which is turned off completely. The feature templates for these layers will appear again on the Create Features window once the layers are displayed on the map. There are no feature templates for Basemap, since it is not an editable vector layer.
Reviewing and saving feature templates
Working with feature templates is a dynamic process. As you are editing, review your feature templates periodically to make sure they are as useful as they can be. If you find that you repeatedly switch from the default tool to a different one or have additional attribute values that would make good defaults, you should update the properties of the template. In addition, if you add a layer to your map or add a symbology category (such as for a layer drawn with unique values), you need to create templates to be able to add features in that layer. In some cases, if you have changed the rendering of several layers since the templates were initially created, it may be best just to delete them and start again so the templates are synchronized better with your current symbology.
When you save your map document, the feature templates are saved in it, too. The next time you open the map and start editing, your feature templates will be there to help you be more productive when creating features. They are also saved with layer files, layer packages, and map packages and are available as part of feature services in Web editing applications so that other users can access your feature templates.
For more tips on feature templates, see the Web help topic, Best practices for using feature templates.
Content provided by Rhonda
Migrating to Web Service enabled Java Web ADF: Part 1
The Java Web ADF internally manages how applications connect to the Server Object Manager and communicate to ArcGIS Server services. Local connections are established using ArcObjects and Internet connections are established using native Java Objects through web service endpoints via the ArcGIS Java Web Service (AgsJWS) API. This feature of the framework becomes increasingly important with the growing technology trend of using web services and is simple to migrate existing applications from local connections to internet connections.
These instructions assume you have set up your Eclipse Web ADF project with the JSF 1.2 Facet. For details on setting this up please refer to the following ArcGIS Java Technology blog post.
- Open faces-config.xml in Eclipse Faces Config Visual Editor and Select the Managed Bean tab.
- Under Managed Bean Elements, select ags1.
- This populates the Managed Bean section, under Managed Bean Class press the Browse button.
- Type AgsMapResource in the Select Entries text box and click OK
- Under Initialization delete the following managed-property settings using the Remove button:
- user
- serverObjectName
- hosts
- Replace with the following managed-property settings using the Add button filling in the appropriate values in brackets for your service :
- endPointURL – http://[SERVERURL][PORT]/arcgis/services/[FOLDER]/[SERVICE-NAME]/MapServer
- Your managed bean properties should resemble the following settings with values for your connection.
- Now you can run your application and all Web ADF objects will use the AgsJWS API instead of ArcObjects.
Finally, you can remove the arcobjects jar file from your application as you are know longer making use of it and doing so will significantly reduce your application footprint. For more information about Java Web ADF library dependencies read our previous post.
Risks
This process will work on any Java Web ADF Application which does not use the Editing Task or have any custom features using ArcObjects. If you are making use of custom ArcObjects in your Java Web ADF application you will need to migrate your custom features as a Server Object Extension (SOE) and expose it through SOAP, then replace your custom code with connection to your SOE making use of the client web service stubs provided by your SOE. Part 2 of this post will go into deeper detail of this pattern.
Geospatial Cloud Computing Security to Be Addressed at UC
We’ve added a cloud computing security section to the Enterprise Security presentation scheduled for Tuesday at 3:15pm in Room 32B. The session will still cover security across the enterprise, but has been expanded to address this key subject. Please provide feedback on the presentation as it will be incorporated into a cloud security whitepaper we plan on releasing later this year! Some cloud computing items to be addressed include:
- Understanding the security benefits and risks
- Secure deployment best practices
- Minimizing your cloud attack surface
- Single-sign-on integration
- ESRI product specific guidance and resources
See you there!
Key talk on the role of maps in GIS at this year’s ESRI User Conference
Wednesday, July 14 at 8:30 am at the User Conference, Clint Brown from ESRI will be giving a keynote presentation on the role of maps in GIS. This will be an important talk about how GIS has evolved in the past few years and is becoming more approachable through online maps – especially with the release of ArcGIS 10. New media maps play a key role in this release and in the inevitable move of GIS onto the Web.
This will fundamentally change GIS and shape how GIS will be used by larger and larger audiences.
Maps play a special role in GIS:
- They portray logical collections of geographic information as layers
- They are the heart of how GIS is used
- They provide an effective metaphor for modeling and organizing geographic information as a series of thematic layers
ArcGIS maps encapsulate many advanced GIS elements, and sharing ArcGIS maps will transform what users can do with their GIS. Interactive GIS maps provide the focal point for using geographic information and bringing that information to life. They are the way that GIS content is shared among professional GIS users and with everyone online. These maps will provide the mechanism through which GIS will become pervasive.
Each of our individual organizations can build our own, independent web maps in this new framework. However, one of the extraordinary trends is how our collective map information can be mashed up, brought together, and harmonized to present a unified view to all kinds of users through the web.
ESRI’s development teams have been working hard to build and release ArcGIS 10. In the process of this work, we began to recognize and leverage the critical role that maps play.
This talk will present a number of our findings and introduce some key initiatives that enable us to work together as a community to build some startling new and effective GIS maps and apps that literally open up access to GIS and help your GIS to support the mission of your organization. Clint’s presentation will provide an important context for how we will begin to collectively apply our geographic information and provide GIS to whole new audiences.
You can download the slides for this presentation as a PDF attached to this blog post. Clint’s slides are also on Slideshare.net
About Clint Brown
Clint is the Director of Software Products at ESRI. For close to 27 years, he has worked at ESRI with Scott Morehouse, the Director of Software Engineering, to design, build, and ship all of ESRI’s GIS software – from ArcInfo to ArcView and ArcGIS. His job has been to transform the GIS software programs developed by Scott and his programmers into useful GIS products that could be applied by a wide range of customers and organizations to a host of applications and challenges.
In his work at ESRI, Clint has been identifying, capturing, and documenting GIS practices that were employed by many early users of GIS and found useful ways to share these practices in ESRI’s product
Free Live Training on Editing with ArcGIS Desktop 10
Don’t miss a free live training seminar on Thursday, June 24 about editing in ArcGIS Desktop 10.
For more upcoming free live training see http://training.esri.com/campus/seminars/index.cfm
- July 1st Getting the Most Out of the User Conference
- August 12th Exploiting Imagery in an Enterprise GIS
If you have missed any of the seminars on ArcGIS 10 make sure and view the recordings online at any time.
What’s new for map templates in ArcGIS 10
Beginning with ArcGIS 10, ESRI no longer supports map templates (.mxt) files for use with the Select Template and Getting Started dialog boxes. These dialog boxes have been updated to work with map document (.mxd) files in place of .mxt files.
The Getting Started dialog box
When the application is first opened, you can open a recently used document, a blank document, or create a new document from a template. To create a new, blank map, select New Maps, and select the Blank Map item listed on the right. Select your default geodatabase for the map and click OK.
Alternatively, create a new map from a map template. A map template is a map document (.mxd) from which new documents can be created. Templates may contain basemap layers or be a variety of commonly used page layouts. When you create a new document from a template, an untitled map is opened based on the selected template. These templates are listed under the My Templates node under New Maps. You can create new templates by saving map documents in your user profile that only you will see. Add user-defined categories (folders) and map document templates to the following location:
C:Users<user>AppDataRoamingESRIDesktop10.0ArcMapTemplates
Alternatively, you can create templates for all users of the system listed under the Templates node under New Maps. By default, system templates are located in the ArcGIS installation directory; however, the ArcMapAdvancedSettings.exe can be used to change the default location. This application is located in the Utilities folder of your ArcGIS installation directory. System templates are initially located in the following location by default:
C:Program FilesArcGISDesktop10.0binTemplates
New categories for templates are made available by creating folders beneath the templates folder locations. Categories will only appear in the Getting Started, New Map, and Select Template dialog boxes if a map document is present in the folder under the Templates or My Templates locations.
Tip - To create multiple System template locations, you can modify the following registry key, separating folders with a semicolon (;).
HKEY_LOCAL_MACHINESOFTWAREESRIDesktop10.0ArcMapSettingsTemplateDir
C:Program Files (x86)ArcGISDesktop10.0BinTemplates;E:More System Templates
Customizing the user interface
With ArcGIS 10, map documents referencing map templates (.mxt) files for configuring user interfaces is no longer supported. ArcGIS 9.3.1 map documents referencing .mxt will continue to work at ArcGIS 10; however, you cannot create new .mxt files or modify existing .mxt files for saving user interface customizations.
Converting existing map templates (.mxts) to map documents
To convert your .mxt files, open the file from the Catalog window as an untitled map document and save it to the file system.
Best practices for documenting what you share
06/14/10—Sharing well adds value to your work and enables others to use what you’ve shared more easily. One way to add value to what you’ve shared is to make sure that you’ve documented your shared items well.
The best practices for sharing help topic is a great place to start. It includes tips and a discussion of what to consider.
Another way is by looking at some good examples. Let’s look at one of the featured maps currently on the map gallery. Open this link to the details for the shared item and and follow along in the discussion below about what makes a well-documented shared item.
Some things to think about as you share your work:
Name
It’s clear from the name what this map is about. No ambiguity here.
Summary
A brief and concise description of the map. This summary also appears in the hover text in the gallery, shown below.

This provides users an overview of your item.
A Good Thumbnail
The saying goes – you can’t judge a book by its cover. But in many ways the thumbnail is the cover to what you’ve published, and provides visitors not only an idea of what your shared item offers, but is a first indication of how good that content might be. If you see a bad thumbnail, how good will the rest of the experience be?
When you add a layer package or ArcGIS Server Web service, a thumbnail will be automatically generated. If you are adding a Web or Mobile app, it won’t. Even if the thumbnail is created automatically, you may want to improve on it. Make your own at 200px by 133px and save it as a PNG file. Then you can edit your description, and add your own thumbnail.
Description
The description provides details about what you’ve shared. The paperback version of War and Peace is not required, but a good summary of pertinent details is important. These can also include links to other resources with more information.
Access and Use Constraints
Let users know how they can use what you’ve shared, and what attribution may be required. You can add details about how you recommend your item should be used, its update frequency, whether it’s just a “test,” and more.
By keeping in mind some of these easy to implement best practices for documenting your items, you’ll make it easier for others to discover, use, and build upon what you’ve shared.
If you have questions, please contact us in the ArcGIS
Online forums.
ArcGIS 10 Custom ZoomSlider using Web ADF JavaScript API
The ArcGIS 10 Java Web ADF JavaScript API has been refactored to take
advantage of the Dojo JavaScript toolkit. One such enhancement is the new addition of ZoomSlider, Navigator and CoordinateTracker to the map control. When you create a ADF application at ArcGIS 10, a default Navigator, ZoomSlider and Coordinate tracker will appear on the map control without any additional coding. The screenshot on the right shows the default Navigator, ZoomSlider and the CoordinateTracker in a mapcontrol. You can customize these components to suit your application or remove them if needed. Let us walk through the four simple steps to customize the ZoomSlider.
Step 1: Hide the ZoomSlider
First, you must hide the default ZoomSlider by setting the showZoomSlider property of the map component to ‘false’ in your JSP file.
|
<a:map id=“map1″ value=”#{mapContext.webMap}” showZoomSlider=‘false’ width=“800″ height=“500″ style=“border:1px solid green;” /> |
Step 2: Create your own ZoomSlider by modifying the ‘adf.css’
You may already know that a ZoomSlider is composed of a ‘zoom in’ button, ‘handle’, ‘tick’ a
nd ‘zoom out button’. Each component of the default ZoomSlider is described in the adf.css. To customize the look and feel of the ZoomSlider, alter the corresponding CSS class of each component in ‘adf.css’. The table below shows the components and their corresponding CSS class name.
| Zoom-in button | .slider. mapslider .vertical .plus |
| Handle | .slider .mapslider .vertical .handle |
| Tick | .slider .mapslider .vertical .tick |
| Zoom-out button | .slider .mapslider .vertical .minus |
The snippet shows how to modify the default tick with a ‘myslider.png’ image.

Step 3: Add the custom ZoomSlider to Map Control
The next step is to add the custom ZoomSlider to the map control. We can take advantage of the client-side Web ADF Javascript APIs and add the ZoomSlider to the adf.map instance. A ZoomSlider container must be defined and placed in the ‘controlDiv’ element of the ‘adf.map’ instance through a Javascript function as shown in the code snippet below.
|
function createCustomMapSlider() { var map = adf.Controls.maps['map1']; var slidergrandContainer = map.controlDiv; var sliderContainer = adfdojo.create(‘div’, { id : ‘mysldContainer’, style : { position : ‘absolute’, top : ’30px’, right : ’33px’, zIndex : ’99′, height: ’100px’ } }, slidergrandContainer);
map.slider = new adf.MapSlider(“mapSlider”, sliderContainer, ‘map1′, map.numLevels, map.level); } |
Also, notice that you can define the ZoomSlider’s position relative to the map, when creating the ZoomSlider container. When creating the ZoomSlider instance, you must define the number of zoom levels and the default zoom level. Each tick in the ZoomSlider represents a zoom level. Let’s say you have a cache service with 4 levels, the ZoomSlider can have four ticks to visualize every zoom level.
Step 4 : Subscribe to ‘adf/map/map1/init’ topic
After adding the custom ZoomSlider to map control, you can simply register the createCustomMapZoomSlider function created in Step 3 through adfdojo.addOnLoad function. However, a custom zoom slider function must be called only after the map instance has been initialized, which typically happens in the map’s init method. At this release we have exposed a new ‘adf/map/mapid/init/’ topic which is based on dojo’s publish-susbcribe mechanism. This ‘adf/map/mapid/init’ topic is published, whenever the map instance identified by mapid is initialized. By subscribing the createCustomMapSlider function to this topic, you can avoid unexpected behavior. In general, it is recommended to subscribe to this map init topic, whenever you modify the properties of a map instance at the client-side. The code snippet below shows how to subscribe the createCustomMapSlider function to the topic.
|
<script type=“text/javascript”>
adfdojo.addOnLoad( function() { var map = adf.Controls.maps['map1']; if (map == null) { adfdojo.subscribe(“adf/map/map1/init”, createCustomMapSlider); } else { createCustomMapSlider(); } });
</script> |
The image below shows a custom zoom slider created through the above steps.

You can see how easy it is to customize ZoomSlider. However, if you wish to remove the ZoomSlider, you can simply set the showZoomSlider property of the map instance to false in your JSP file or through client-slide JavaScript functions. Also, you can customize or remove the coordinate tracker and navigator by setting the showCoordinateTracker and showNavigator properties to false.
Content contributed by Haifeng Li, Product Engineer, ArcGIS Java Team.














