ArcGIS Engine从ArcGIS 92版本开始可以调用Geoprocessing的工具(ArcToolbox)。但是ArcToolbox中的工具是有严格的许可控制的,例如有些工具是ArcView级别的,有些是ArcEditor级别,而有些是ArcInfo级别。在Engine中相对应的许可可以调用这些工具呢?通过搭建一个纯的Engine开发环境(No Desktop installed),测试结果做如下总结。
http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Licensing_for_geoprocessing_tools
1. Engine license equates to ArcView
2. Engine + Enterprise GeoDatabase equates with ArcEditor
3. Engine extensions equate with Desktop extensions
4. There is no Engine equivalent for an ArcInfo license
但这只是功能上的对等。
单纯装Engine的机器,有Engine+GDB许可,调用
eS = m_pAoInitialize.IsProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeArcEditor);
es的值仍然为esriLicenseNotLicensed
.
都放在C:\Program Files\ArcGIS\ArcToolBox\Toolboxes下。
对比桌面和Engine下的Toolbox,Engine只少了Mobile.tbx,其它的都有。
(1)无特需说明的工具,例如:
ASCII to Raster,只需Engine License即可。
(2)注明ArcEditor以上才能使用,如果生成的数据没有到SDE数据库中,也不需要特殊的License即可使用。如果生成的数据到SDE库中,则需要相应的GDB扩展许可。
例如:Simplify Line, SmoothLine
(3)注明需要特殊的扩展许可,例如Spatial 扩展,则需要Check相应的扩展模块许可。
例如:Network相关的工具
(4)注明ArcInfo才能使用,必须得在局域网内安装ArcGIS Desktop,否则无法使用。主要原因在于Engine目前没有许可组成可以达到类似桌面的许可级别。
使用的方法:
http://resources.esri.com/help/9.3/ArcGISEngine/dotnet/26861f76-e388-49ca-9f49-36a2c6d9be0e.htm
即在Engine环境中设置一个环境变量,名字为:ARCGIS_LICENSE_FILE;并且其值为@<hostname>。<hostname>是指安装Desktop License Manager的那台机器的名字。
设置完之后,再调用
m_pAoInitialize.IsProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeArcEditor);
返回的值即为esriLicenseAvailable,然后就可以用这个License进行初始化。
ArcInfo级别的工具不是太多,总结如下:
1. Erase
2. Identity
3. Create Thiessen Polygons
4. Generate Near Table
5. Near
6. Point Distance
7. Frequency
8. Cul-de-Sac Masks
9. Feature Outline Masks
10. Intersecting Layers Masks
11. Add Representation
12. Calculate Representation Rule
13. Drop Representation
14. Remove Override
15. Select Feature by Override
16. Set Layer Representation
17. Update Override
18. Align Marker to Stroke or Fill
19. Calculate Geodesic Angle
20. Calculate Line Caps
21. Calculate Polygon Main Angle
22. Create Overpass
23. Create Underpass
24. Disperse Markers
25. Set Representation Control Point At Intersect
26. Set Representation Contol Point By Angle
27. Feature Class to Coverage
28. Feature Envelope to Polygon
29. Feature to Line
30. Feature to Point
31. Feature to Polygon
32. Feature Vertices to Points