首页 > 代码库 > JAVA基于AE调用GP实现泰森多边形

JAVA基于AE调用GP实现泰森多边形

public void CreatVoronoi(){				try {								GeoProcessor gp=new GeoProcessor();	        gp.setOverwriteOutput(true);			CreateThiessenPolygons createThiessen=new CreateThiessenPolygons();			createThiessen.setInFeatures("F:/db/pts.shp")		                           createThiessen.setOutFeatureClass("F:/db/out.shp");			createThiessen.setFieldsToCopy("ONLY_FID");			gp.execute(createThiessen, null);	        String strMessage = "";            for (int i = 0; i < gp.getMessageCount(); i++)            {                strMessage += gp.getMessage(i).toString() + "\r\n";            }            System.out.println("---"+strMessage);		} catch (AutomationException e) {			e.printStackTrace();		} catch (IOException e) {			e.printStackTrace();		}	}