Skip navigation
All Places > Esri Technical Support > Blog > Author: timothy_hales-esristaff
Raster datasets have a large assortment of information beyond the basic pixel display. This information is stored in the properties and is helpful in understanding more about the data. Locating the properties of a raster dataset can be a tedious process if you are trying to compile information for a lot of datasets. This is because the workflow to find the properties of a raster dataset in the Catalog is to right click on each dataset and choose Properties > General tab.


For example, you are working on a project that requires an elevation image service to be created.  The image service foundation is a mosaic dataset that references source rasters for each county in the state.  You create the mosaic dataset, add the rasters, build the overviews, and add it to the map document.  The mosaic dataset looks great until you begin zooming into the source data.  In one spot you find that the elevation appears very dark instead of a consistent grayscale.ElevationDark.jpg

After investigating the source raster you find that the dataset is an 4-bit integer instead of the normal 32-bit float.  This makes you wonder if there are other datasets that were created incorrectly.  To find those datasets you can either zoom into small scale areas across the entire state, or you can open the properties for each individual raster.  Either way the process would be very time consuming as each raster would need to be reviewed individually.

Another option is to access the raster properties through a Python loop.  This process presents a more efficient and simplified solution.  The information can be queried through the python Raster object and the Get Raster Properties geoprocessing tool.

import arcpy
arcpy.env.workspace = r"C:\temp"

rasterList = arcpy.ListRasters()

for raster in rasterList:
    rasterObj = arcpy.Raster(raster)
    print raster

    bands = arcpy.GetRasterProperties_management(raster, "BandCount")
    print "Band count: %s" %bands

    noData = rasterObj.noDataValue
    print "NoData Value: %s \n" %noData

The returned values can be written to a table to easily identify which datasets are incorrect.RasterPropertiesTable-1024x279.jpg

Additional Resources

A Python script tool example of getting the raster properties can be download from Write Raster Properties to Table.Timothy H. – Senior Support Analyst
The new Python Add-ins for ArcGIS 10.1 bring a whole new opportunity for customizations.  The pythonaddins module provides additional functionality within add-ins that is not available in stand-alone scripts or geoprocessing script tools.  Three of these functions that allow user input or interaction are: OpenDialog, SaveDialog, and MessageBox.

Each of these functions allow information to be collected from the user.  It is up to the programmer to determine what to do with that information.

The OpenDialog and Save Dialog functions return two different values depending on how the user interacts with the dialog.  When the user selects a dataset and clicks either Open or Save, it returns the full path of the dataset chosen.  If the Cancel button is clicked it returns 'None'.

Value being passed to a print statement when clicked.

The MessageBox function works in a similar way; however, it returns the string value representing the message button pressed.  For example, when the Ignore button is clicked it returns 'Ignore'.Below is a sample python add-in with comparison between the code and the dialogs:

A) The Open Dialog opens.
B) A file is chosen, and the Open button is clicked.  The file is added to the map.
C) The Cancel button is clicked which opens the Warning Message.
D) The Retry button is clicked which reopens the Open Dialog.
E) The Cancel button is clicked which opens a final Warning Message.OpenDialogWindows.jpg


The above sample add-in is available on Dialog Windows and Messages

Timothy H. – Senior Support Analyst
It is always challenging when your coordinates are in Decimal Degrees (DD) format and you need them in Degrees, Minutes, Seconds (DMS).  Amidst this challenge is determining how to do the conversion.  Is it best to open the table in Microsoft Excel and build an advanced formula?  Is there a Python or VB code snippet that will work in the Field Calculator?  You know there has to be an easier way.

Within the Projections and Transformations toolset is a tool called Convert Coordinate Notation (Data Management > Projections and Transformations).  This tool will convert between the following coordinate formats:
  • DD—Decimal degrees
  • DDM —Decimal minutes
  • DMS—Degrees-minutes-seconds
  • GARS—Global Area Reference System
  • GEOREF—World Geographic Reference System
  • UTM —Universal Transverse Mercator
  • USNG—United States National Grid
  • MGRS—Military Grid Reference System

To convert between coordinate formats using the Convert Coordinate Notation tool, follow these steps:
  1. Open the tool and select the table or feature class that has the values for conversion.
  2. Set an output location for the converted values to be saved.
  3. Set the X/Y fields and the Input/Output coordinates.
  4. Optionally, set an ID as the output will not carry over existing attribute fields.

5. Set up a table join so that the new format can be accessed in the original table.


