ArcGIS Server APIs


Summary ArcGIS Server has the following application programming interfaces (APIs): ArcGIS Server for the Java Platform and ArcGIS Server for the Microsoft .NET Framework.

This topic focuses on ArcGIS Server for the Java Platform. It's important to understand the relationship between the server and the server programming model if you want to build applications that go beyond simple map viewing and query.

In this topic


ArcGIS Server for the Java Platform

ArcGIS Server for the Java Platform is a collection of object libraries that contain the ArcObjects necessary to write an application that connects to the geographic information system (GIS) server and makes use of server objects. These object libraries are available to any developer who installs the ArcGIS Desktop, ArcGIS Engine, or ArcGIS Server products.
You can build different types of ArcGIS Server applications including multiuser server applications, such as Web applications and Web services. ArcGIS Server also supports single-user desktop applications and the ArcGIS Engine and ArcGIS Desktop products. The following illustration shows the relationship between the GIS server, ArcObjects, and single and multiuser applications.
You can also write different types of applications using ArcGIS Server. Using the ArcGIS Server Java Software Development Kit (SDK), you can build server applications, such as Web applications and Web services. These applications are deployed using the appropriate runtime.
ArcGIS Engine developers can build desktop applications that use ArcObjects running on the GIS server. ArcGIS Desktop developers can extend the ArcGIS Desktop applications to include functionality that uses the GIS server. In these cases, the deployment of the application requires an ArcGIS Engine runtime deployment license or an ArcGIS Desktop license, respectively.
In the case of ArcGIS Desktop and ArcGIS Engine, developers who write desktop applications that use the server will have ArcObjects installed on the machine on which the application is both developed and deployed. When using these products to write applications that use ArcGIS Server, you must follow the same programming guidelines as a developer using ArcGIS Server for the Java Platform to build a server application, such as a Web application that is deployed in a Web server. The only difference is that in the case of the desktop application, each instance of your application is bound to a single user session (though there could be multiple instances of your application running at any time), while Web applications or Web services are multiuser/multisession applications.

Programming with the server API

Programming with the server API is about remotely programming ArcObjects. Programming ArcObjects remotely is the same as programming ArcObjects for use in desktop applications; however, there are additional details and programming guidelines you need to follow. You need to understand the following:
  • How to connect to the server
  • How to get objects that are running on the server
  • How to create new objects on the server
  • The most effective ways of working with remote ArcObjects

Object libraries

ArcGIS Server developers have access to a set of visual Web controls that permit the use of many properties, events, and methods. Although a simple application can be built with just the controls, practical applications of the server require knowledge of the object libraries that compose ArcGIS Server. The libraries contained in ArcGIS Server are summarized here. The following two diagrams show the library architecture of ArcGIS Server. Understanding the library structure and its dependencies and basic functionality will help you as a developer navigate through the components of ArcGIS Server. The libraries are discussed in dependency order. The diagrams show this with a number in the upper right corner of the library block.
For a comprehensive discussion on each library, refer to the library references in the ArcGIS Engine help.
Object libraries are logical collections of the programmable ArcObjects components, ranging from fine-grained objects—for example, individual geometry objects—to coarse-grained objects, which aggregate logical collections of functionality—for example, an ArcMap object to work with map documents. Programmers use a number of standards-based APIs, such as COM, .NET, Java, and C++. These same libraries are used to program ArcGIS Desktop and ArcGIS Engine.

System

The System library is the lowest level library in the ArcGIS architecture. This library contains components that expose services used by the other libraries in ArcGIS. There are a number of interfaces defined in the System library that you can implement. You cannot extend this library; however, you can extend the ArcGIS system by implementing interfaces contained in this library.

SystemUI

The SystemUI library contains the interface definitions for user interface (UI) components that can be extended in the ArcGIS system. These include the ICommand, ITool, and IToolControl interfaces. The objects contained in this library are utility objects that are available to simplify some UI developments. You cannot extend this library; however, you can extend the ArcGIS system by implementing interfaces contained in this library.
The library dependency order is important since it affects the way in which developers interact with the libraries as they develop software. Understanding the dependencies also helps when deploying your applications.

Geometry

