使用产品:iobjetcts 11
数据类型:shape
问题详细描述:读取shape 报错
Exception in thread "main" javax.management.RuntimeErrorException: 创建文件格式解析器失败
at com.supermap.data.Datasources.open(SourceFile:152)
at cn.piesat.wrd.xl.util.T.main(T.java:21)
代码如下:
CloudLicense.login("username", "psword");
License lic = new License();
int code = lic.connect(65400); //试用许可模块ID 65400
System.out.println("code = " + code);
DatasourceConnectionInfo connectionInfo = new DatasourceConnectionInfo();
connectionInfo.setEngineType(EngineType.VECTORFILE);
connectionInfo.setServer("D:/temp/shx/shx.shp");
// connectionInfo.setServer(getPrefixPath() + xycsShpPath);
connectionInfo.setAlias("xycsShp");
connectionInfo.setPassword("");
Datasource ds = new Workspace().getDatasources().open(connectionInfo);
Datasets datasets = ds.getDatasets();
connectionInfo.dispose();