public IFeatureClass OpenFeatureClass(string Name) { try { log.enterFunc("OpenFeatureClass"); // Name should look like "view" or "schema.view". // Default the schema to "public". string[] bits = Name.Split('.'); string schema = "public"; string view = bits[0]; if (bits.Length > 1) { schema = bits[0]; view = bits[1]; } PostGisDatasetName dsName = new PostGisDatasetName(); dsName.WorkspaceName = PostGisWorkspaceName; dsName.Name = schema; // Todo - ensure the schema exists. Is it possible? PostGisFeatureDataset featureDs = new PostGisFeatureDataset(dsName, this); IFeatureClass retVal = new PostGisFeatureClass(featureDs, view); log.leaveFunc(); return retVal; } catch (Exception ex) { System.Diagnostics.EventLog.WriteEntry("OpenFeatureClass", ex.ToString() + "///" + ex.StackTrace, System.Diagnostics.EventLogEntryType.Information); return null; } }
internal PostGisFeatureClass(PostGisFeatureDataset postGisFeatureDataset, int featureClassId) : this(postGisFeatureDataset) { m_layer = ((PostGisFeatureWorkspace)postGisFeatureDataset.Workspace).connection.getLayer(featureClassId); init(); }
internal PostGisFeatureClass(PostGisFeatureDataset postGisFeatureDataset, string view) : this(postGisFeatureDataset) { m_layer = ((PostGisFeatureWorkspace)postGisFeatureDataset.Workspace).connection.getLayer(postGisFeatureDataset.Name, view); init(); }
private PostGisFeatureClass(PostGisFeatureDataset postGisFeatureDataset) { m_featureDs = postGisFeatureDataset; }