DataSourcesFile


Supported with:
Library dependencies: System, SystemUI, Geometry, Display, Server, Output, Geodatabase, GISClient, ArcWeb

Additional library information: Contents, Object Model Diagram

The DataSourcesFile library contains the implementation of the Geodatabase API for file-based data sources. These file-based data sources include; shapefile, coverage, TIN, CAD, SDC, StreetMap, and VPF.
 
The DataSourcesFile library is not extended by developers.

The objects that implement this functionality are grouped into a number of library subsystems. These library subsystems are:

Coverage

Workspace factory classes are the entry point for accessing data with the geodatabase objects for any data format. The type of workspace factory you instantiate dictates the type of data that can be handled by the workspace factory object and its derivatives.
To work with ArcInfo coverage or table data, you must create a workspace factory using the ArcInfoWorkspaceFactory class. After creating a new instance of the ArcInfoWorkspaceFactory object, use the Open or OpenFromFile method to get a Workspace object that is used to actually work with the data.
 
Here are some values specific to ArcInfoWorkspaceFactory:
 
The Workspace object is created by the ArcInfoWorkspaceFactory when the Open or OpenFromFile methods are used. The class has interfaces with methods that include creating new ArcInfo coverages or INFO table data, renaming workspaces, and deleting ArcInfo coverages. This class is cocreatable, but it should only be created by the workspace factory class.
 
IArcInfoWorkspace.CreateCoverage creates a new ArcInfo coverage in the workspace that is being referenced. The IFeatureDataset that is returned can be used to create new feature classes within the coverage. If a template coverage is not specified or the name is not a valid coverage, the new coverage will only have an empty .tic file. When a template coverage is used, the new coverage will have the same tics: bnd (boundary) and prj (projection). The precision enumerator esriCoveragePrecisionType is used to specify whether the coverage has single precision (7 significant digits for each coordinate) or double precision (15 significant digits for each coordinate). CreateCoverage returns an error if CoverageName is a path (such as “D:\data\canada”), if it is longer than 13 characters, or if it exists.
 
IArcInfoWorkspace.CreateInfoTable creates a new INFO table in the workspace that is being referenced. The ITable pointer that is returned can be used to add and delete items in the table. The name argument for the name of the new table can be up to 32 characters long, inclusive of the extension. The name cannot be an existing INFO table. The table will be created in the workspace used by the IArcInfoWorkspace; pathnames are recognized by this method. The ItemSet object must be given, although it does not have to contain any items. If the ItemSet contains items, they will be created in the new table.
 
The ICoverage interface on the FeatureDataset object provides information about coverages and processing operations specific to ArcInfo coverages. This interface can be used to create or update the topology of a coverage and set various tolerances that are used in coverage editing and processing. Tolerance values are considered to be verified if the specified tolerance value has actually been used to process the coverage, with the exception of the ArcEdit™ tolerances. EDIT, NODESNAP, WEED, GRAIN, and SNAP are verified as soon as they have been explicitly set.
The Table object is a collection of ArcInfo items (columns) and rows. All types of data use tables to store information about its features, but with ArcInfo the data is stored in an INFO table.
 
The IArcInfoTable interface is used to access and modify the items in the INFO table. With this interface, you can add or delete items, add or delete an index for an item, and change the properties of an item. This interface is used to get the items collection, with which you can get or set information for individual items.
A FeatureClass object is a collection of features that have the same feature type and set of attributes.
 
The ICoverageFeatureClass interface provides information on an individual feature class of an ArcInfo coverage.
 
The ArcInfoItems coclass represents the item set, or collection of items, in an INFO table. This coclass is similar to the Fields object used with tables from other data types. The ArcInfoItems object is an ordered collection of items, and the collection behaves like a list, so it is possible to access individual fields by a numbered position (or index) in the list. This class contains two interfaces. The IArcInfoItems interface is used to get the number of items, the index of an item, or an item object. The IArcInfoItemsEdit interface is used when creating or modifing an ArcInfoItems collection. For example, you can create a new ArcInfoItem object and add items to it, or you can get an item collection from an ArcInfo feature class and add or remove items from it.
 
An ArcInfoItem has many properties, the most obvious ones being its name and its data type. Use the IArcInfoItems interface to get the properties of an ArcInfo item. Use IArcInfoItemEdit to set the properties of an ArcInfo item. The esriItemType enumeration lists the possible data types for an ArcInfo item.
A CoverageName object identifies and locates a dataset object and supports methods to instantiate the actual named object. As noted in the section on name objects, a name object can be used as a lightweight surrogate of the actual object until further properties of the object are needed or additional methods on the object need to be called.
 
The CoverageName object can be used to retrieve information on the type of the coverage, what is contained in the coverage, and the metadata for the coverage. It can be used to find the coverage type, which is based on the highest level of dimension, for the feature classes contained. Levels of dimensions refer to how many dimensions are used to measure the features; in other words, a point has an x- and y-value; a line has length in addition to these values; and polygons, in addition, have area.
A CoverageFeatureClassName object identifies and locates a feature class in a coverage; it is used for obtaining some basic properties of the feature class without having to open (instantiate) it.
 
The ICoverageFeatureClassName interface has the same properties as the ICoverageFeatureClass interface, which is the FeatureClassType if there is an attribute table, and the topology status.

CAD

The ICadDrawingWorkspace interface on the Workspace object is used to open a CAD dataset. From the ICadDrawingDataset interface that is returned, you can retrieve CAD specific information about the dataset such as its path, if its from AutoCad, or if its a dgn file.

StreetMap

The StreetMap objects allow you to build routes between locations. There are objects to define the final and intermediate stops of the route, objects for adjusting parameters of search, routing task solver object, as well as objects that provide details on the result path geometry and driving directions.
The first step is to create the factory of solver objects using esriDataSourcesFile.SMRouterFactory. Call ISMRouterFactory.CreateRouter() passing in the path to your routing data to create an SMRouter object and return the esriDataSourcesFile.ISMRouter interface.
 
In order to find a route, it is necessary to create an esriDataSourcesFile.SMPointsCollection object and add your stops into this collection. This object is passed to ISMRouter.Solve which builds the route and returns an esriDataSourcesFile.ISMDirections interface that contains resulting path geometry and driving directions texts.
 
It is possible to control how the route is built using several ISMRoute interface members.