- Engine
- ArcGIS for Desktop Basic
- ArcGIS for Desktop Standard
- ArcGIS for Desktop Advanced
- Server
Additional library information: Contents, Object Model Diagram
The DataSourcesFile library contains the implementation of the Geodatabase application programming interface (API) for file-based data sources. These file-based data sources include: shapefile, coverage, triangulated irregular network (TIN), computer-aided design (CAD), Smart Data Compression (SDC), StreetMap, and Vector Product Format (VPF).
The DataSourcesFile library is not extended by developers.
See the following sections for more information about this namespace:
Coverage
Workspace factory classes are the entry point for accessing data with 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 an 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 to work with the data.
The following values are specific to ArcInfoWorkspaceFactory:
- IWorkspaceFactory.Copy and IWorkspaceFactory.Move cannot be used.
- IWorkspaceFactory.WorkspaceDescription returns ArcInfo Workspace.
- IWorkspaceFactory.WorkspaceType returns zero (0) or esriFileSystemWorkspace.
- IWorkspaceFactory.IsWorkspace returns true or false depending on whether or not there is an Info subdirectory present.
- IWorkspaceFactory.ReadconnectionPropertiesFromFile returns a PropertySet object, with the only property being Database, which is set to the pathname.
The Workspace object is created by ArcInfoWorkspaceFactory when the Open or OpenFromFile methods are used. The class has interfaces with methods that include creating ArcInfo coverages or Info table data, renaming workspaces, and deleting ArcInfo coverages. This class is cocreatable; however, it should only be created by the WorkspaceFactory class.
IArcInfoWorkspace.CreateCoverage creates a new ArcInfo coverage in the referenced workspace. IFeatureDataset is returned and can be used to create new feature classes in 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 (seven 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 referenced workspace. 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 IArcInfoWorkspace; pathnames are recognized by this method. The ItemSet object must be given, although it does not have to contain any items. If 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 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 FeatureDataset object is shown in the following diagram:
The Table object is a collection of ArcInfo items (columns) and rows. All types of data use tables to store information about their features, but with ArcInfo, the data is stored in an Info table.
The Table object is shown in the following diagram:
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 also used to get the ArcInfo Items Collection information, which you can use to 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 FeatureClass object is shown in the following diagram:
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 that is used with tables from other data types. The ArcInfoItems object is an ordered collection of items, and the collection behaves similar to 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 modifying 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.
ArcInfoItem has many properties, the most obvious being its name and its data type. Use the IArcInfoItems interface to get the properties of an ArcInfo item. UseIArcInfoItemEdit to set the properties of an ArcInfo item. The esriArcInfoItemType 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. 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 is shown in the following diagram:
The CoverageName object can be used to retrieve information on the type of coverage, the coverage contents, and the coverage metadata. It can also be used to find the coverage type, which is based on the highest level of dimension, for the feature classes contained. Level of dimension refers to the number of dimensions used to measure the features—for example, a point has an x and a 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 basic properties of the feature class without having to open (instantiate) it. The CoverageFeatureClassName object is shown in the following diagram:
The ICoverageFeatureClassName interface has the same properties as the ICoverageFeatureClass interface: FeatureClassType (if there is an attribute table) and Topology.
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 it's from AutoCad, or if it's a .dgn file.
StreetMap
StreetMap objects allow you to build routes between locations. There are objects to define the intermediate and final stops of the route, objects for adjusting the search parameters, a routing task solver object, as well as objects that provide details of the result path geometry and driving directions.
The first step when creating a route is to create the solver objects factory using SMRouterFactory. Call ISMRouterFactory.CreateRouter, passing in the path to your routing data to create an SMRouter object and return the ISMRouter interface.
To find a route, create an SMPointsCollection object and add your stops to this collection. This object is passed to ISMRouter.Solve, which builds the route and returns the ISMDirections interface that contains the resulting path geometry and driving directions texts.
You can control how the route is built using the following ISMRouter interface members:
- Preferences—Changes the highways-local roads preference for the router.
- NetAttributeName—Controls whether the quickest or shortest route will be built by the router.
- Barriers—Used to disable routing network points.
- TripPlanSettings—Configures time frames for driving and resting periods of the trip.
- ReorderStops—Automatically optimizes the order of several stops (traveling salesperson problem).