In this topic
The ArcGIS libraries define many different types of layer classes to visually represent different sources of data; for example, FeatureLayer, TinLayer, CadLayer, and CoverageAnnotationLayer. These layers display geographic data stored in datasets, such as shapefiles, computer-aided design (CAD) files, image files, and feature classes, which are stored in a geodatabase.
Look at the Carto layer object model diagram (OMD) to find out more about the existing layer classes. You can see that all layer objects are subtypes of the layer abstract class. All layer objects implement the ILayer and IGeoDataset interfaces. Therefore, any custom layer should implement at least these interfaces. The ILayer interface controls the drawing properties and actual drawing of the layer. The IGeoDataset interface defines the extent and spatial reference system for a layer so that it can be projected and georeferenced.
When you look further at the Carto layer OMD, you can see that the class hierarchy for layers appears somewhat complex. This is because there are a wide range of different types of layers providing a wide range of functionality. The FeatureLayer class inherits from not only the layer abstract class but also from the DataLayer, DisplayLayer, TableLayer, and AnalysisLayer abstract classes.
The RasterLayer inherits from all these except the AnalysisLayer abstract class because AnalysisLayer contains interfaces that work with a vector-based data model that uses features, for example, IFeatureSelection. A raster layer, of course, does not use a vector data model. Many other classes that derive from these layer abstract classes can be found via the indicated links on the diagrams of other areas of the ArcGIS object model.
You might have a custom or unsupported data format that you want to display in a map without having to convert it to a data format supported by ArcGIS. Perhaps you want to extend the way an existing layer class draws. Writing your own layer object enables you to support the drawing of new data formats and to customize how existing data formats display.
A custom layer allows you to display an unsupported data source in a map. You could also change the way an existing layer class draws by using a custom layer.
Custom layers are often used to accentuate a map so improved spatial analysis and edits can be made to feature datasets already loaded in the map. Like annotation layers, custom layers can be used to display different geometric objects, such as points and lines in a single layer. Custom layers can be used to display dynamic data as well.
If your objective is to map your data by providing a custom visual representation and there are no requirements to provide functionality, such as complex editing and data analysis, then a custom layer object is an excellent solution. Otherwise, consider the option of importing your data into a format supported by ArcGIS so you can take advantage of the many toolsets provided to work with your data.
All layers must implement ILayer. For ArcMap to save a custom layer, the IPersistVariant interface must be implemented. You can choose what custom layer properties to persist in addition to the ILayer member properties, such as the minimum and maximum scales and the name of the layer and its visible state. For a layer to be included in the ArcMap table of contents window, it must implement the ILegendInfo interface. The implementation of the interfaces ILayer, IGeoDataset, IPersistVariant, and ILegendInfo provides a basic level of integration with the ArcGIS framework.
|Development licensing||Deployment licensing|
|ArcGIS for Desktop Basic||ArcGIS for Desktop Basic|
|ArcGIS for Desktop Standard||ArcGIS for Desktop Standard|
|ArcGIS for Desktop Advanced||ArcGIS for Desktop Advanced|
|Engine Developer Kit||Engine|