The Geometry library handles the geometry, or shape, of features stored in feature classes or other graphical elements. The fundamental geometry objects with which most users interact are Point, Multipoint, Polyline, and Polygon. In addition to those top-level entities, there are geometries that serve as building blocks for Polylines and Polygons. Those are the primitives that compose the geometries. They are Segments, Paths, and Rings. Polylines and Polygons are composed of a sequence of connected segments that form a path. A segment consists of two distinguished points, the start and the end point, and an element type that defines the curve from start to end. The types of segments are CircularArc, Line, EllipticArc, and BezierCurve. All geometry objects can have Z, M, and IDs associated with their vertices. The fundamental geometry objects all support geometric operations such as Buffer and Clip. The geometry primitives are not meant to be extended by developers.
Entities in a GIS refer to real-world features; the location of these real-world features is defined by a geometry along with a spatial reference. Spatial reference objects, for both projected and geographic coordinate systems, are included in the Geometry library. Developers can extend the spatial reference system by adding new spatial references and projections between spatial references. The following diagram shows the library architecture of some of the ArcGIS Server objects.

Display

The Display library contains objects used for the display of GIS data. In addition to the main display objects responsible for the actual output of the image, the library contains objects that represent symbols and colors used to control the properties of entities drawn on the display. This library also contains objects that provide the user with visual feedback when interacting with the display. Developers most often interact with Display through a view similar to the ones provided by the Map or PageLayout objects. All parts of the library can be extended; commonly extended areas are symbols, colors, and display feedbacks.

Server

The Server library contains objects that allow you to connect and work with ArcGIS servers. Developers gain access to an ArcGIS server using the GISServerConnection object. The GISServerConnection object gives access to the ServerObjectManager. Using this object, a developer works with ServerContext objects to manipulate ArcObjects running on the server. The Server library is not extended by developers. Developers can also use the GISClient library when interacting with ArcGIS Server.

Output

The Output library is used to create graphical output to devices, such as printers and plotters, and hardcopy formats such as enhanced metafiles and raster image formats (JPG, BMP, and so on). You can use the objects in the library with other parts of the ArcGIS system to create graphical output. Typically, these are objects in the Display and Carto libraries. You can extend the Output library for custom devices and export formats.

Geodatabase

The Geodatabase library provides the programming API for the geodatabase. The geodatabase is a repository of geographic data built on standard industry and object relational database technology. The objects in the library provide a unified programming model for all supported data sources in ArcGIS. The Geodatabase library defines many of the interfaces that are implemented by data source providers higher in the architecture. The geodatabase can be extended by developers to support specialized types of data objects (features, classes, and so forth). The native data types supported by the geodatabase cannot be extended.

GISClient

The GISClient library enables you to consume Web services; these Web services can be provided by ArcIMS and ArcGIS Server. The library includes objects for connecting to GIS servers to make use of Web services. There is support for ArcIMS Image and Feature Services. The library provides a common programming model for working with ArcGIS Server objects in a stateless manner either directly or through the Web Services Handler. The ArcObjects components running on ArcGIS Server are not accessible through the GISClient interface. To gain direct access to ArcObjects components running on the server, you should use functionality in the Server library.

DataSourcesFile

The DataSourcesFile library contains the implementation of the Geodatabase API for file-based data sources. These file-based data sources include shapefile, coverage, triangulated irregular network (TIN), computer-aided drafting (CAD), smart data compression (SDC), and vector product format (VPF). The DataSourcesFile library is not extended by developers.

DataSourcesGDB

The DataSourcesGDB library contains the implementation of the Geodatabase API for the database data sources. These data sources include Microsoft Access and the relational database management systems (RDBMSs) supported by ArcSDE: IBM DB2, Informix, Microsoft SQL Server, and Oracle. The DataSourcesGDB library is not extended by developers.

DataSourcesOleDB

The DataSourcesOleDB library contains the implementation of the Geodatabase API for the Microsoft OLE DB data sources. This library is only available on the Microsoft Windows operating system. These data sources include any OLE DB supported data provider and text file workspaces. The DataSourcesOleDB library is not extended by developers.

DataSourcesRaster

The DataSourcesRaster library contains the implementation of the Geodatabase API for the raster data sources. These data sources include the following RDBMSs supported by ArcSDE: IBM DB2, Informix, Microsoft SQL Server, and Oracle; along with supported Raster Data Objects (RDO) raster file formats. Developers do not extend this library when support for new raster formats is required; rather, they extend RDO. The DataSourcesRaster library is not extended by developers.
A Raster Data Object is an API that provides display and analysis support for file-based raster data.

GeodatabaseDistributed

The GeodatabaseDistributed library supports distributed access to an enterprise geodatabase by providing tools for importing data into and exporting data out of a geodatabase. The GeodatabaseDistributed library is not extended by developers.

Carto

