Provides access to members that create, add, and hand out topologies.
Members
Name | Description | |
---|---|---|
CreateTopology | Creates a new topology. | |
CreateTopologyEx | Creates a new topology. | |
DefaultClusterTolerance | The default cluster tolerance as per the topology engine. | |
DefaultZClusterTolerance | The default z cluster tolerance as per the topology engine. | |
MaximumClusterTolerance | The maximal cluster tolerance as per the topology engine. | |
MaximumZClusterTolerance | The maximal z cluster tolerance as per the topology engine. | |
MinimumClusterTolerance | The minimal cluster tolerance as per the topology engine. | |
MinimumZClusterTolerance | The minimal z cluster tolerance as per the topology engine. | |
Topology | The topology at the specified index. | |
TopologyByID | The topology with the specified ID. | |
TopologyByName | The topology with the specified name. | |
TopologyCount | The number of topologies in the container. |
ITopologyContainer.CreateTopology Method
Creates a new topology.
Public Function CreateTopology ( _
ByVal Name As String, _
ByVal ClusterTolerance As Double, _
ByVal maxGeneratedErrorCount As Integer, _
ByVal ConfigurationKeyword As String _
) As ITopology
public ITopology CreateTopology (
string Name,
double ClusterTolerance,
int maxGeneratedErrorCount,
string ConfigurationKeyword
);
Remarks
The CreateTopology method creates a topology with the specified name, cluster tolerance, maximum allowable number of errors to be generated for ArcSDE, with the supplied configuration keyword. When a topology is initially created, it is empty with no participating feature classes or rules.
The ITopologyContainer::DefaultClusterTolerance property should be used to return the default or recommended cluster tolerance for a topology. The ITopologyContainer::MaximumClusterTolerance property can be used to return the maximum cluster tolerance for a topology. You cannot specify a cluster tolerance larger than the maximum or smaller than the minimum or default cluster tolerance. As such, if the specified cluster tolerance is less than the DefaultClusterTolerance for the feature dataset, then the Topology will be created with the default cluster tolerance value. If the specified cluster tolerance is larger than the MaximumClusterTolerance, the topology will be created with the maximum cluster tolerance.
Using the CreateTopology method to create a topology within a geodatabase that supports Z cluster tolerances, will result in a topology with a ZClusterTolerance of 0.
Starting at version 9.2, cluster tolerance values should match the feature dataset's tolerance values.
The maxGeneratedErrorCount parameter specifies the maximum number of errors validate will generate before stopping. Setting a value of -1 indicates there is no limit to the number of errors that will be generated.
The configurationKeyword parameter allows the application to control the physical layout for this table in the underlying RDBMS, for example, in the case of an Oracle database, the configuration keyword controls the tablespace in which the table is created, the initial and next extents, and other properties. The configurationKeywords for an ArcSDE instance are set up by the ArcSDE data administrator, the list of available keywords supported by a workspace may be obtained using the IWorkspaceConfiguration interface. The configurationKeyword parameter is not mandatory when building a topology in an ArcSDE Geodatabase, an empty string can be specified, in which case the topology will be built using the default configuration.
IFeatureDataset featureDataset = (IFeatureDataset)GetDataset();
ITopologyContainer topologyContainer = (ITopologyContainer)featureDataset;
ITopology topology = topologyContainer.CreateTopology("Default Topology", topologyContainer.DefaultClusterTolerance, -1, string.Empty);
ITopologyContainer.CreateTopologyEx Method
Creates a new topology.
Public Function CreateTopologyEx ( _
ByVal Name As String, _
ByVal ClusterTolerance As Double, _
ByVal ZClusterTolerance As Double, _
ByVal maxGeneratedErrorCount As Integer, _
ByVal ConfigurationKeyword As String _
) As ITopology
public ITopology CreateTopologyEx (
string Name,
double ClusterTolerance,
double ZClusterTolerance,
int maxGeneratedErrorCount,
string ConfigurationKeyword
);
Errors Returned
FDO_E_Z_CLUSTER_TOLERANCE_NOT_SUPPORTED_IN_RELEASE - When using CreateTopologyEx to create a topology in a pre-9.0 geodatabase and supplying a ZClusterTolerance other than -1.
Remarks
The CreateTopologyEx method creates a topology with the specified name, cluster tolerance, maximum allowable number of errors to be generated, Z cluster tolerance for ArcSDE, with the supplied configuration keyword. When a topology is initially created, it is empty with no participating feature classes or rules.
The ITopologyContainer::DefaultClusterTolerance property should be used to return the default or recommended cluster tolerance for a topology. The ITopologyContainer::MaximumClusterTolerance property can be used to return the maximum cluster tolerance for a topology. You cannot specify a cluster tolerance larger than the maximum or smaller than the minimum or default cluster tolerance. As such, if the specified cluster tolerance is less than the DefaultClusterTolerance for the feature dataset, then the Topology will be created with the default cluster tolerance value. If the specified cluster tolerance is larger than the MaximumClusterTolerance, the topology will be created with the maximum cluster tolerance.
The maxGeneratedErrorCount parameter specifies the maximum number of errors validate will generate before stopping. Setting a value of -1 indicates there is no limit to the number of errors that will be generated.
The configurationKeyword parameter allows the application to control the physical layout for this table in the underlying RDBMS, for example, in the case of an Oracle database, the configuration keyword controls the tablespace in which the table is created, the initial and next extents, and other properties. The configurationKeywords for an ArcSDE instance are set up by the ArcSDE data administrator, the list of available keywords supported by a workspace may be obtained using the IWorkspaceConfiguration interface. The configurationKeyword parameter is not mandatory when building a topology in an ArcSDE Geodatabase, an empty string can be specified, in which case the topology will be built using the default configuration. For more information on configuration keywords, refer to the ArcSDE documentation.
The ITopologyContainer::DefaultZClusterTolerance property can be used to return the default Z cluster tolerance. The default Z cluster tolerance for all topologies is 0, indicating that the topology will support the Building model. The ITopologyContainer::MaximumZClusterTolerance property can be used to return the maximum Z cluster tolerance for a topology. The maximum Z cluster tolerance will be equal to the maximum Z - minimum Z of the spatial domain from the feature dataset. Supplying a Z cluster tolerance value greater than 0 will create a topology that supports the Terrain model.
You cannot specify a Z cluster tolerance larger than the maximum or smaller than the minimum or default Z cluster tolerance. As such, if the specified Z cluster tolerance is less than the DefaultZClusterTolerance for the feature dataset, then the topology will be created with the default Z cluster tolerance value. If the specified Z cluster tolerance is larger than the MaximumZClusterTolerance, the topology will be created with the maximum Z cluster tolerance.
When using the CreateTopologyEx method to create a topology within a geodatabase that does not support Z cluster tolerances (geodatabases created pre-9.0), the ZClusterTolerance should be set to -1.
ITopologyContainer.DefaultClusterTolerance Property
The default cluster tolerance as per the topology engine.
Public ReadOnly Property DefaultClusterTolerance As Double
public double DefaultClusterTolerance {get;}
Remarks
Returns the "default" cluster tolerance as generated by the topology engine. Currently this is the same as the MinimumClusterTolerance.
ITopologyContainer.DefaultZClusterTolerance Property
The default z cluster tolerance as per the topology engine.
Public ReadOnly Property DefaultZClusterTolerance As Double
public double DefaultZClusterTolerance {get;}
Remarks
Returns the default Z cluster tolerance as generated by the topology engine, which will be 0 signifying that the topology will support the Building cluster tolerance model. Currently, this is the same as the MinimumClusterTolerance.
ITopologyContainer.MaximumClusterTolerance Property
The maximal cluster tolerance as per the topology engine.
Public ReadOnly Property MaximumClusterTolerance As Double
public double MaximumClusterTolerance {get;}
Remarks
Returns the maximum cluster tolerance for the topology. This value will be six orders of magnitude (10^6) greater than the minimum cluster tolerance. For example, if the minimum cluster tolerance is 0.0000020407, the maximum cluster tolerance will be 0.20407.
ITopologyContainer.MaximumZClusterTolerance Property
The maximal z cluster tolerance as per the topology engine.
Public ReadOnly Property MaximumZClusterTolerance As Double
public double MaximumZClusterTolerance {get;}
Remarks
Returns the maximum Z cluster tolerance for the topology. This value will be the maximum Z from the spatial domain of the feature dataset containing the topology.
ITopologyContainer.MinimumClusterTolerance Property
The minimal cluster tolerance as per the topology engine.
Public ReadOnly Property MinimumClusterTolerance As Double
public double MinimumClusterTolerance {get;}
Remarks
Returns the minimum cluster tolerance for the topology.
ITopologyContainer.MinimumZClusterTolerance Property
The minimal z cluster tolerance as per the topology engine.
Public ReadOnly Property MinimumZClusterTolerance As Double
public double MinimumZClusterTolerance {get;}
Remarks
Returns the minimum Z cluster tolerance for the topology. This value will be the minimum Z from the spatial domain of the feature dataset containing the topology.
ITopologyContainer.Topology Property
The topology at the specified index.
Public Function get_Topology ( _
ByVal Index As Integer _
) As ITopology
public ITopology get_Topology (
int Index
);
Remarks
Returns the Topology at the specified index. The indexes go from 0 to TopologyCount -1.
ITopologyContainer.TopologyByID Property
The topology with the specified ID.
Public Function get_TopologyByID ( _
ByVal ID As Integer _
) As ITopology
public ITopology get_TopologyByID (
int ID
);
Remarks
Returns the Topology with the specified ID. The ID is not the index 0 to TopologyCount -1. Rather it is the internal ID of the topology as stored in the metadata tables. It can be retrieved from ITopology::TopologyID.
ITopologyContainer.TopologyByName Property
The topology with the specified name.
Public Function get_TopologyByName ( _
ByVal Name As String _
) As ITopology
public ITopology get_TopologyByName (
string Name
);
Errors Returned
FDO_E_TOPOLOGY_NOT_FOUND: No Topology with the specified name exists in the feature dataset. Use the IWorkspace2::NameExists property to determine if a topology with the specified name exists.
Remarks
The TopologyByName property will return a reference to the topology with the specified name. For ArcSDE Geodatabases, both the fully qualified name and unqualified name can be used to return topologies. If different users own topologies with the same unqualified names in the ArcSDE Geodatabase, using the unqualified name will return the topology owned by the current user.
ITopologyContainer.TopologyCount Property
The number of topologies in the container.
Public ReadOnly Property TopologyCount As Integer
public int TopologyCount {get;}
Remarks
The number of topologies in a feature dataset.
Classes that implement ITopologyContainer
Classes | Description |
---|
Remarks
The ITopologyContainer interface is used to manage and create topologies within a feature dataset. If your intention is to simply browse for the set of topologies in a feature dataset, it is not necessary to open the feature dataset and call the methods on ITopologyContainer. The IFeatureDatasetNames::TopologyNames method can be used to obtain this information efficiently. Careful consideration should be given to specifying the parameters when creating a topology. Once the topology is built, none of the parameters can be modified. The topology must be deleted and rebuilt with the new parameters to change properties such as cluster tolerance.
IFeatureDataset featureDataset = (IFeatureDataset)GetDataset();
ITopologyContainer topologyContainer = (ITopologyContainer)featureDataset;
ITopology topology = topologyContainer.CreateTopology("Default Topology", topologyContainer.DefaultClusterTolerance, -1, string.Empty);
ITopology defaultTopology = topologyContainer.get_TopologyByName("Default Topology");