c# 创建随机点

最近在研究在用 GP工具创建随机点,目的是在指定 线段上 创建随机点。

我参考了 http://blog.csdn.net/chhdxzq/article/details/43453413  这篇。

但问题较多

比如
Geoprocessor toLineGeoprocessor = new Geoprocessor();
                //初始化工作空间
                toLineGeoprocessor.SetEnvironmentValue("workspace", @"C:\Users\TOMATO\Documents\ArcGIS\Default.gdb");

中 workspace 指什么。
已邀请:

朱新颖

赞同来自:

就是您当前操作的数据在哪个工作空间里,一般GP工具的输入输出参数需要使用要素类的绝对路径,比如Create Random Points工具:输出点要素类若为@“D:\test\test.gdb\point”,如果设置了gp.SetEnvironmentValue("workspace", @"D:\test\test.gdb");,那么输出点要素类路径只写point即可。

要回复问题请先登录注册