The Carto library supports the creation and display of maps. These maps can consist of data in one map or a page with many maps and associated marginalia. The PageLayout object is a container for hosting one or more maps and their associated marginalia, such as North arrows, legends, scale bars, and so on. The Map object is a container of layers. The Map object has properties that operate on all layers in the map—spatial reference, map scale, and so on—as well as methods that manipulate the map's layers. There are many different types of layers that can be added to a map. Different data sources often have an associated layer responsible for displaying the data on the map; vector features are handled by the FeatureLayer object, raster data by the RasterLayer object, TIN data by the TinLayer object, and so on. Layers can, if required, handle all the drawing operations for their associated data; however, it is more common for layers to have an associated Renderer object. The properties of the Renderer object control how the data is displayed on the map. Renderers commonly use symbols from the Display library for the actual drawing; the renderer matches a particular symbol with the properties of the entity that is to be drawn. A Map object and a PageLayout object can contain elements. An element has geometry to define its location on the map or page, as well as behavior that controls the display of the element. There are elements for basic shapes, text labels, complex marginalia, and so on. The Carto library also contains support for map annotation and dynamic labeling.
Although you can use a Map or a PageLayout object in your application, it is more common to use a higher level object such as the MapControl, PageLayoutControl, or an ArcGIS application. These higher level objects simplify some tasks, although they always provide access to the lower level Map and PageLayout objects, allowing you control of the objects.
ArcGIS Server uses the MapServer object for its MapService.
The Map and PageLayout objects are not the only objects in the Carto library that expose the behavior of map and page drawing. The MxdServer and MapServer objects both support the rendering of maps and pages, but instead of rendering to a window, these objects render directly to a file.
Using the MapDocument object, you can persist the state of the map and page layout in a map document (.mxd), which can be used in ArcMap or one of the ArcGIS controls.
The Carto library is commonly extended in a number of areas. Custom renderers, layers, and so forth, are common. A custom layer is often the easiest method of adding custom data support to a mapping application.

Location

The Location library contains objects that support geocoding and working with route events. The geocoding functionality can be accessed through fine-grained objects for full control, or you can use the GeocodeServer object for a simplified API. Developers can create their own geocoding objects. The linear referencing functionality provides objects for adding events to linear features and rendering these events using a variety of drawing options. The developer can extend the linear reference functionality.

NetworkAnalyst

The NetworkAnalyst library contains objects for working with network datasets. Developers can extend this library by creating new network servers. A license for the Network Analyst extension of the ArcGIS Engine Runtime Network option is required to use the objects in this library.

NetworkAnalysis

The NetworkAnalysis library provides objects for populating a geodatabase with network data and objects to analyze the network when it is loaded in the geodatabase. Developers can extend this library to support custom network tracing. The library is meant to work with utility networks, such as gas lines, electricity supply lines, and so on. The following diagram shows the library architecture of some of the ArcGIS Server objects.

GeoAnalyst

The GeoAnalyst library contains objects that support core spatial analysis functions. These functions are used in both the SpatialAnalyst and 3DAnalyst libraries. Developers can extend the library by creating a new type of raster operation. A license for either the ArcGIS Spatial Analyst or 3D Analyst extension or the ArcGIS Engine Runtime Spatial or 3D extension is required to use the objects in this library.

3DAnalyst

The 3DAnalyst library contains objects for working with 3D scenes in a similar way that the Carto library contains objects for working with 2D maps. The Scene object is one of the main objects of this library, and it is the container for data similar to the Map object. The Camera and Target objects specify how the scene is viewed regarding the positioning of the features relative to the observer. A scene consists of one or more layers that specify the data in the scene and how the data is drawn.
It is not common for developers to extend this library. A license for either the ArcGIS 3D Analyst extension or the ArcGIS Engine Runtime 3D extension is required to work with objects in this library.

GlobeCore

The GlobeCore library contains objects for working with globe data in a similar way that the Carto library contains objects for working with 2D maps. The Globe object is one of the main objects of the library, and it is the container for data similar to the Map object. The GlobeCamera object specifies how the globe is viewed regarding the positioning of the globe relative to the observer. The globe can have one or more layers that specify the data on the globe and how the data is drawn.
It is not common for developers to extend this library. A license for either the ArcGIS 3D Analyst extension or the ArcGIS Engine Runtime 3D extension is required to work with objects in this library.

SpatialAnalyst

The SpatialAnalyst library contains objects for performing spatial analysis on raster and vector data. Developers most commonly consume the objects in this library and do not extend it. A license for either the ArcGIS Spatial Analyst extension or the ArcGIS Engine Runtime Spatial extension is required to work with objects in this library.

WebControls

The WebControls library contains convenience classes that make it easy to build and deploy Web applications and Web services that use ArcObjects running on the GIS server.