POST
|
NEW INFO: The sample plug-in data source provided by ESRI (as well as my own) is implemented such that a workspace is a directory and an individual file is a FeatureDataset containing several FeatureClasses. Do I need to somehow incorporate IFeatureDatasetName into the creation of the IName that I am attempting. I apologize of this is all rather unclear, this is somewhat new to me. Any assistance would be greatly appreciated.
... View more
03-24-2011
08:59 AM
|
0
|
0
|
108
|
POST
|
As part of a custom plug-in data source, I am required to implement the IParseNameString CanParse() and Parse() methods. The Parse() method will receive a string such as the following: F:\arctest\plugindata\points\Polygon Where : F:\arctest\plugindata is the path to the workspace containing my feature data set. points is the feature data set. On disk it is points.csp Polygon is the name of a feature class within points.csp that I am interested in. This particular sample dataset contains 12 feature classes. It is the job of the Parse() method to return an IName objects describing the workspace, dataset and presumably the featureclass represented by the incoming string. FYI, his data set can be found in the ArcObjects SDK in C:\Program Files (x86)\ArcGIS\DeveloperKit10.0\Samples\data\SimplePointData. The code below will allow my plug-in data source to successfully open the points.csp data set but will always result in the opening of the first feature class within points.csp rather than the one named Polygon. I assume that this is due to the fact that nowhere in the code below have I specified Polygon as the feature class name to use. Simply put, I don't know how. To keep things simple, no actual parsing yet. Just hard coded paths. Any tips on what I need to do would be appreciated. public IName Parse(string ParseName) { // Incoming ParseName string is: // F:\arctest\plugindata\points\Polygon // Where : // "F:\arctest\plugindata" is the workspace directory // "points" is the feature dataset. On disk it is points.csp // "Polygon" is the name of the feature class withing points.csp IWorkspaceName workspaceName = new WorkspaceNameClass(); workspaceName.WorkspaceFactoryProgID = "esriGeoDatabase.SimplePointPluginWorkspaceFactory"; // My plugin factory workspaceName.PathName = "F:\\arctest\\plugindata"; // Path of the directory containing my dataset IFeatureClassName fcName = new FeatureClassNameClass(); fcName.FeatureType = esriFeatureType.esriFTSimple; fcName.ShapeType = ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPolygon; fcName.ShapeFieldName = "SHAPE"; IDatasetName dsName = (IDatasetName)fcName; dsName.Name = "points"; // The dataset to open (points.csp on disk) dsName.WorkspaceName = workspaceName; // What about Polygon? which is one of 12 feature classes in the points.csp dataset and the one I want to open return (IName)fcName; }
... View more
03-23-2011
03:06 PM
|
0
|
1
|
587
|
POST
|
I have implemented a plug-in data source for ArcGIS. In my case, the format read by the plug-in may contain point, line and polygon features within the same file. In my implementation the data file read by the plugin is a dataset which may contain up to three feature classes (point, line, poly). In ArcMap I can sucessfully browse to my data sources and add feature classes to the map. If I then open the ArcToolbox->Conversion Tools->To Shapefile->Feature Class To Shapetool I can see the added feature classes in the Input Features pulldown menu and add them. Using this method I can sucessfully export the feature class to a Shape file. Also, in ArcCatalog I can browse to the feature classes contained in my custom files or I can enter a path into the Location:box in ArcCatalog for example: f:\arctest\plugindata\testPT\testPT_PT where f:\arctest\plugindata is the location of my data file, testPT is the root name of my data file (less extenstion) and testPT_PT is the name of the feature class within the file. Doing this will sucessfully browse to and open my file. The trouble coumes when I attempt to use the ArcToolbox->Conversion Tools->To Shapefile->Feature Class To Shape tool and enter the full path to my feature class f:\arctest\plugindata\testPT\testPT_PT directly into the Input Features box rather than first adding the feature class to a map and then selecting it via the Input Features dialog. I am immediately greeted with 000732 dataset does not exist or is not supported. I believe that I have traced the probem to the call made by ArcGIS to the ContainsWorkspace() that I have implemented in my custom workspace factory. My ContainsWorkspace() is being called and the parentDirectory being passed to me in the above example is f:\arctest when I expect to be called with f:\arctest\plugindata. As it is I am being called to indicate whether f:\arctest contains a workspace which it does not, f:\arctest\plugindata does. ContainsWorkspace() is never called with f:\arctest\plugindata and the Export To Shape tool immediately indicates that the specified feature class is invalid. Again, if I enter f:\arctest\plugindata\testPT\testPT_PT into the location box in ArcCatalog I am immediately taken to the correct featureclass, it is only the Shape Export dialog that will not accept this path. I am fairly new to ArcGIS Engine development and this is my first data source plugin so I I have not clearly explained the situation I apologize. Can anyone give me some pointers on where to look for my failure? Thank you, Bruce Jones
... View more
02-16-2011
01:45 PM
|
0
|
0
|
736
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|