Table queries and other features in ArcGIS Server 10

ArcGIS 10 has lots of new features that have gotten attention, such as editing via REST-based clients (Flex, Silverlight, etc.) and new online mapping features at arcgis.com. For developers who’ve been working with ArcGIS Server for a while, there are more items that will make our lives easier. Among those that have caught my eye are:

  • An option to have the server check for invalid data connections and repair them. Clients often have problems with ArcSDE connections breaking overnight, especially when those connections go through firewalls (yes, not a good idea, but it happens). Hopefully this option will help keep those services working right.
  • Symbology information in the REST API, which might be useful for constructing not only client-side layer symbology but also legends (which clients almost always want despite reluctance of ESRI to admit it).
  • Support for server object extensions through REST. This should enable more efficient and advanced functionality for client-side applications using ArcObjects functionality. We’re thinking of trying this out for our custom layout printing.
  • Support for well-known text in coordinate systems. We have several clients who use custom projections that do not have a standard number (WKID), and this should help with using their data and services, especially when mixing with other coordinate systems such as those in ArcGIS Online services.

One new feature we’ve found useful already is the ability to query stand-alone tables. Rarely do we create an application where all of the data are exposed in spatial layers. Client applications usually need to query or display plain tables at some point.

In server-side applications like ones using the ADF for .NET, querying those tables has traditionally meant using database components such as ADO.NET to connect to and query those tables. Not a huge hassle, but it meant switching gears to a different environment. In client-side applications like Silverlight or Flex, it becomes a more significant challenge.  You need to write a server-side component, such as a Web service, to query the database and pass results to the client. The results have to be transformed to a custom type because clients don’t understand the database objects directly. For instance, Silverlight clients, despite being .NET-based, do not support ADO.NET types like DataSet or DataTable.

But now in ArcGIS Server 10, you can add a table to your map document (MXD), and the service exposes that table as a layer-like object. You can query and interact with it very much like a spatial layer, except of course only in terms of its attributes. You can query directly in the REST API, or in one of the client-side APIs like JavaScript, Silverlight or Flex.

We used table querying recently in a Silverlight application to query a stand-alone table of parcel attributes. In previous times we would have done the web service approach, which would have consumed several hours to create, refine and test. Plus it would have involved handling more data in more ways, requiring more work to handle data and potential errors. Instead, with table queries, we were able to query the parcel table right alongside the spatial layers when the end user went to perform a search. The Silverlight query task worked just like it does with a spatial query on a layer, except it returns just the attributes. We were able to take the results of the table query and then find the spatial features in the parcel map layer for display and output.

That kind of ability, to work within a single API environment for both spatial and attribute queries, makes development faster and more reliable. We’re looking forward to exploring more of the new features to make better Web GIS applications.

Advertisements

2 Responses to Table queries and other features in ArcGIS Server 10

  1. Ryan says:

    Thanks for this article, was just looking to do the same. Didn’t want to have to create a WCF service for one table and already working with the ArcGIS WPF API.

    It looks like we have to serve up at least one layer with the table though, won’t let me publish without one. At least publishing as an MSD, which I prefer since 10.1 will be dropping MXDs in server. So I just created a dummy layer. You find a way around that?

    Thanks again!

  2. Stephen Bourne says:

    Can you edit the data in a table, in addition to just querying it?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: