Monthly Archives: September 2010

Tip of the Week – Tweak your Business Analyst look

by Kyle Watson

In Business Analyst 10, we’ve added the ability to change the default cartographic outputs.  So instead of grids being yellow-to-red, you can make them green-to-blue.  You can also indicate your customers as a symbol instead of the standard dots.

For example, you are probably used to seeing this familiar ring look and feel…

 

But with some simple adjustments, the same rings can look like this (every time)…

 

We’ve done this by exposing the Business Analyst tools in the ArcGIS Style Manager.  You can try this by going to Customize > Style Manager> Business Analyst.style to access the folders and tools to make modifications.  The yellow folders are customizable.  In the example below, you can click MarketPenetrationRamp to change the green default color scheme to another style.  The next time you create a Market Penetration analysis, your new style will be applied.

Note that some operating systems, such as Windows 7, might lock the .style files due to security settings.  You can change your permissions or run ArcMap.exe as an administrator from the ArcGISDesktop10.0Bin directory.  This will allow you to change the cartographic settings mentioned above.

Hope you find this helpful.

Cheers,
Kyle

Posted in Location Analytics | Tagged , | Leave a comment

Creating and sharing map packages

By Caitlin Scopel, Esri Cartographic Product Engineer

Map Packages Thumb

In our last blog post, we talked about map packages and answered some of your questions about them. Now, you might be ready to use and share map packages. Here is a quick guide to help you get you started. Continue reading

Posted in Mapping | Tagged , , , , | 8 Comments

Styling a WMS GetFeatureInfo response with ArcGIS Server 10

The GetFeatureInfo operation on a WMS is designed to return attributes of features in the map. The WMS spec doesn’t really define the schema for the GetFeatureInfo response, so you’ll see it handled differently as you look at various WMS implementations. With an ArcGIS Server WMS, you can request the feature info in various formats, including HTML, XML, and plain text.

For example, here’s a GetFeatureInfo request along with its response in the default HTML format:

Request

http://localhost:8399/arcgis/services/ihs_petroleum/MapServer/WMSServer?&service=WMS&version=1.1.0&request=GetFeatureInfo&layers=fields&query_layers=fields&styles=&bbox=47.130647,8.931116,48.604188,29.54223&srs=EPSG:4326&feature_count=10&x=562&y=193&height=445&width=1073&info_format=text/html&

Response

Default GetFeatureInfo response

In many cases, the default response in HTML, XML, or plain text may be good enough for your own purposes, but there may be times when you want to customize the response format or schema. Perhaps you want your own look and feel to the response, or for interoperability reasons maybe you want to get the feature information back in a standard schema like GML or GeoJSON.

In ArcGIS Server 10, both server administrators and WMS clients can customize the GetFeatureInfo response using XSLT templates. This blog post explains the basic steps.

Background

When you work with a WMS created by ArcGIS Server, the GetFeatureInfo response is generated by applying an XSLT template on a raw internal XML format. This internal XML just contains a list of fields and values of identified features. A default XSLT template for the particular format (HTML, text, etc.) is applied to make the final response look readable.

Knowing this workflow, you can customize both the format and schema of the GetFeatureInfo response. You need to understand:

  • The raw internal XML format of the ArcGIS Server WMS GetFeatureInfo response
  • The default XSLT templates that come with ArcGIS Server for the different types of supported formats

Let’s tackle these one at a time.

The raw internal XML format

Here’s an example of the raw internal XML GetFeatureInfo response from an ArcGIS Server 10.0-produced WMS:

<?xml version="1.0" encoding="UTF-8"?>
<esri_wms:FeatureInfoResponse version="1.3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:esri_wms="http://www.esri.com/wms" xmlns="http://www.esri.com/wms">
  <esri_wms:FeatureInfoCollection layername="fields">
    <esri_wms:FeatureInfo>
      <esri_wms:Field>
        <esri_wms:FieldName><![CDATA[OBJECTID]]></esri_wms:FieldName>
        <esri_wms:FieldValue><![CDATA[1]]></esri_wms:FieldValue>
      </esri_wms:Field>
      <esri_wms:Field>
        <esri_wms:FieldName><![CDATA[Shape]]></esri_wms:FieldName>
        <esri_wms:FieldValue><![CDATA[Polygon]]></esri_wms:FieldValue>
      </esri_wms:Field>
      <esri_wms:Field>
        <esri_wms:FieldName><![CDATA[Shape_Area]]></esri_wms:FieldName>
        <esri_wms:FieldValue><![CDATA[0.009079]]></esri_wms:FieldValue>
      </esri_wms:Field>
        ...
        <!-- there could be more <esri_wms:Field> -->
        ...
    </esri_wms:FeatureInfo>
    ...
    <!-- there could be more <esri_wms:FeatureInfo> -->
    ...
  </esri_wms:FeatureInfoCollection>
  ...
  <!-- there could be more <esri_wms:FeatureInfoCollection> -->
  ...
</esri_wms:FeatureInfoResponse>

