Class QueryResultOptionsClass

Namespace
ESRI.ArcGIS.Carto
Assembly
ESRI.Server.Carto.dll
[Guid("D1029770-4FA7-4799-BFD5-6B00EA89B370")]
[ClassInterface(ClassInterfaceType.None)]
public class QueryResultOptionsClass : QueryResultOptions, IQueryResultOptions, IXMLSerialize, IPersistStream, IPersist, IXMLVersionSupport, IDocumentVersionSupportGEN
Inheritance
QueryResultOptionsClass
Implements
Inherited Members

Constructors

QueryResultOptionsClass()

public QueryResultOptionsClass()

Explicit Interface Implementations

ConvertToSupportedObject(esriArcGISVersion)

Convert the object to another object that is supported.

virtual object ConvertToSupportedObject(esriArcGISVersion docVersion)

Parameters

docVersion esriArcGISVersion

Returns

object

Remarks

This method should be used when IDocumentVersionSupportGEN::IsSupportedAtVersion returns FALSE.  Calling ConvertToSupportedObject will return an IUnknown pointer to a relevant object supported at the particular ArcGIS version.  Not all objects will return a supported object; in these cases a null pointer will be returned.

Deserialize(IXMLSerializeData)

Deserializes an object from XML.

virtual void Deserialize(IXMLSerializeData data)

Parameters

data IXMLSerializeData

Format

The query result format.

virtual esriQueryResultFormat Format { get; set; }

Returns

esriQueryResultFormat

Remarks

The query result can be formatted into a RecordSet or KMZ format (either as a URL to the kmz file or a Mime object).

FormatProperties

Format properties specific to result format.

virtual IPropertySet FormatProperties { get; set; }

Returns

IPropertySet

Remarks

FormatProperties is currently not in use.

GeoTransformation

Geo transformation required to transform the geometry if the requested GCS is different from the source.

virtual IGeoTransformation GeoTransformation { get; set; }

Returns

IGeoTransformation

Remarks

In some instances the QueryResult may require a GeoTransformation . For example, a given map service may be using a spatial reference system based on GCS_WGS_1984, found in the DefaultMapDescription. A client wants to display QueryFeatureData2 results based on this map service in a different spatial reference, GCS_European_1950. The results will use the spatial reference of the DefaultMapDescription, GCS_WGS_1984, and display these results, incorrectly in GCS_European_1950. Features may not "line up" correctly. In order to correctly display these results a GeoTransformation is needed. Applying the correct GeoTransformation ensures the spatial correctness of the result.

Another instance where a GeoTransformation may be need to be specified in the QueryResultsOption is if the queried layer is projected on the fly within the map service, that is coordinate system of the layer's source is different than the DefaultMapDescription coordinate system, and no appropriate transformation has been set in the map document before serving. In this case, you can access the the coordinate system of a layer source by first getting the layer's MapLayerInfo, then get Fields from MapLayerInfo, then get a single Field from Fields, then get GeometryDef from Field, and finally, get the SpatialReference from GeometryDef.

A GeoTransformation is not needed if different projected coordinate systems share the same underlying geographic coordinate system. For best results it is optimal for data (layers within the map service), map service and MapServer output to be in the same coordinate system.

[Visual Basic .NET]

Dim pSRFactory As ISpatialReferenceFactory2
pSRFactory = New SpatialReferenceEnvironment
Dim pGeoTrans As IGeoTransformation
pGeoTrans = pSRFactory.CreateGeoTransformation(esriSRGeoTransformation3Type.esriSRGeoTransformation_NAD_1927_To_WGS_1984_30)
pQueryResultOptions.GeoTransformation = pGeoTrans



GetClassID(out Guid)

virtual void GetClassID(out Guid pClassID)

Parameters

pClassID Guid

GetSizeMax(out _ULARGE_INTEGER)

virtual void GetSizeMax(out _ULARGE_INTEGER pcbSize)

Parameters

pcbSize _ULARGE_INTEGER

IsDirty()

virtual void IsDirty()

IsSupportedAtVersion(esriArcGISVersion)

Is this object valid at the given document version.

virtual bool IsSupportedAtVersion(esriArcGISVersion docVersion)

Parameters

docVersion esriArcGISVersion

Returns

bool

Remarks

Use IsSupportedAtVersion to identify if a particular object should be saved to the ObjectStream.  This result is based on the esriArcGISVersion enumeration.  In some instances, if the object is not supported at a particular ArcGIS version, the object may support conversion to another similar object; use IDocumentVersionSupportGEN::ConvertToSupportedObject to accomplish this.

Load(IStream)

virtual void Load(IStream pstm)

Parameters

pstm IStream

MinNamespaceSupported

The minimum namespace the class can serialize to (eg the 90 namespace).

virtual string MinNamespaceSupported { get; }

Returns

string

Save(IStream, int)

virtual void Save(IStream pstm, int fClearDirty)

Parameters

pstm IStream
fClearDirty int

Serialize(IXMLSerializeData)

Serializes an object to XML.

virtual void Serialize(IXMLSerializeData data)

Parameters

data IXMLSerializeData