Tag: Best Practices

When is ArcPy automatically available and when do I need to import it?

One of the changes for Beta 2 is that the Python window automatically imports arcpy, so you no longer need to perform this step.  For standalone scripts and for scripts used in script tools (both validation and execution) you still need to import arcpy, because these may execute outside the desktop process environment.  Within the Calculate Value model tool and wherever Python expressions are used within Desktop dialogs, expressions do not need to import arcpy, as it inherits from the application.

 Tip provided by Bruce Harold

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

What is ArcPy?

ArcPy is a site-package that builds on (and is a successor to) the successful arcgisscripting module. Its goal is to create the cornerstone for a useful and productive way to perform geographic data analysis, data conversion, data management, and map automation with Python.

This package provides a rich and native Python experience offering code completion (type a keyword and a dot to get a pop-up list of properties and methods supported by that keyword; select one to insert it) and reference documentation for each function, module, and class.

The additional power of using ArcPy within Python is the fact that Python is a general purpose programming language. It is interpreted and dynamically typed and is suited for interactive work and quick prototyping of one-off programs known as scripts while being powerful enough to write large applications in. ArcGIS applications written with ArcPy benefit from the development of additional modules in numerous niches of Python by GIS professionals and programmers from many different disciplines.

Click here for a more information on ArcPy


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

The Geographic Approach to Water Utility Customer Self Service


Hopefully you’ve had a chance to try out the first version of “Water Utilities Citizen Service Template” in the template gallery.  We’re about to release a new update to the template that includes some great enhancements.  We’ve also decided to rename the template to something more descriptive, the “Water Utilities Customer Interaction Template”.  Currently we’re testing the installation and configuration instructions, but in the meantime you can try the new template here – http://waterutilitiestemplates.esri.com/CustomerInteraction/

The intent of this template is to demonstrate how a water or wastewater utility can use a web based mapping application for better customer self service.  Web based self service is nothing new, many companies and governmental entities have include forms, information and applications on their websites designed to empower customers or constituents to do some form of self service.  The benefits of web self service are well known and proven – cost reductions, faster response and increased customer satisfaction.  Of course to make that happen you have to use the right technology and also the right workflow behind the technology.

Another way that we’ve been thinking about web based self service for water utilities is that it’s a bi-directional sharing of information.  Meaning that customers may have some information they need to share with a utility and the utility may also have some information that it needs to share with customers. 

The first version of this template was really focused on the customers sharing information with the utility, or more appropriately making a request of the utility for some service.  For example notifying the utility of a leaking valve in the street or a hydrant that appears like it’s damaged. 

The second release of this template introduces ways that utilities can use a web based map to share information better with their customer (and that’s why we changed the name). We’ll save a more detailed exploration of why and how water utilities should be sharing information back with customers and the general public for another blog.  We think it’s a compelling enough topic that we want to explore that on its own.

Now let’s get back to the topic at hand, the Geographic Approach to Water Utility Customer Service.  It’s a simple premise, and builds on the general concepts of the “Geographic Approach”, just about everything that a water utility owns, operates or serves has a geographic location and can be mapped.   Through mapping your assets, customer and operational data you’ll gain a better understanding of how they impact each other.  Service request and the work orders they generate are a key pieces of operational data that have a spatial component and should be mapped or tied back to an asset that has a location. 

Part of the geographic approach for water utilities is the fact that it’s easier for human beings to understand information when it’s in the form of a map.  Maps provide a richer context then information that is just textual or tabular.

So, what does the geographic approach mean for customer self service at water utilities? It means if you are deploying customer self service capabilities to your website, you should include a web based interactive map if there is a spatial component to the information being communicated.

Some examples of where a water utility could benefit from an interactive map for customers self service are:

  • Service requests – A well designed and simple to use web map for service request should be less confusing to customer than a text based form.  For example, we’ve seen a number of customer service request web pages that rely on some text based forms that key off an address.  But most water utility assets don’t have an address, what they have is a spatial location.  It’s confusing the customer to make them try and figure out the nearest address for something they are requesting service for.
  • Asset status – while the thought of doing this still keeps some utilities up at night, we are seeing the start of a trend in the industry towards giving a limited view into the location and operational status of certain water utility assets to the public.  A good example of this is fire hydrant operational status maps.
  • Operational information – Leaks, workorders, project work areas, and service outages.  This is dynamically changing information that also has a spatial component.  You’ll sometimes see this type of information posted on a water utility webpage as text or maybe with a polygon on a static map in a PDF.
  • KPIs – Some utilities track KPIs by spatial areas such as operational area or by city council district or the like and share this information back out with the public.  You’ll often see this information presented in a table, but its spatial information and can be better presented to the public in an interactive map.

