GP 环境参数名称列表
Using environment settings |
In this topic
About using environment settings
|
Method
|
Description
|
|
GetEnvironmentValue(envName)
|
Retrieves the value of an environment by name.
|
|
SetEnvironmentValue(envName, envValue)
|
Updates the value of an environment by name.
|
|
Resets the environments to their default state.
|
|
|
ListEnvironments("*")
|
Returns the list of environments (properties).
|
|
SaveSettings(sFileName)
|
Saves the current settings (toolboxes, environments, and so on) to a file on disk in Extensible Markup Language (XML) format.
|
|
LoadSettings(sFileName)
|
Loads the current settings from the saved file.
|
[C#]
public void setCoordinateSystem(IGeoProcessor2 gp)
{
// Set overwrite option to true.
gp.OverwriteOutput = true; // Set workspace environment.
gp.SetEnvironmentValue("workspace", @"C:\data\saltlake.gdb"); // Set the output coordinate system environment.
gp.SetEnvironmentValue("outputCoordinateSystem", @
"C:\Program Files\ArcGIS\Desktop10.0\Coordinate Systems\Projected Coordinate Systems\UTM\Nad 1983\NAD 1983 UTM Zone 12N.prj"); IVariantArray parameters = new VarArrayClass();
parameters.Add("roads");
parameters.Add("roads_copy"); gp.Execute("CopyFeatures_management", parameters, null);
}
[VB.NET]
Public Sub setCoordinateSystem(ByVal gp As IGeoProcessor2)
'Set overwrite option to true.
gp.OverwriteOutput = True
'Set workspace environment.
gp.SetEnvironmentValue("workspace", "C:\data\saltlake.gdb")
'Set the output coordinate system environment.
gp.SetEnvironmentValue("outputCoordinateSystem", "C:\Program Files\ArcGIS\Desktop10.0\Coordinate Systems\Projected Coordinate Systems\UTM\Nad 1983\NAD 1983 UTM Zone 12N.prj")
Dim parameters As IVariantArray = New VarArray
parameters.Add("roads")
parameters.Add("roads_copy")
gp.Execute("CopyFeatures_management", parameters, Nothing)
End Sub
[C#]
// Get the cell size environment value.
object env = gp.GetEnvironmentValue("cellsize"); // Reset the environment values to their defaults.
gp.ResetEnvironments();
[VB.NET]
' Get the cell size environment value.
Dim env As Object = GP.GetEnvironmentValue("cellsize") ' Reset the environment values to their defaults.
GP.ResetEnvironments()
[C#]
public void ListGeoprocessingEnvironments(IGeoprocessor2 gp)
{
// List all environments that start with the letter q.
IGpEnumList environments = gp.ListEnvironments("q*"); // Only one environment starts with q (qualifiedFieldNames).
string env = environments.Next();
Console.WriteLine(env); }
[VB.NET]
Public Sub ListGeoprocessingEnvironments(ByVal gp As IGeoProcessor2)
'List all environments that start with the letter q.
Dim environments As IGpEnumList = gp.ListEnvironments("q*")
Dim env As String = environments.Next()
'Only one environment starts with q (qualifiedFieldNames).
Console.WriteLine(env)
env = environments.Next()
End Sub
[C#]
public void SaveLoadSettings(IGeoProcessor2 gp)
{
gp.SetEnvironmentValue("workspace", @"C:/data/mydata.gdb");
gp.SetEnvironmentValue("extent", "-3532000, -911000, -3515000, -890000");
gp.SetEnvironmentValue("outputCoordinateSystem",
"PROJCS['NAD_1983_UTM_Zone_11N',GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-117.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]"); // Save environment settings to an XML file.
string settingsFile = @"C:\sdk\MyCustomSettings.xml";
gp.SaveSettings(settingsFile); // Load previously saved environment settings.
gp.LoadSettings(settingsFile);
object sExtent = gp.GetEnvironmentValue("workspace");
}
[VB.NET]
Public Sub SaveLoadSettings(ByVal gp As IGeoProcessor2)
gp.SetEnvironmentValue("workspace", "C:/data/mydata.gdb")
gp.SetEnvironmentValue("extent", "-3532000, -911000, -3515000, -890000")
gp.SetEnvironmentValue("outputCoordinateSystem", "PROJCS['NAD_1983_UTM_Zone_11N',GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-117.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]")
' Save environment settings to an XML file.
Dim settingsFile As String = "C:\sdk\MyCustomSettings.xml"
gp.SaveSettings(settingsFile)
' Load previously saved environment settings.
gp.LoadSettings(settingsFile)
Dim sExtent As Object = gp.GetEnvironmentValue("workspace")
End Sub
Environment settings summary table
|
Environment name
|
Display name
|
|
autoCommit
|
|
|
cartographicCoordinateSystem
|
|
|
cellSize
|
|
|
coincidentPoints
|
|
|
compression
|
|
|
configKeyword
|
|
|
derivedPrecision
|
|
|
extent
|
|
|
geographicTransformations
|
|
|
maintainSpatialIndex
|
|
|
mask
|
|
|
MDomain
|
|
|
MResolution
|
|
|
MTolerance
|
|
|
newPrecision
|
|
|
outputCoordinateSystem
|
|
|
outputMFlag
|
|
|
outputZFlag
|
|
|
outputZValue
|
|
|
projectCompare
|
|
|
pyramid
|
|
|
qualifiedFieldNames
|
|
|
randomGenerator
|
|
|
rasterStatistics
|
|
|
referenceScale
|
|
|
scratchWorkspace
|
|
|
snapRaster
|
|
|
spatialGrid1, 2, 3
|
|
|
terrainMemoryUsage
|
|
|
tileSize
|
|
|
tinSaveVersion
|
|
|
workspace
|
|
|
XYDomain
|
|
|
XYResolution
|
|
|
XYTolerance
|
|
|
ZDomain
|
|
|
ZResolution
|
|
|
ZTolerance
|
See Also:
What is a geoprocessing environment?
A quick tour of geoprocessing environments
GP 环境参数名称列表的更多相关文章
- GP工具环境变量名称列表
帮助地址:http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/#/Using_environment_settings/ ...
- python+tushare获取A股所有股票代码和名称列表
接口:stock_basic 描述:获取基础信息数据,包括股票代码.名称.上市日期.退市日期等 注:tushare模块下载和安装教程,请查阅我之前的文章 输入参数 名称 | 类型 ...
- 清理SQL Server服务器名称列表
SQL2008: C:\Users\TQ\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin SQ ...
- Gof-23种设计模式名称列表
工欲善其事,必先利其器. 在真正使用设计模式之前,必须知道各个设计模式对应的场景.设计模式是针对某种固定的场景下产生的固定解决方案.只有明确的场景,才会有明确的设计方式和方法. 设计模式全集: Abs ...
- python 获取excel文件内sheet名称列表
xl = pd.ExcelFile('foo.xls') xl.sheet_names # see all sheet names xl.parse(sheet_name) # read a spec ...
- arcgis python ListEnvironments 函数可返回地理处理环境名称列表。
import arcpy environments = arcpy.ListEnvironments() # Sort the environment names environments.sort( ...
- ArcGIS 10.1 发布使用ArcEngine自定义的GP服务
1. 新建立GP模型 在VS2010中新建一个普通的程序及,引入ArcEngine相关的dll.在该DLL中定义一个或多个GP类和一个GP工厂类.GP类要继承IGPFunction2接口,GP工厂类要 ...
- ArcGIS Server GP服务使用常见错误总结
ArcGIS GP服务问题列表 输入参数错误 在使用GP服务时,从创建模型到发布服务,再到调用服务,整个过程都需要注意输入参数和输出参数的问题.GP服务支持的输入和输出参数可详见 http://hel ...
- Python-7 列表list
#1 创建列表.向列表中添加元素 1) 列表名称.append(*) 2) 列表名称.extend([*,*,...]) 3) 列表名称.insert(位置,*) member = ['小甲鱼','小 ...
随机推荐
- C#方法参数传递机制
1:value(值传递).ref(引用传递).out(输出传递) ref和out使用效果上面是等效的,它们的区别在于:参数标记为ref,那么必须在调用函数之前初始化参数的值:参数标记为out,调用函数 ...
- 13个JavaScript图表(JS图表)图形绘制插件【转】
现在网络上又有越来越多的免费的(JS 图表)JavaScript图表图形绘制插件.我之前给一家网站做过复杂的图形,我们用的是 highchart.在那段时间,没有很多可供选择的插件.但现在不同了,很容 ...
- ios 大图 真机不显示的问题
png的图片只是命名为png,格式不是png的. 打开terminal终端,cd图片目录,输入命令sips -s format png *.* --out pngs,再把图片覆盖即可
- JAVAWEB学习总结 HttpServletResponse对象(一)
Web服务器收到客户端(浏览器)的http请求,会针对每一次请求,分别创建一个用于代表请求的request对象,和代表响应的response对象. request和response对象既然代表请求和响 ...
- NSOperationQueue的其他方法
1.设置最大并发数 什么是并发数 同时执行的任务数 比如,同时开3个线程执行3个任务,并发数就是3 最大并发数的相关方法 - (NSInteger)maxConcurrentOperationCo ...
- centos 7 lamp (linux+apache+mysql+php)开发环境搭建(转+原创)
准备篇:CentOS 7.0系统安装配置图解教程 http://www.jb51.net/os/188487.html 一.配置防火墙,开启80端口.3306端口 CentOS 7.0默认使用的是fi ...
- BackTrack5-r3安装VMware Tools
bt login:root //默认的BT系统账号password:toor //默认的BT系统密码,这里的密码是不显示的.root@bt:~#startx //进入图形模式 启动BT虚拟机系统-在V ...
- iOS 源代码管理工具之SVN
源代码管理工具之SVN 源代码管理工具SVN是一款非常强大的源代码管理工具,现在国内70%-90%的公司都在使用SVN来管理源代码,下面就让小编给大家着重介绍一下SVN的使用,SVN的使用主要分为下面 ...
- Object.observe
使用Object.observe 实现数据绑定
- 海洋女神建新installshield交流群了,原来的老群都满了,请加新群哦,记得认真填写验证信息
群号511751143 海洋女神installshield群