Be sure to check out the Convert Coordinate Notation tool help for more information and also to learn the format of each notation.
Timothy H. – Senior Support Analyst

The Keyhole Markup Lanuage (KML) is a popular format for distributing GIS data and models.  KML files are usually small enough to email, and they can be opened in a variety of free viewers.  KML is an option when exporting models from CityEngine.  You may find that the models are not being displayed in the expected orientation when viewed in Google Earth.

©2012 Google and ©2012 Commonwealth of Virginia

ArcGIS and Google Earth store and  interpret KML files differently in that the Google Earth version is rotated by 180 degrees.   Because of this rotation difference, you will need to use one of the export presets  based upon the software that will be used to view the data.KML_PresetOption.jpgThe Google Earth option sets a heading correction of 180 degrees.  This allows the model to display correctly.  Keep in mind though, if you apply the Google Earth preset, the KML will not display correctly in ArcGlobe.

©2012 Google and ©2012 Commonwealth of Virginia

Timothy H. - Raster/3D Support Analyst

Have you ever set up a workspace in CityEngine, copied your project into the workspace folder, but found that CityEngine didn't recognize the new folder? This can be avoided by following the import project workflow described below.


CityEngine Workspace1. Go to File > Import...2. Select Project > Existing Projects into Workspace.


3. Select the root directory and then select the project to be imported.

You can also choose the option to copy the project data over.  If this option is not selected, the project content will be linked into the workspace.


Once the import process completes, the projects folder will display in the navigator for the current workspace.  If it does not show, you may need to refresh the worksapce (File > Refresh Workspace).

Updated Workspace

Timothy H. - Raster/3D Support Analyst
buildings_colored-150x150.pngCityEngine is a powerful product that can build amazing cityscapes.  Digging into this software can be a little tricky at first; however, the more you use it, the easier the functionality becomes.  Esri CityEngine on the ArcGIS Resource Center is a great place to start, as you take on the learning curve.  There are some tutorial videos and data templates available that will help you to better understand the software.  In addition to these resources, here are five quick tips for basic functionality within CityEngine.

Downloading Tutorials and Example Data
DownloadContext.jpgOpen the Help menu > Download Tutorials, then download the desired Tutorials and Examples from the Download Tutorials and Examples dialog.

During the download process, the option to run in the background can be set in the data status window, so that you can continue to work on your scene while the data is loaded.

View Settings
cityengine_viewsettings.jpgThere are a wide range of view settings that can be accessed from the Viewport settings dropdown. To the scene, you can alter lighting settings, activate reference information (grid, axes, compass, etc.).

There are also settings for the 3D display, such as wireframe, shaded, textured, or textured display with wireframe. Also, take note of the shortcut keys for toggling these settings.

Save Screenshot
SaveSnapshot.jpgFrom the bookmarks button in the viewport, you can access the functionality to save a snapshot/screenshot. The output dimensions can be set along with additional information elements. There are a variety of formats available to save the screenshot (.png, .jpg, .tiff, .bmp, etc.).

CityEngine Shortcuts
shortcuts.jpgThe Key Assist can be accessed from the Help menu or by pressing CTRL + SHIFT + L.  This will open a dialog at the bottom right corner with a list of all the shortcut keys.

With the Key Assist Window you can press CTRL + SHIFT + L again, to open the Preference dialog, where the default settings can be modified.

Window Layout
WindowLayoutSmall.jpgThere are many windows available within CityEngine, and you may find yourself looking for a specific one, such as the Viewport or Navigator. The Window Menu will give you access to all windows individually.
Using the spacebar, you can maximize a window to the full screen, docking the other window on the right border. Predefined layouts are available via the Window Menu > Layout.

There is also the ability to save a custom perspective if you have a particular setup you like.
I hope these tips have helped get you started using CityEngine. If you need additional help, visit the CityEngine section in the Support Knowledge Base or the CityEngine forums.

Timothy H. - Raster/3D Support Analyst

Trail hiking can be a fun and exciting activity when you properly prepare for the hike.  An important step for preparation is knowing the trail.  Some key factors include: length, minimum elevation, maximum elevation, and slope.  If you do not have a trail information guide, you can easily calculate this information with ArcGIS for Desktop.First you must gather a polyline file for the trail and an elevation raster for the area of interest.Add-Surface-Information-MXD.jpg

3DToolbox.jpgThen use the Add Surface Information Tool which is found in the 3D Analyst Toolbox.