Lastly, if you’ve been looking at both the Water Utility and the Public Works Resource Centers, you may have noticed that we have the same Customer Self Service template posted on both.  No, that’s not because we are lazy… it’s because any entity that needs to take service requests around assets can benefit from this template.  That’s also why when you download this template you’ll find service requests for general public works as well as water, sewer and stormwater.  When you configure the template you can just remove service requests that aren’t applicable to your organization and add additional ones that are.

Posted in Water Utilities | Tagged , , , , , , , , , , , , , , , , , | Leave a comment

Enhancements to map navigation and layout elements with ArcGIS 10

In previous posts we’ve talked about using the Basemap Layer to improve your navigation experience.  There are also a set of changes that we made to navigation that help you take advantage of the Basemap Layer’s seamless panning and zooming capabilities.

Something new at ArcGIS 10 is QuickPan mode.  QuickPan allows you to navigate continuously in any direction without having to change tools. 

To enable QuickPan with just the mouse, place your mouse over the map area in ArcMap and hold down the middle mouse button without moving the mouse.  The cursor will change to a four-sided arrow (see below) to indicate that QuickPan mode has been enabled. 


Hold down the middle mouse button to activate QuickPan: the cursor above shows it’s enabled.

After the cursor changes, move your mouse in any direction away from the starting point to pan the map in that direction.  Release the middle mouse button to end the pan.

Another way to enable QuickPan is by holding down the Q key.  The cursor won’t change, but you can still navigate simply by moving your mouse in the direction you want to go.  Release the key to stop panning.  Keyboard-activated QuickPan is useful because you can pan continuously while simultaneously editing or using other tools.  This is great for heads-up digitizing large features from a raster dataset – no more switching tools!

One more thing to note: if you have hardware acceleration enabled (see our previous post for more information on how to enable it), you can use keyboard QuickPan with your mouse wheel to allow zooming in and out while panning simultaneously.

Modifier keys for panning
All the same keyboard shortcuts for panning are still there in ArcGIS 10, but with an enhancement.  By using CTRL (speed up) and SHIFT (slow down) keys in conjunction with the arrow keys or QuickPan, you can vary the rate at which ArcMap pans the display. 

Nudging elements on a Page Layout
Most of the above navigation shortcuts are used to navigate the map in data view.  The arrow keys are also used to “nudge” elements on a page layout, and we made these same enhancements to the keys when they’re used for that purpose.  You can also use the CTRL (faster) and SHIFT (slower) keys together or separately to modify the speed at which an element is nudged.  This makes it much easier to get your elements exactly where you want them with a minimum of keystrokes.

We’re excited about these new navigation capabilities, and we hope they’ll make your day to day usage of ArcMap easier and more productive.  Give them a try, and let us know what you think!

Content provided by Jeremy Wright


Posted in Uncategorized | Tagged , , , , , , , , | 8 Comments

Display options for Hardware Acceleration and Remote Desktop

A big part of our efforts to improve the display performance of ArcMap is the addition of hardware accelerated drawing for Basemap Layers and raster layers accelerated with the Image Analysis toolbar.  By using your graphics card’s hardware instead of your computer’s CPU, we have improved the smoothness and responsiveness of panning and zooming of supported layers in ArcMap.

Enabling hardware acceleration
Because some user’s machines may not be able to support hardware acceleration with acceptable performance, the option is off by default.  To try hardware acceleration in ArcMap, go to the Customize menu and choose ArcMap Options.  Go to the Data View tab.  Here you’ll find a checkbox for “Enable Hardware Acceleration for supported layers”. 

This checkbox will be grayed out if hardware acceleration can’t be enabled for this ArcMap session.  This can occur if one of the following is true:

  • Your graphics card has corrupt or out-of-date drivers, or doesn’t support the functionality necessary to utilize hardware acceleration.
  • You are trying to enable hardware acceleration while accessing the machine via remote desktop.
  • You have previously accessed this machine via remote desktop while this session of ArcMap was open (more on this later in this post).

Keep in mind that hardware acceleration won’t have any effect if you don’t have any Basemap Layers or accelerated raster layers in your map.  You can quickly add a Basemap layer from ArcGIS Online by clicking the drop-down arrow next to the Add Data button and choosing Add Basemap.

“Add Basemap” lets you quickly add an ArcGIS Online Basemap Layer

Disabling continuous display for remote desktop sessions
Over lower-bandwidth remote desktop connections, the continuous drawing of Basemap Layers or raster layers accelerated with the Image Analysis toolbar can result in poor interactivity.  By default, continuous drawing is disabled when ArcMap is accessed over a remote desktop connection.  If you have a high-bandwidth connection to the remote machine, you can enable continuous drawing so that you still get the fast refresh capabilities of your Basemap Layers or accelerated raster layers.

