Point plug-in data source


Purpose
This sample implements a plug-in data source for a simple point data format that provides direct read-only ArcGIS support for the format. The data in this sample follows a simple format. An American Standard Code for Information Interchange (ASCII) text file contains data for each new point on a new line. The first six characters are the x-coordinate, the next six characters contain the y-coordinate, and the remaining characters contain an attribute value. You can use the sample data from the software development kit (SDK) samples folder or use your data according to the above specification.
This extension can be consumed from an ArcMap or ArcGIS Engine application.

How to use

See How to use ArcGIS samples for help on running the sample.

Consuming the extension in ArcMap
  1. Navigate to this sample's lib folder (pointplugindatasource\lib) and copy the PointPluginDataSourceExt.jar file into the ArcGIS Install Dir\java\lib\ext folder to deploy. The sample functionality is available when you start ArcMap.
  2. Start ArcMap and add the custom data points.spt from pointplugindatasource\src\data. This custom data has appeared in ArcMap as a point layer, which is a read-only layer.

Consuming the extension in an Engine application
  1. Navigate to the sample's lib folder (pointplugindatasource\lib) and copy the PointPluginDataSourceExt.jar file into the ArcGIS Install Dir\java\lib\ext folder to deploy. The sample functionality is available when you start the Engine application.
  2. Navigate to this sample's bin folder (pointplugindatasource\bin) and execute the PointPluginDataSource.jar to start the application. The frame is loaded with a map, TOC, toolbar, and the Add Custom Data button.
  3. Click the Add Custom Data button and navigate to pointplugindatasource\src\data.
  4. Get points.spt from this folder and click Open. This file is added to the map as a point layer.

If you installed the samples feature, you will find the files associated with this sample in <Your Developer Kit install location>\DeveloperKit10.4\Java\Samples\ArcObjects.

geodatabase/PluginDatasourceMain.java Main Java class that consumes the simple point plug-in data source in an Engine application.
geodatabase/simplepointdatasource/SimplePointWorkspaceFactoryHelper.java Must implement the IPlugInWorkspaceFactoryHelper interface. This helper class works in conjunction with the existing ArcGIS PlugInWorkspaceFactory class.
geodatabase/simplepointdatasource/SimplePointWorkspaceHelper.java Must implement the IPlugInWorkspaceHelper interface and represents a single workspace for datasets of your data source type. This class does not need to be publicly creatable, because the plug-in workspace factory helper is responsible for creating it in its OpenWorkspace method.
geodatabase/simplepointdatasource/SimplePointDatasetHelper.java Must implement the IPlugInDatasetInfo and IPlugInDatasetHelper interfaces. This class does not need to be publicly creatable, because the plug-in workspace helper is responsible for creating it.
geodatabase/simplepointdatasource/SimplePointDatasetHelper.java Must implement the IPlugInCursorHelper interface. This class deals with raw data and is normally the class for which you will write the most code. The cursor helper represents the results of a query on the dataset. This class does not need to be publicly creatable, because the plug-in dataset helper is responsible for creating it.




Development licensing Deployment licensing
Engine Developer Kit Engine