Notice that:

  • The root tag <FeatureInfoResponse> can contain multiple <FeatureInfoCollection> elements.
  • Each <FeatureInfoCollection> element contains the attribute fields and values of all identified features from a single WMS layer.
  • The information for a single identified feature is contained in a <FeatureInfo> tag. Notice the name-value pair for each field.

Since the whole idea of XSLT transformation involves converting one format of information to another, it’s really important to take some time to understand the above format before you continue.

Default XSLT templates in ArcGIS Server

The ArcGIS Server 10.0 installation comes with XSLT templates for the supported formats listed in the WMS’s capabilities files. You can see these default templates if you open <ArcGIS Server install location>StylesWMS. As indicated by their names, each template is used to produce the default GetFeatureInfo response in a given format. In example at the beginning of this post, the HTML table with the blue caption was produced thanks to the default XSLT for the HTML format.

XSLT templates in ArcGIS Server 10

If you ever need to get the raw XML as the response, you can set the GetFeatureInfo request parameter INFO_FORMAT to application/vnd.esri.wms_raw_xml. You might do this if you wanted to create your own template and you needed some understanding of the raw format.

How to customize your WMS GetFeatureInfo response

Given all of the information above, let’s explore a couple of ways you can customize the WMS GetFeatureInfo response in ArcGIS Server 10.0.

Modify the default XSLT templates in ArcGIS Server

You’ve seen where the default XSLT templates live, and one option is to just open them up and start tweaking the styles to fit your liking. Remember, though, that if you change these templates, it will affect any WMS published through ArcGIS Server. For this reason, avoid trying to put any map-service-specific logic into the templates.

Here’s an example change to featureinfo_text_html.xsl, the HTML template. If you opened the file in a text editor and replaced the <Style> tag with the following, you would see the table caption color change to red.

  <style type="text/css">
          table, th, td {
            border:1px solid #e5e5e5;
            border-collapse:collapse;
            font-family: arial;
            font-size: 80%;
            color: #333333
          }
          th, td {
            valign: top;
            text-align: center;
          }
          th {
            background-color: #ffb7b7
          }
          caption {
            border:1px solid #e5e5e5;
            border-collapse:collapse;
            font-family: arial;
            font-weight: bold;
            font-size: 80%;
            text-align: left;
            color: #333333;
          }
        </style>

An example response using this template would look like this:

Default GetFeatureInfo response customized with red 

Override the behavior of the default XSLT template using the xslt_template parameter

xslt_template is an Esri-specific parameter that you can set to the URL of an XSLT template file. The ArcGIS Server-produced WMS will then pick up the template and override the default template.

When using the xslt_template parameter, your XSLT template doesn’t have to follow the same naming convention as the default templates, but it does need to be available through a URL; a local path or UNC path won’t work.

Here’s an example of a GetFeatureInfo request with the xslt_template parameter:

http://localhost:8399/arcgis/services/ihs_petroleum/MapServer/WMSServer?&service=WMS&version=1.1.1&request=GetFeatureInfo&layers=pipelines&query_layers=pipelines&styles=&bbox=47.119661,28.931116,48.593202,29.54223&srs=EPSG:4326&feature_count=10&x=389&y=120&height=445&width=1073&info_format=text/plain&xsl_template=http://server:8080/dev-summit-2010/resource/xsl/featureinfo_application_geojson.xsl

The above URL references an external template that overrides the default template. The customized template looks like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:esri_wms="http://www.esri.com/wms" xmlns="http://www.esri.com/wms">
  <xsl:output
    method="text"
    indent="yes"
    encoding="ISO-8859-1"/>

  <xsl:template match="/">{
  "type": "FeatureCollection",
  "features": [<xsl:for-each select="esri_wms:FeatureInfoResponse/esri_wms:FeatureInfoCollection/esri_wms:FeatureInfo">
    {
      "type": "Feature",
      "properties":
        {<xsl:for-each select="esri_wms:Field">
          "<xsl:value-of select="esri_wms:FieldName"/>":"<xsl:value-of select="esri_wms:FieldValue"/>",</xsl:for-each>
        },
      "layerName":"<xsl:value-of select="../@layername"/>"
    },</xsl:for-each>
  ]
}
  </xsl:template>
</xsl:stylesheet>

The above template has been created to make the WMS return its GetFeatureInfo responses in plain text instead of the default HTML format. In fact, here this plain text is styled in the popular GeoJSON format. GeoJSON can be parsed by many JavaScript libraries, allowing you to integrate your responses with your Web pages in an easy-to-read format.

Here’s an example of using a GetFeatureInfo GeoJSON response as a data source of an Ext.Grid in an OpenLayers Web Map application:

GeoJSON response in a grid 

Click here (or right-click the link and save) to see the code for an example template that could be used to embed a video object in the response.

Embedded video in the response 

Click here (or right-click the link and save) to see the code for a more comprehensive example that heavily customizes the GetFeatureInfo HTML response to embed a JavaScript code snippet. The code plays a tour in the Google Earth plug-in Web application.