On the ArcMap Options menu (Customize->ArcMap Options, Data View tab) you will find the option to Enable continuous updates during navigation.

Remote Desktop and Hardware Acceleration
Since remote desktop sessions all draw on the remotely accessed machine, hardware acceleration provides little to no performance benefit.  Thus the hardware acceleration setting will be grayed out when ArcMap is accessed over a remote desktop session. 

A special note: due to a limitation in windows GDI, once an ArcMap session has been accessed over remote desktop hardware acceleration may be disabled until ArcMap is restarted.  To re-enable hardware acceleration, just save your work, close ArcMap and reopen it.  The hardware acceleration setting will be available again.

For more info on Basemap Layers

Content provided by Jeremy Wright


Posted in Uncategorized | Tagged , , , , | 2 Comments

Creating dynamic locator maps and adding page effects to your data driven pages

There are some great enhancements in ArcGIS 10 that work in conjunction with data driven pages and make it possible to create dynamic locator maps and add some interesting page effects to your map books.

A new data frame extent option, Other Data Frame, has been added that makes it possible to synchronize the extent of your main data frame with the extent of one or more additional data frames. If you pan and zoom in the main data frame it will automatically pan and zoom in the additional data frames. This can be useful if you have two themes you want to show side by side and keep the same extent in both data frames, and you can use this new extent option to create dynamic locator maps. Locator maps show a larger area than focus map, and often highlight the focus area giving the map reader a better reference to the maps location. The Other Data Frame extent option allows you to specify a margin that makes it possible to define a larger area, while at the same time having the locator map pan and zoom using the extent of the main map. You can also zoom to features that intersect the extent of the main map. For example, if you are making a County Atlas of the United States, you can add a locator map that updates its extent to the state that includes the current county. For example, if you are San Diego County, California then the locator map will zoom to California, and when you move to Travis County, Texas the locator map will automatically zoom to Texas.  To learn more about the new map extent options see the Desktop help.

There are also some additional ways to highlight the main map in your locator map. If you are using data driven pages you can highlight the extent using the shape of the index feature. This is the new default when using an Extent Indicator. This used to be the Extent Rectangle, but this new functionality means you can use any feature shape, so the rectangle part didn’t make sense any more, but you can still use the extent rectangle by selecting the “Use simple extent” option.  Since you can use the shape of the data driven page index feature, you can do more than just outline the extent, you can give the entire shape a different color by going into the frame properties and defining a background color.  To learn more about extent indicators see the help topic.

There are other enhancements that make it possible to add some new page effects to highlight the current data driven page. Clip to Shape has a new option to use the data driven page index feature’s shape and another new option to allow you to exclude individual layers from clipping. This makes it possible to only clip the layers you want, while allowing other layers extend to the edge of the data frame. This means no more empty white space around your Clip to Shape extent, and it also makes it possible to highlight the current page by displaying the index feature area in a different color. To learn more about the new Clip to Shape options see the help topic.

There is also a new Page Definition Query that can be added to your Definition Queries when working with data driven pages.  The page definition lets you filter features that have attributes that either match, or don’t match the name of your data driven page index feature. This makes it possible to include features, or not include features, based on the current page. For example, many atlases require an overlap area between pages and unique annotation is required for each page where the text has been moved to avoid being clipped at the edges. By attributing the annotation with the associated page name, you can use a Page Definition Query to only show the annotation that belongs to the current page. To learn more about page definition queries see the help topic.

Content provided by David Watkins

See recent post on Data Driven Pages

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

Updated Training Plan for Water, Wastewater and Stormwater Utilities

We recently completed our first revisions to the Training Plan for Water, Wastewater and Stormwater Utilities that we initially released in early November. 

We’ve made some minor content changes based on feedback from water utilities, done some formatting clean up and also significantly reduced the file size by optimizing the graphics in the document.  So it should be much easier to download and email the plan now.  You can download the updated Training Plan below.

Posted in Water Utilities | Tagged , , , , , , , , , | Leave a comment

Webcast Exploring the Water Utility Resource Center – December 2nd

We’ve decided to repeat our webcast that explored the Water Utility Resource Center and gave an overview of ESRI Enterprise License Agreements for water, wastewater and stormwater utilities.  When we offered this webcast last month we had to 2 completely full sessions and hand a good number of people registered on a waiting list.  So we thought it would be best if we gave everyone another opportunity to participate in these webcasts.

On the webcast we’ll briefly touch on the business drivers for water utility GIS and then demonstrate the templates currently available on the Water Utility Resource Center.  We’ll than explore the ELA as an licensing mechanism for water utilities.

We’ll also have time to answer your questions at the end of the webcast.  We had some excellent discussions about water utility GIS during our November webcasts, so we encourage you to bring your questions.

