由于粗心在建立了shpdatastore创建之后,没有关闭,导致了上述的错误。- //shp文件的读取
- ShapefileDataStore shpDataStore = null;
- File shpfile = new File(shppath);
- shpDataStore = new ShapefileDataStore(shpfile.toURI().toURL());
复制代码 在将shpdatastore关闭之后,问题就没有了- itertor.close();
- shpDataStore.dispose();//使用之后必须关掉
- shpfile.exists();
- indexWriter.close();//提交索引到磁盘上的索引库,关闭索引器
复制代码 参考: https://wap.sciencenet.cn/home.php?mod=space&uid=3134052&do=blog&id=1081104
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作! |