本文整理汇总了Java中com.esri.arcgis.geodatabase.FeatureClass.getWorkspace方法的典型用法代码示例。如果您正苦于以下问题:Java FeatureClass.getWorkspace方法的具体用法?Java FeatureClass.getWorkspace怎么用?Java FeatureClass.getWorkspace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.esri.arcgis.geodatabase.FeatureClass
的用法示例。
在下文中一共展示了FeatureClass.getWorkspace方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AccessGdbForAnalysisImpl
import com.esri.arcgis.geodatabase.FeatureClass; //导入方法依赖的package包/类
public AccessGdbForAnalysisImpl(DBInspector soe) throws AutomationException, IOException {
LOGGER.debug("Creating AccessGdbForAnalysisImpl.");
this.soe = soe;
// Workspace creation
IMapServer3 ms = (IMapServer3) soe.getMapServerDataAccess();
String mapName = ms.getDefaultMapName();
IMapServerDataAccess mapServerDataAccess = soe.getMapServerDataAccess();
Object dataSource= mapServerDataAccess.getDataSource(mapName, 0);
FeatureClass fc = new FeatureClass(dataSource);
Workspace workspace = new Workspace(fc.getWorkspace());
this.workspace = new WorkspaceWrapper();
if (fc.getWorkspace() instanceof SqlWorkspace) {
this.workspace.setSqlWorkspace((SqlWorkspace) fc.getWorkspace());
this.workspace.setWorkspace(workspace);
}
else {
this.workspace.setWorkspace(workspace);
}
}
示例2: AccessGDBImpl
import com.esri.arcgis.geodatabase.FeatureClass; //导入方法依赖的package包/类
/**
* Creates an AccessObservationGDB object and connects to the DB of the
* ArcGIS MapServer handed over as a parameter.
*
* @throws AutomationException
* @throws IOException
*/
public AccessGDBImpl(SosSoe sos) throws AutomationException, IOException {
LOGGER.info("Creating AccessGDBImpl.");
long start = System.currentTimeMillis();
this.sos = sos;
// Workspace creation
IMapServer3 ms = (IMapServer3) sos.getMapServerDataAccess();
String mapName = ms.getDefaultMapName();
LOGGER.info("Using mapName: "+mapName);
IMapServerDataAccess mapServerDataAccess = sos.getMapServerDataAccess();
LOGGER.info("Using IMapServerDataAccess: "+mapServerDataAccess);
Object dataSource= mapServerDataAccess.getDataSource(mapName, 0);
LOGGER.info("Using dataSource: "+dataSource.getClass());
FeatureClass fc = new FeatureClass(dataSource);
resolveDatabaseName(fc);
Workspace workspace = new Workspace(fc.getWorkspace());
this.workspaceWrapper = new WorkspaceWrapper();
// logConnectionProperties(fc.getWorkspace());
if (fc.getWorkspace() instanceof SqlWorkspace) {
this.workspaceWrapper.setSqlWorkspace((SqlWorkspace) fc.getWorkspace());
this.workspaceWrapper.setWorkspace(workspace);
}
else {
// SqlWorkspaceFactory fac = new SqlWorkspaceFactory();
// SqlWorkspace sqlW = (SqlWorkspace) fac.open(fc.getWorkspace().getConnectionProperties(), fc.getWorkspace().getType());
// workspace = new Workspace(sqlW);
// this.workspaceWrapper.setSqlWorkspace(sqlW);
this.workspaceWrapper.setWorkspace(workspace);
}
LOGGER.info("workspace: "+this.workspaceWrapper.toString());
init("/arcGisSos.properties", sos.getMaximumRecordCount());
long delta = System.currentTimeMillis() - start;
LOGGER.info("End of creating AccessGDBImpl. Created in " + delta/1000 + " seconds.");
}