Tag Archives: ArcGIS Desktop

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 

Posted in Uncategorized | Tagged , , , , , , | 10 Comments

Catalog Window

Excellent post by Cassandra on the Support Services blog about the new Catalog windows in ArcMap version 10.

Posted in Uncategorized | Tagged , , , , , | Leave a comment

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

 

Posted in Uncategorized | Tagged , , , , , | 1 Comment

New Geocoding engine with ArcGIS 10

The ArcGIS 10 geocoding engine is totally new.  Locators created with ArcGIS 9.x can still be used and may still be created with ArcGIS 10 (provided the rule base files are copied into the Geocode and Locators install directories) but a number of issues with the old engine are being remedied.  One of these that particularly affects international users is support for Unicode versus the old engine’s reliance on word soundex to find geocodes.  Until now, only extended ASCII characters could be used in reference data fields, effectively limiting geocoding to European languages.  Users who wanted to locate “???” would have to transliterate the original Chinese into Pinyin, a Romanized phonetic approximation.  You can try this out for yourselves.

Download the user-supplied China_county data set from ArcGIS Online:

Now create a single-field locator, using the NAME field as the key field.  Open ArcMap with the China_county layer visible, then load the Geocoding toolbar to ArcMap and add your new locator using the Locator Manager.  If you use the Address Inspector tool and hover over county features you will see Chinese characters being returned.  Hit the “K” key to copy a value to the clipboard, then paste the value into the Geocode toolbar – it will return the geocoded location and blink the found feature.

Content provided by Bruce Harold

Posted in Uncategorized | Tagged , , , | Leave a comment

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

Posted in Editing | Tagged , , , , , , | Comments Off

Getting started with creating features in ArcGIS 10

When you open the Editor toolbar in ArcGIS 10, you’ll notice that the toolbar looks different. For starters, there is no task list and no target layer list. So how do you add a feature without them? In ArcGIS 10, you use the new Create Features window, which contains all the elements you need. The workflow to create features is the same whether you are editing geodatabases or shapefiles or using an ArcView, ArcEditor, or ArcInfo license.

Introducing feature templates and the Create Features window

When you start editing, the Create Features window opens vertically and docks on the right side of your ArcMap application. The top of the Create Features window lists the feature templates in your map. A feature template is a new concept at ArcGIS 10. It is somewhat like setting the old target layer but is more powerful than that because it contains properties about how new features should be created: the target layer (feature class) where a feature will be stored, the attributes that a feature is created with, and the default tool that is used to create that feature. Feature templates also have a name, description, and tags that can help you find and organize them. You can review and set these on the Template Properties dialog box, which you can open by double-clicking a feature template on the Create Features window.

ArcMap automatically creates feature templates for the layers in the current editing workspace the first time you start an edit session in a map. Feature templates are based on the symbology of the layer, so you can have more than one feature template per layer. One feature template is created for a layer symbolized with the single symbol renderer, but a layer drawn with unique values gets a feature template for each symbol category. For example, if you have a layer of roads, a new feature template is created for each symbol type: freeway, major road, local road, and so on. The feature templates have the same target layer property but different road type attributes. This way, if you create a new feature using the freeway feature template, the attribute for the road type is automatically assigned as freeway. The new feature will also be symbolized correctly as a freeway.

The graphics below show the Layer Properties > Symbology tab listing the unique values symbols used for a Roads layer and the resulting feature templates in the Create Features window. Since the Roads layer has three unique values categories, three feature templates are created, where each one has a different default attribute value for the road type (Freeway, Major road, or Local road).

The bottom panel of the Create Features window lists the tools available to create features for the kind of feature template you have selected at the top of the window. For example, if you click the Springs point feature template at the top of the window, the construction tools will change to tools used to create points. If the Freeway line feature template is active, only construction tools that create lines are listed, as shown below.

Creating features with feature templates

So, simply put, to create a feature, choose a feature template at the top of the window and a tool at the bottom of the window. Each feature template has a default construction tool that is automatically activated when you choose a feature template, but you can click a different construction tool in the list to use instead. If you want to create a point representing the location of a spring water feature, simply click the Springs feature template and the Point tool, then click the map where you want to add the point.

