ArcObjects Library Reference  (GeoDatabase)    

GeometryServer CoClass

Provides access to standard operations on geometric 'value' objects. The input geometries are never modified by these operations. Designed for use in building web services and web applications.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Extended Error Information

Use the ISupportErrorInfo method InterfaceSupportsErrorInfo to determine if the object supports extended error information. If the object supports extended error info, VC++ developers should use the OLE/COM IErrorInfo interface to access the ErrorInfo object. Visual Basic developers should use the global error object Err to retrieve this extended error information.


Interfaces Description
IGeometryServer (esriGeometry) Provides access to standard operations on geometric 'value' objects. The input geometries are never modified by these operations. Designed for use in building web services and web applications.
ILogSupport (esriSystem) Provides access to methods for initializing an object for logging.
IObjectActivate (esriSystem) Provides access to methods for activating and deactivating objects.
IObjectConstruct (esriSystem) Provides access to methods for constructing an object.
IRequestHandler (esriSystem) Provides access to members that control handing of request messages.
IRequestHandler2 (esriSystem) Provides access to members that control handing of request messages.
IServerObject (esriServer) Provides access to properties of a map or geocode server object.
IServerObjectExtensionManager (esriServer) Provides access to members that help locate installed server object extensions.
ISupportErrorInfo Indicates whether a specific interface can return Automation error objects.


The GeometryServer lets clients programmatically apply common geometric operations to arrays of geometry 'value' objects. Buffering, projection of geometries from one spatial reference system to another, and evaluation of spatial relations are some of the operations provided.

In a server environment, a GeometryServer object can be accessed via Distributed COM (DCOM) over a TCP/IP connection (Intranet) or via SOAP/XML over an HTTP connection (Internet). A REST api is also supported. The GeometryServer object is a stateless, "compute-only" service. As such, only one can be instantiated at a time in a server environment.

SOAP clients make use of a GeometryServer via its web service interface, defined by the this URL:

http://<server name>/arcgis/services/Geometry/GeometryServer?wsdl

The name of the service, "Geometry", cannot be changed.

Clients can also access a GeometryServer in a DCOM environment by obtaining an IGeometryServer interface from a Server Object Manager. In this case, all geometries, spatial references and other objects used by the GeometryServer should also be created by the same Server Object Manager. Clients can use either ArcObjects or the ESRI Web Application Developer Framework (WebADF) to access the GeometryServer in this manner.

Finally, clients with ArcObjects (Engine or Desktop) installed can directly create a GeometryServer COM object in their own process and invoke methods on it. The GeometryServer does not provide a significant level of abstraction over direct use of other parts of the geometry API, but this approach might be useful in some cases.

In all access models, inputs are read-only values and outputs are returned as new geometry values in new arrays.


Spatial References, geometries, and the GeometryServer

GeometryServer operations typically take as input a spatial reference (SR) and an array of geometries assumed to be in that SR. This SR cannot be nil. This approach is different than the ArcObjects model for programming with geometries. In the latter case, each individual geometry is explicitly associated with an SR. In the GeometryServer case, any such association is ignored and only the input SR is used. As a result, SOAP and DCOM clients of the GeometryServer object do not need to establish this reference for input geometries and thus can avoid serializing the spatial reference for each geometry as part of network transmission of the inputs.

Geometry value objects created by a GeometryServer method have no explicit association to a spatial reference object. They are also assumed to be defined in the SR specified as the input parameter to that method. It is the callers responsibility to use the correct SR with these geometries.


GeometryServer and GeometryServerImpl

ArcObjects currently exposes two cocreatable COM objects: GeometryServer (defined in the geodatabase object library) and GeometryServerImpl (defined in the geometry object library). DCOM and ArcEngine clients of the GeometryServer should only create an instance of the former and never an instance of the latter.


GeometryServer and Internet Information Services

If you are sending large SOAP messages to a GeometryServer (many input geometries or geometries with many points) and receive an error message something like "connection forcibly closed", you may need to increase the maximum allowable size of messages sent to IIS. You can do this by specifying a larger value for the MaxRequestLength attribute of the httpRuntime tag in the web.config file located under the \inetpub\wwwroot\arcgis\services . For more details, please see this link: