您好,谢谢您的回复。
我之前在等待的时间查到了以下方式,
http://support.supermap.com.cn/product/CodeLibrary.aspx?PRODUCT_TYPE=3
其中实现代码关键如下:
private static void makeObjCache() { if (mvector == null) { System.exit(1); } mvector.setPrjCoordSys(new PrjCoordSys(PrjCoordSysType.PCS_EARTH_LONGITUDE_LATITUDE)); String cacheDir = "data/modeldata/model/"; String cacheName = "objCache"; OSGBCacheBuilder cacheBuilder = new OSGBCacheBuilder(mvector, cacheDir, cacheName); cacheBuilder.setFileType(CacheFileType.OSGB); cacheBuilder.setIsCalNormal(false); cacheBuilder.setLODSize(3); HashMap<Integer, Double> map = new HashMap<>(); map.put(0, 0.5); map.put(1, 0.75); map.put(2, 1.0); cacheBuilder.setSimplifyPercent(map); cacheBuilder.setObjectFiltrateThreshold(2); cacheBuilder.setProcessThreadsCount(4); cacheBuilder.setProcessType(ProcessFileType.NORMAL); cacheBuilder.setStorageType(StorageType.Compact); cacheBuilder.setTileWidth(52); cacheBuilder.setTilePyramidSplitType(PyramidSplitType.QuadTree); boolean builded = cacheBuilder.build(); System.out.println("生成完成"+builded); map.clear(); cacheBuilder.dispose();
}
该处实现时思路也是将OBJ导入一个模型数据集内,之后通过OSGBCacheBuilder.build()生成OSGB缓存,请问两种方式区别在哪?
com.supermap.data.processing.OSGBCacheBuilder