Microsoft's OLE DB model enables external data to be served to ArcGIS applications by means of an OLE DB provider. The following sections discuss implementing your own OLE DB provider to serve spatial data from a custom data source to ArcGIS or any other application. The following sections do not cover the standard ESRI OLE DB provider which provides ESRI format data to external applications; this, and the consumption of OLE DB data in ArcGIS, is discussed in Implementing OLE DB Providers in ArcGIS.
OLE DB providers enable external data to be served to ArcGIS applications.
An OLE DB provider for spatial data should use the standards defined by the Open GIS Consortium (OGC or OGIS). These are described in the 'OpenGIS® Simple Features Specification for OLE/COM', which is available from www.opengis.org.
The Open GIS Consortium defines standards for spatially enabled OLE DB providers.
In addition to the OGIS requirements, there are the Microsoft requirements for a 'Minimum level provider' (known as level 0). These are set out in the Microsoft article 'OLE DB Leveling: Choosing the Right Interfaces'. Before continuing with the details of implementing an OGIS-compliant OLE DB provider, consider the two main alternative solutions for serving a custom data source to ArcGIS: custom layers and plug-in data sources.
Custom layers and plug-in data sources are alternatives to OLE DB providers for serving custom data formats to ArcGIS. See the comparison table in the plug-in data sources section.
Both of these approaches have their own sections in this book. There is a table summarizing the benefits of each solution in the section on plug-in data sources.
ArcGIS Requirements for OLE DB providers
To be consumable by ArcGIS, in addition to the Microsoft minimum provider functionality, your provider must satisfy the following requirements (they will be explained in more detail later):
- Implement one standard schema rowset, the Tables rowset, using the IDBSchemaRowset interface.
- Implement the OGIS Feature Tables and Geometry Columns schema rowsets—they are needed for browsing and schema discovery.
- Support the ICommandWithParameters interface on the Command object—this is needed to handle spatial queries.
- Support the IColumnsRowset interface on the Rowset object—this is needed to support the additional OGIS Metadata columns: GEOM_TYPE, SPATIAL_REF_SYSTEM_ID, and SPATIAL_REF_SYSTEM_WKT.
- Return geometry objects as OGIS Well-Known Binaries (WKBs).
ArcGIS does not require the provider to be registered to the OGISDataProvider component category. It is also not essential to implement the OGIS Spatial Reference Systems Schema rowset.
References
Several good information resources are listed below. They can mostly be found in MSDN:
- Using the Visual C++ 6.0 OLE DB Provider Templates, Lon Fisher, Visual C++ Development Team, 1998. Required reading
- Exposing Your Custom Data In a Standard Way Through ADO and OLE DB, Dino Esposito, June 1999. Good article
www.microsoft.com/msj/0699/oledb/oledb.htm - OLE DB Leveling: Choosing the Right Interfaces. Required reference.
www.microsoft.com/data/oledb/techinfo/oledbleveling2.htm
See also the similar MDAC article OLE DB Minimum Levels of Consumer and Provider Functionality - OLE DB/ADO: Making Universal Data Access a Reality, Microsoft Corp., 1998. General reference
- OpenGIS Simple Features Specification For OLE/COM. Required reference
www.opengis.org/techno/specs.htm - MSDN: Visual C++ Reference, OLE DB Templates Reference. Useful reference
- MSDN: Visual C++ Concepts, OLE DB Templates. Useful reference
- Microsoft Universal Data Access Web Site. Portal
www.microsoft.com/data