Notice that in this XSLT template, there is logic specific to a particular WMS service. Therefore, this template should always be referenced through the xslt_template parameter; it should not be made the default template.

Contributed by Yingqi Tang of the ArcGIS Server development team

Posted in Services | Tagged , , | 2 Comments

Map packages!

By Caitlin Scopel, Esri Cartographic Product Engineer

Map Packages Thumb

Map packages were a popular topic at the Esri User Conference this year, and we got quite a few questions about them. In this blog entry, I will cover some of those questions, as well as give a brief introduction to the new map package functionality that is available with ArcGIS 10. Continue reading

Posted in Mapping | Tagged , , , | 3 Comments

New! Download stats on shared items!

One of the new features introduced with the recent ArcGIS Online update (which went live last week) is the ability to view the number of downloads for shared items. For example, looking at the USA Population by Zip Code shared layer package below you’ll see that there have been 665 downloads:

 

The downloads are of interest to those that have shared items, and provide an indication of the item’s popularity to those browsing for data.

This one seems less popular:

The names are hidden to protect the guilty – we’d suggest that if you really want users to to download what you’ve shared that a good thumbnail, title, and summary description are a must!

Shared item types that display downloads are:

  • map packages
  • layer packages
  • desktop application templates
  • map templates
  • web mapping applications with code attachment
  • mobile applications with code attachment
  • windows mobile packages
  • code and geoprocessing samples

You can also learn more about an item’s popularity by looking at the rating, comments, and views.

Posted in ArcGIS Online, Services | Tagged | 1 Comment

Authoring layer packages that look great in 3D

Often the author of layer packages is using ArcMap and 2D symbols that drape, instead of billboard, when viewed in 3D mode in ArcGIS Explorer. Here’s some great information from Mark Bockenhauer in a recent ArcGIS Desktop blog post about how to author layer packages that work well in both display modes.

Posted in 3D GIS, Uncategorized | Tagged , , , | Leave a comment

Maintenance to ArcGIS Online Systems Thursday, Sept. 30

Some ArcGIS servers will undergo systems maintenance beginning Thursday, September 30, at 5:00 p.m. PDT. The maintenance will last approximately 12 hours. During this time users will experience temporary issues with registering a Global Account with ArcGIS.com, changing passwords, activating Subscription services, and signing up for an ArcLogistics trial. If you already have an existing account with ArcGIS Online, ArcGIS.com, or ArcLogistics, no downtime is anticipated.   

If you have questions, please post them in the ArcGIS Online forums.

Posted in ArcGIS Online, Services | Tagged , | Comments Off

Developing Add-Ins for ArcGIS Desktop 10

The next live training seminar on ArcGIS 10 is this Thursday. This Seminar will introduce you to the new way to customize and extend
ArcGIS Desktop using the Microsoft .NET Framework. ArcGIS Desktop 10
introduces the new Add-In framework to easily build and share solutions.

This seminar is for ArcGIS Desktop users who want to learn how to create or share ArcGIS Desktop add-ins

Thursday, September 30, 2010
9:00 a.m., 11:00 a.m., & 3:00 p.m. Pacific Time (US & Canada)
12:00 p.m., 2:00 p.m., & 6:00 p.m. Eastern Time (US & Canada)
4:00 p.m., 6:00 p.m., & 10:00 p.m. UTC/GMT 

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

Latest community contributions to the World Topographic Basemap

The ArcGIS Online World Topographic Basemap has been recently updated with contributions from:

  • Henrico County, VA
  • Outagamie County, WI
  • Nanaimo, BC
  • Kamloops, BC
  • and updates for Toronto, ON

Here’s some of the content Nanaimo contributed viewed using the ArcGIS.com viewer:

Here’s a section of Toronto – note the 1/2 meter contour data:

 

And here’s Shiocton, in Outagamie County, WI:

These contributions have been made through the Community Maps Program, designed to enable GIS users worldwide to contribute their authoritative content and become part of a freely hosted GIS community basemap. The data is integrated with data from other providers using a map template, then published through ArcGIS Online as a free, hosted map service.

For more information visit the Community Maps Program website, or view the live map of current and forthcoming contributors.

Posted in ArcGIS Online, Services | Tagged , | Leave a comment

Imagery Video Gallery has been updated – 5 new quick tutorials

Quick tutorial videos seem to be very popular with a lot new help systems. Our team thought it would be a great idea to create a bunch of quick tutorials and put them onto our Imagery Video Gallery.

So far we have the following videos created:
- Adding a raster dataset into ArcMap
- Opening the Image Analysis window
- Combining bands using the Image Analysis window
- Pan-sharpening a raster dataset using the Image Analysis window
- Clipping and Masking using the Image Analysis window

This is just what we have created so far.  Please give us any feedback you have about these videos.

 

Contributed by: Simon Woo

 

Posted in Analysis & Geoprocessing, Imagery | Tagged , , , , | Leave a comment