This tool takes the input surface and interpolates the heights for the features by converting them to 3D in the background.  It then calculates the 3D properties for these features and writes the property values as attributes to the input feature class.

From the Add Surface Information tool dialog input these required parameters:
  • Input Feature Class: Hiking Trail Polyline Layer
  • Input Surface: Elevation Raster
  • Output Property: Select desired properties to be calculated

Once the Add Surface Information tool completes the calculation process, the selected Output Properties are appended to the input feature table.ProcessedTable1.jpg

With this information you are now able to properly plan your hiking trip.  In addition to this hiking example, there are a several other applications for this concept such as for use with bike paths, pipelines, streets, and drainage areas.Timothy H. – Raster/3D Support Analyst
ArcGIS  Desktop has a lot of useful extensions beyond the core product. Some of the available extensions include ArcGIS Spatial Analyst, ArcGIS 3D Analyst, ArcGIS Network Analyst, and ArcGIS Data Interoperability. Each of the  extensions can be evaluated before purchasing.

If you have chosen to evaluate or purchase an extension and found that  you were unable to activate the extension on your machine, then there are a  couple areas to check.

Check that the extension has been  installed (Customize > Extensions)

The extension  will be listed in this dialog if has been installed. An empty list means no extensions have been  installed.image002.jpgimage002.jpg

If the extension has not been  installed, then you will need to modify the ArcGIS Desktop installation to  include the extension.
  1. Open Programs and Features (Add/Remove Programs) from the Control Panel.
  2. Right-click the ArcGIS Desktop 10 > Uninstall/Change.
  3. Navigate to ArcGIS Desktop 10 Setup > Modify.
  4. Select the extensions to be installed by changing the drop down menu status beside each one.
  5. Click Next to follow the remaining installation instructions.(Note that the system may request that you provide the installation media.)image004.jpg

Once you have confirmed that the  extension has been installed, activate the extension (Customize > Extension).

Check that the extension can be  activated

Activating an extension from the  Extensions window will allow that functionality to be available.Note that you must  activate the extension in each product that you use (ArcMap, ArcCatalog,  ArcScene, etc).image006.jpg If you are unable to activate an  extension and get an error message that the license is not currently available,  please check the ArcGIS Administrator to see if the extension is available on  your existing system or through the license manager. The license may already be checked out by  another user, or it may not be authorized for use on the machine. Related LinksAdding additional installation featuresAbout evaluating ArcGIS Desktop extensionsViewing license availabilityAuthorizing ArcGIS single use products and  features  H. - Raster/3D Support Analyst
Have you opened your scene document to find a warning that the base surface for your 2D data cannot be found? The only thing different with this document is that it was saved as a previous version from ArcGIS 10.0 and you’re now opening it in ArcScene 9.3.1.

If the TIN appears to have a broken data source (the greyed out checkbox with a red exclamation point next to it), check the data source to see if the TIN file has been replaced with a folder.

If you encounter this issue, you have a TIN that was created using a different triangulation version. You will need to use the Copy TIN tool in ArcGIS 10 and set the version to ‘PRE_10.0’.

Once you save a copy of a TIN using the ‘PRE_10.0’ version option, the TIN will be properly read by previous versions of ArcGIS. The new TIN can then be added into the document or set as the data source of the original TIN.

One other thing to note - there is an option within the Environment Settings to set the default storage version. Setting this option before creating your TIN will allow you to avoid the need for creating a copy of the TIN. If you choose to use the ‘PRE_10.0’ setting, the TINs can be read in ArcGIS 10.0 and previous versions, as well.Related LinksTimothy H. - Raster/3D Support Analyst
Mosaic Datasets are a great addition to ArcGIS 10. However, if your imagery is not displaying properly, it can be very frustrating. Three main reasons that your imagery may not be displaying are:
  1. You have not built overviews (See: Mosaic dataset: wireframe not image, huh?)
  2. You do not have access to your source rasters (the images used to build the mosaic dataset).
  3. You moved your overviews or source rasters to another location.

If you have built overviews properly, your imagery will display at full extent. However, if your images disappear and turn gray when you zoom in, you don’t have access to your source rasters. The cause for this is that either you do not have permission to the location of the source rasters or that the source rasters have been moved.

Check which reason applies to your situation, and use the Repair option to determine the folder paths of the source rasters.
  1. Right-click the mosaic dataset in the Catalog Window > Repair…

2. Copy the Old Path from the dialog and paste into Windows Explorer.

