关于arcobject报错AutomationException: 0x80004005 - Unspecified error
(2017-02-14 10:51:36)在使用arcobject开发的时候经常会遇到AutomationException: 0x80004005 - Unspecified
error这个错误,捣鼓很久也找不到问题出在哪里,今天使用栅格数据转矢量的GP工具时提示这个错误,最后的问题原因是生成的路径太深的,保持在三级路径以内是不报错的还有一个就是路径不能用中文和空格用空格也会报错的。
RasterToPolygon rasterToPolygonTool=new
RasterToPolygon();
rasterToPolygonTool.setInRaster(conctRasterLayer.getRaster());
rasterToPolygonTool.setOutPolygonFeatures(outputPath+PathSeperator+EffectedRegionFeatureClassName);
rasterToPolygonTool.setSimplify("NO_SIMPLIFY");
IGeoProcessorResult gpResult=gp.execute(rasterToPolygonTool,
null);
Object rt=gpResult.getReturnValue();
保持生成路径在三级以内,路径不能用中文、空格。
AutomationException: 0x80004005 - Unspecified error
Chemical Evaluation Model:Running evaluation model
error(AutomationException: Unspecified error)
at com.esri.arcgis.geoprocessing.GeoProcessor.execute(Unknown
Source)
at com.esri.arcgis.geoprocessing.GeoProcessor.execute(Unknown
Source)
at
org.cybergis.components.ChemicalEvaluationModel.buildBoundLayer(ChemicalEvaluationModel.
at
org.cybergis.components.ChemicalEvaluationModel.run(ChemicalEvaluationModel.
at
test.ChemicalEvaluationModelTest.(ChemicalEvaluationModelTest.
at
test.ChemicalEvaluationModelTest.main(ChemicalEvaluationModelTest.
前一篇:计算两点之间的角度