You can sign up for the December 2nd webcast here: http://events.esri.com/info/index.cfm?fuseaction=showSeminar&shownumber=13107

We’ve had a lot of great comments from the water utility GIS community saying that we should do water utility GIS focused webcasts more often.  So starting in January 2010, we are also planning on doing a series of monthly webcasts focused on water, wastewater and stormwater GIS.  We tentatively planning on a webcast focused on ArcGIS Water Distribution Capital Planning template in January.  We’ll post more details shortly.

Posted in Water Utilities | Tagged , , , , , , , , , , , , | Leave a comment

Refreshing your Java Server Object Extensions

For those of us developing Server Object Extensions, knowing when and how to update your extensions is not always intuitive.

For example, if I modify the code in my SOE, do I need to re-register the extension with the ArcGIS Server “manually”, using the soemanager tool? Or do I just need to restart the SOM?

The answer is this: it really depends on the kind of changes you’ve made to your SOE.

Here are some cases to consider:

If you’ve modified your SOE code in the following ways, only a SOM restart is needed:

  1. The core implementation of the SOE changed (method body changed).
  2. A new custom interface was introduced.
  3. An existing custom interface was changed.

This is good news. I would probably guess that these cases above are the most common modifications.

However, for the following kinds of changes, a complete unregistration, restarting of the SOM and re-registration using soemanager tool are needed.

  1. Package name of the SOE changed
  2. Name of the SOE changed

    Now, this approach can be problematic, depending on how wide-spread your SOE deployement is. So it’s always good to plan ahead and evaluate whether or not package and SOE name changes are going to occur frequently.

    Just something to think about.


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

    Developing cross-platform Java SOE's

    in the spirit of Java’s “Write once, run anywhere” slogan, the question frequently comes up with respect to Java SOE’s.  Can Java SOE’s be deployed on ArcGIS Server for .NET?  The answer is yes, but there are some usage patterns Java developers need to consider prior to deployment cross-platform on .NET Server. 

    Developers who want to support Java SOE’s in multi-platform environments, e.g. .NET Server, need to follow the following workflow:  

    The most important factor is in how you develop the ArcObjects in your Java SOE.  Typically, we design SOE’s as ArcObjects business objects.  This is a straight forward fine-grained ArcObjects development approach and works with ArcGIS Server for Java platform because the usage is permitted.  When deploying Java SOE’s over to .NET Server platform, this will not work as the native fine-grained usage is not permitted.  In order to develop the correct usage pattern for cross-platform deployment, developers need to ensure that all ArcObjects reside in the Server Context.  This allows the usage of ArcObjects to be cross-platform and not dependent on the ArcGIS Server for Java runtime. 

    Once you have developed your Java SOE appropriately, there are some considerations in deploying and managing your SOE in the .NET environment.  The following steps are added to the normal deployment and management procedure: 

    1.  Include the following libraries/tools from ArcGIS Server for Java as these tools are not provided by the .NET Server:
    2. a. %ARCGISHOME%javalibarcobjects.jar
      b. %ARCGISHOME%javatoolsregtool.bat
      c. %ARCGISHOME%javatoolssoemanagerSOEManager.jar
      d. %ARCGISHOME%javatoolssoemanager.bat

    3. .NET Server must have a supported JRE, version 5 Update 13 (v1.5.0_13) or higher.  This is to enable the platform to run Java. 
    4. Manually deploy/register the SOE through the ‘com.esri.arcgis.interop.extn.RegTool’ class in ArcObjects.  The manual RegTool process is required because there is not a well known location on .Net Server to auto-deploy your SOE to as there is with the ArcGIS Server for Java. 
    5. e.g.: from a command line: java -classpath arcobjects.jar com.esri.arcgis.interop.extn.RegTool
      or use the regtool.bat file you copied over with the appropriate parameters.

    6. Manually add SOE to Map Server Object using soemanager.bat. 
    7. Once added to the Map Server Object, open ArcCatalog to enable the SOE on a particular Map Service.  You will not see the SOE in the .NET Manager as we only support Manager integration with the Java Server.  This means having ArcGIS Desktop is a requirement and ArcCatalog is your administrative tool for Java SOE’s on .NET Server. 

    Deploying and Managing SOE’s is documented here.  The document assumes deployment to Java Server, but the usage of SOEManager Tool and Using ArcCatalog to add/remove SOE’s is the same.  Usage of the RegTool is documented here

    Following these additional steps to your normal Java SOE development, deployment, and management workflow will enable you to keep the “Write once, run anywhere” slogan that makes Java so attractive for development of cross-platform applications.  We are working to simplify the development and deployment process with ArcGIS 9.4 such that the experience is as close to the ArcGIS Server for Java development and deployment process as possible. 


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