产品:iObject java 11.0.1
操作系统 :windows11
使用ModelConvertor.fromFile方法将OSGB导入到工作空间之后数据集范围异常
以下是java代码
ModelFileSetting setting = new ModelFileSetting();
setting.setFilePath("OSGB路径");
DatasetVectorInfo modelDatasetInfo = new DatasetVectorInfo();
modelDatasetInfo.setName("New_Model");
modelDatasetInfo.setType(DatasetType.MODEL);
DatasetVector dataset = (DatasetVector) datasource.getDatasets().create(modelDatasetInfo,PrjCoordSys.fromEPSG(4544));
Model model = new Model();
//模型转换
ModelConvertor.fromFile(model, setting);
Recordset recordset = dataset.getRecordset(true, CursorType.DYNAMIC);
recordset.edit();
GeoModel3D geomodel3d = new GeoModel3D();
geomodel3d.setPosition(new Point3D(623600, 4097600, 1700));
geomodel3d.setModel(model);
geomodel3d.setRotationZ(-1);
boolean t = recordset.addNew(geomodel3d);
System.out.println("===="+t);
boolean update = recordset.update();
System.out.println(">>>>>>>>>>>>"+update);
workspace.save();
导入后数据集范围
使用iDeskTop手动导入后是这样的