If you are denied access to the folder, it’s a permissions issue. If the raster images are not found at that location, you’ll need to repair the mosaic dataset to use the correct path to the rasters.

To correct this, go back into the Repair Mosaic Dataset dialog and input the correct folder path location.
  1. Right-click the mosaic dataset in the Catalog Window > Repair…
  2. Increase the Folder Paths Depth
  3. Input the new folder path for the source rasters using one of the below options.
    1. Click the ellipse button to the right of the New Path input and browse to location.
    2. Browse to the new folder in Windows Explorer and copy/paste the path.
    3. Type in the correct path.
Note: If there are any errors with the new path, including leading/trailing spaces, the error will be carried into the Mosaic Dataset and the source rasters will not be repaired. This tool basically does a find and replace within the mosaic dataset.

Notice that there is also the option to show only the broken paths. If this option was checked (as in the below example), the overviews path would not be listed because they aren’t broken.

After repairing the source paths for the rasters, either refresh the display or remove/re-add the mosaic dataset. The imagery should then display at all scales.Related Links:HowTo: Find the paths of source data when the mosaic dataset has many rowsMosaic dataset: wireframe not image, huh?Timothy H. -Geodata Raster Support Analyst
Imagine you're the GIS Data Manager for New York City and receive a request for data from a consultant for Central Park. The data request included roads, streams, soils, buildings and other feature classes that are stored in the master geodatabase for the city. Instead of providing the entire geodatabase, you clip the data down to just the park boundary.

In order to clip the data, you have the options to clip the features individually or set up a batch clip. However, there's a more efficient way. With the iterator functionality available in ArcGIS 10, a simple model using the Iterate Feature Class iterator and the Clip tool can provide an efficient way to extract the subset of data.

Within ModelBuilder add the Iterate Feature iterator (Insert Menu > Iterators > Feature Classes) and the Clip tool.  Connect the iterator output feature class as the input to the Clip tool.

Below are the parameters that can be specified for each of the components.
    • Iterate Feature Classes
      • Workspace or Feature Dataset
      • Wildcard
      • Feature Type
      • Recursive
    • Clip
      • Input Features
      • Clip Features
      • Output Feature Class
    • XY Tolerance

For the clip output feature class, you can use a variable based upon the name being generated from the iterator.   An example of this can be seen in the interface below with the percent symbols.Examples of inline model variable substitution

Based upon the variable for the output feature class name, the output of the model keeps the original name with ‘_clip' added on.

After setting up the model and defining the desired parameters, this process can be accessed from your toolbox to easily clip a workspace or feature dataset for any project requiring you to work with only a subset of you master data.

The above model example can be downloaded from the ArcGIS Geoprocessing Model and Script Tool Gallery: Clip Workspace.Timothy H., Support Analyst - Geodata Raster Group, Esri Support Services
A Keyhole Markup Language (KML) file is a great way to view GIS data outside of ArcMap. Although there are many different ways to package and make data available, KML provides a simple format that can be viewed in a myriad of applications and can also be easily distributed to others.

Map layers can be converted to KML through the tools within the To KML toolset (ArcToolbox > Conversion Tools > To KML).

Although the tools within this toolset produce a KML quickly, the output lacks attribute data if not set up correctly. As in the example below, the KML only has the feature name. The name comes from the label expression of the ArcMap layer.

As you can see in the following screen shot, the Major Lakes Feature Class has some valuable attribute data that could be helpful if added to a KML file.Steps to Add Attribute Data to KML Files
1. Open Layer Properties of the layer to be converted to KML.
2. Click on the HTML Popup Tab
3. Check “Show content for this layer using the HTML Popup tool 4. Select the desired HTML formatting.
a. The table of visible fields is the default option and best for HTML content embedded inside geodatabase fields.
b. The URL is best for pointing features at a set of predefined HTML pages.
c. The formatted page based on an XSL template is best for advanced formatting.
5. Verify the HTML format.

A HTML Verification window will display an example of the popup.

Once you have the desired results, proceed to use either the Layer to KML tool or the Map to KML tool to create the KML file.

After you add the KML file to your application, you can see the added attributes for the features by clicking on it.

For additional information on KML, please see the following resources:Learn More about KMLPreparing your map documents in ArcGIS for KML publishingLayer to KML (Conversion)About KML support in ArcGISSetting HTML pop-up properties for feature layers
-Timothy H., Support Analyst – Geodata Raster Group, Esri Support Services - Charlotte, NC

Filter Blog

By date: By tag: