使用产品:iobjects 11
数据类型:shape
【代码如下】
DatasourceConnectionInfo connectionInfo = new DatasourceConnectionInfo();
connectionInfo.setEngineType(EngineType.VECTORFILE);
connectionInfo.setServer(getPrefixPath() + xycsShpPath);
connectionInfo.setAlias("xycsShp"); connectionInfo.setPassword("");
Datasource ds = new Workspace().getDatasources().open(connectionInfo);
Datasets datasets = ds.getDatasets();
DatasetVector dsline = (DatasetVector) datasets.get("shx");
double nodeSnap = dsline.getTolerance().getNodeSnap();
connectionInfo.dispose(); return nodeSnap;
【报错】 Caused by: javax.management.RuntimeErrorException: 创建文件格式解析器失败 at com.supermap.data.Datasources.open(SourceFile:152) ~[com.supermap.data-11.2.0-230721-8998-104039.jar:?]