To digitize segments as you did with the Sketch tool in previous releases, click a line or polygon feature template, then use the Line or Polygon tool to click the map where you want to place vertices. Straight segments are created by default as you click, but you can change the segment types using the palette on the Editor toolbar or Feature Construction mini toolbar. The Feature Construction toolbar follows the pointer as you click to give you easy access to commonly used tools. If the toolbar gets in your way while digitizing, press the TAB key to reposition it.

The process for creating annotation and dimensions is the same as for other feature types, so the Annotation and Dimensioning toolbars are not found in ArcGIS 10 since the tools have been integrated with the Create Features window. To create annotation, choose an annotation feature template on the Create Features window and a construction tool, such as Horizontal or Straight. When you click the feature template, the Annotation Construction window appears so you can enter the text of the new annotation, control how the text is placed, and set any additional symbol properties.

Feature templates and editing commands

Feature templates are also used when you are creating features with editing commands, such as Copy Parallel, Buffer, and Union on the Editor menu. In these cases, you set the feature template on the dialog box that opens when you click the command; you do not use the Create Features window. Choosing the feature template on the command’s dialog box specifies the target layer and the default attributes for the new features that will be created. To change the feature template, click the Template button to open the Select Feature Template window and click one of the available feature templates. Editing commands that can only output one type of geometry, such as Copy Parallel for lines, list templates just for that layer type. Commands that can output a variety of layer types list any existing templates that are the proper types.

When copying and pasting features, a dialog box appears immediately after you click the Paste button, allowing you to set the target layer. When you paste, you can choose an actual layer, rather than a feature template, so you can retain the attribute values from the copied feature instead of using default attributes. If you are just editing an existing feature, you do not need to specify a feature template.

To learn more about editing in ArcGIS 10, see these help topics:

What’s new for editing in ArcGIS 10

What is editing?

Editing in ArcGIS 10 tutorial

Content provided by Rhonda

Posted in Editing | Tagged , , , , , | 11 Comments

Presentation AddIn for ArcGIS Desktop 10

Recently, the Application Prototype Lab released a new version of the presentation tool as an Add-in for ArcGIS 10.  This Add-in is similar to the presentation capability recently added to ArcGIS Explorer.  The Add-in can be downloaded here from the new code gallery.

The Add-in was developed in C# for .NET 3.5 and utilizes the graphics capabilities of WPF.  Full source code is provided with the code gallery download.

For more information see this recent post on the the Application Prototype Lab blog

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

Bind and License your standalone ArcGIS Engine or Desktop application

At ArcGIS 10 you can bind your standalone application to an Engine or Desktop runtime and license your application by making a single call to BindLicense.

Here are the 2 steps:

  1. Reference the ESRI.ArcGIS.Version assembly
  2. Call ESRI.ArcGIS.RuntimeManager.BindLicense(ProductCode.EngineOrDesktop) before calling any ArcObjects code or creating any of the ArcGIS Engine Controls. So a good place for this would be in the main entry point of the application

[STAThread]
static void Main()
{                   
     if (!RuntimeManager.BindLicense(ProductCode.EngineOrDesktop))
  
{
     
MessageBox.Show(“Unable to bind to ArcGIS runtime. Application will be shut down.”);
    
return;
   
}
    
Application.Run(new Form1());
}

Firstly, this BindLicense method will try to Bind to an Engine Runtime, but if unavailable it will try to bind to a Desktop Runtime. Secondly, it will license the application with the lowest license level available (in the order of ArcGIS Engine, ArcView, ArcEditor, ArcInfo).

For more advanced binding and licensing options please refer to:

Content provided by Gayle Young

 

Posted in Uncategorized | Tagged , , , , , , , | 4 Comments

User Conference Week

It’s User Conference week and several members of the ArcGIS Desktop teams are in San Diego attending and presenting sessions.  Make sure and stop by the ESRI Showcase and meet the ESRI staff that built ArcGIS 10.

 

Posted in Uncategorized | Tagged , , , | Leave a comment