对广大用户来说,ArcSDE SDK对用户来说一直是比较神秘的,因为ArcSDE SDK只在ArcSDE9.3的光盘上跟ArcSDE安装介质整合到一块,也就是在这个版本被用户所熟知和使用,但是从ArcSDE9.3.1版本又神秘的失踪了,这让很多用户对ArcSDE SDK的神秘性很是好奇,而且还有不少用户也钟情于使用ArcSDE SDK。
Tips:目前比较流行的开发手段包括:
如果是ArcGIS Engine、ArcObject开发是名门正派的话,SQL操作和SDK就属于旁门左道,毕竟后两者的开发需要开发人员比较深厚的编程能力、数据库能力以及ArcSDE的深入了解等,那么就介绍一下ArcSDE SDK。
ArcSDE SDK跟ArcSDE是可以类比的,这个类比就是开发需要版本相一致,而且ArcSDE SDK也是分64Bit和32Bit的,而且ArcSDE SDK也包括C API和Java API两种
Tips:从上面的内容我们可以获得,如果ArcSDE打上相关的SP补丁,那么ArcSDE SDK也同步即可
既然SDK分32Bit和64Bit,那么编译器的位数最好也与SDK一致
先把ArcSDE SDK的帮助文档呈现给大家:http://help.arcgis.com/en/geodatabase/10.0/sdk/arcsde/welcome.htm
该帮助文档包括:概念介绍、API介绍、典型例子:
Tips:这里的概念最经典的就是对版本的介绍,大家可以看看,这可是在ArcGIS桌面帮助里面找不到的
1:可以进行ArcSDE的数据连接(完全废话)、那么也可以进行版本的相关操作、ArcSDE实例的管理
2:矢量数据的操作(编辑、查询、投影修改等)
3:影像数据的操作
4:ArcSDE Schema的操作
5:其他用户用的比较少的比如log files、XML等
Tips:其实不管是使用SQL操作还是SDK,相关的操作对象都是简单对象(点、线、面),那么如果你还有复杂对象的话,那只能使用ArcGIS Engine或者ArcObject了,这是用户在选择开发方式需要结合自己的项目需求来自行评定的。
During ArcSDE client installation, the following files are installed:
File | Description |
jsde_sdk.jar | Contains the ArcSDE Client, and Geometry Java API class files. |
jpe_sdk.jar | Contains the ArcSDE Projection Engine Java API class files. |
concurrent.jar | Provides standardized, efficient versions of utility classes commonly encountered in concurrent Java programming. |
icu4j_3_2.jar | ICU4J libraries required for globalization. |
The following DLLs are required for direct connect support.
File | Description |
sdejavautil.dll | This modules contains the ArcSDE direct connect library functions. |
gsrvr*93.dll | This modules contains the ArcSDE direct connect library functions. |
sde*gsrvr93.dll | This modules contains the ArcSDE direct connect library functions. |
sde.dll | This modules contains the ArcSDE client library functions. |
sg.dll | This modules contains the ArcSDE shape library functions. |
pe.dll | This modules contains the ArcSDE pe library functions. |
xerces*.dll | This modules contains the XML parser library functions. |
icu*.dll | This modules contains the Unicode support library functions. |
开发参考:http://blog.csdn.net/warrenwyf/article/category/705061
附赠相关的代码参考
package lish.test; import com.esri.sde.sdk.client.*; import com.esri.sde.sdk.client.SeTable.*; import java.util.Vector; public class test { private static SeConnection conn = null; private static String server = "192.168.205.142"; private static String instance = "5353"; private static String database = ""; private static String username = "sde"; private static String password = "sde"; //获得ArcSDE连接 private static SeConnection getConn() { if (conn == null) { try { conn = new SeConnection(server, instance, database, username, password); } catch (SeException ex) { ex.printStackTrace(); } } return conn; } /** * @param args */ public static void main(String[] args) { GetArcSDEInfo(); } //ArcSDE管理 public static void GetArcSDEInfo() { try { SeInstance instance = new SeInstance(server, "5353"); SeInstance.SeInstanceStatus status = instance.getStatus(); System.out.println("连接数:"+status.getNumConnections()); System.out.println("可以连接:"+status.isAccepting()); System.out.println("------------------------------------------------"); SeInstance.SeInstanceConfiguration config = instance.getConfiguration(); System.out.println("最大连接数:"+config.getMaxConnections()); System.out.println("------------------------------------------------"); SeInstance.SeInstanceStats[] stats=instance.getStats(); for (int i=0;i<stats.length;i++) { System.out.println("操作数:"+stats[i].getOperationCount()); } System.out.println("------------------------------------------------"); SeInstance.SeInstanceUsers[] users=instance.getUsers(); for(int j=0;j<users.length;j++) { System.out.println("用户名:"+users[j].getUserName()); System.out.println("系统名:"+users[j].getSysName()); System.out.println("服务器开始时间:"+users[j].getServerStartTime()); System.out.println("服务器PID:"+users[j].getServerPid()); System.out.println("*****************************"); } System.out.println("------------------------------------------------"); System.out.println("系统名:"+instance.getServerName()); System.out.println("------------------------------------------------"); System.out.println("------------------------------------------------"); SeInstance.SeInstanceTableLocks[] tablelocks=instance.getTableLocks(); for(int i=0;i<tablelocks.length;i++) { System.out.println("表级别锁类型:"+tablelocks[i].getLockType()); System.out.println("表级别锁PID:"+tablelocks[i].getPid()); System.out.println("表级别锁注册ID:"+tablelocks[i].getRegistrationId()); System.out.println("*****************************"); } System.out.println("------------------------------------------------"); } catch (SeException e) { e.printStackTrace(); } } //空间条件查询 public static void SpatialQuery() { try { SeConnection conn = getConn(); SeLayer layer = new SeLayer(conn,"quxian","SHAPE"); SeTable table = new SeTable(conn, "quxian"); SeColumnDefinition[] tableDef = table.describe(); String[] cols = new String[tableDef.length]; for (int j = 0; j < cols.length; j++) { cols[j] = tableDef[j].getName(); } SeCoordinateReference cr = layer.getCoordRef(); SeFilter[] filters = new SeFilter[1]; SeShape shape = new SeShape(cr); shape.generateFromText("POLYGON((125.091 44.324,125.070 43.428,125.887 44.027,125.091 44.324))"); //SDEPoint pt = new SDEPoint(125.091,44.324); //shape.generatePoint(1, new SDEPoint[] { pt }); SeFilter filter = new SeShapeFilter(layer.getName(), layer .getSpatialColumn(), shape, SeShapeFilter.METHOD_ENVP); filters[0] = filter; SeSqlConstruct sqlCons = new SeSqlConstruct(layer.getName()); SeQuery query = new SeQuery(conn, cols, sqlCons); query.prepareQuery(); query.setSpatialConstraints(SeQuery.SE_OPTIMIZE, false,filters); query.execute(); SeRow row =query.fetch(); while(row!=null) { System.out.println(row.getObject(1).toString()); row =query.fetch(); } } catch (Exception ex) { ex.printStackTrace(); } } //属性条件查询 public static void AttributeQuery() { try { SeConnection conn = getConn(); SeTable table = new SeTable(conn, "quxian"); SeColumnDefinition[] tableDef = table.describe(); String[] cols = new String[tableDef.length]; for (int j = 0; j < cols.length; j++) { cols[j] = tableDef[j].getName(); } SeSqlConstruct sqlCons = new SeSqlConstruct("quxian"); sqlCons.setWhere("CITY='长春市'"); SeQuery query = new SeQuery(conn, cols, sqlCons); query.prepareQuery(cols,sqlCons); query.execute(); SeRow row =query.fetch(); while(row!=null) { System.out.println(row.getObject(1).toString()); System.out.println(row.getObject(4).toString()); row =query.fetch(); } } catch (Exception ex) { ex.printStackTrace(); } } //普通查询 public static void CommonQuery() { try { SeConnection conn = getConn(); SeTable table = new SeTable(conn, "conn"); SeColumnDefinition[] tableDef = table.describe(); String[] cols = new String[tableDef.length]; for (int j = 0; j < cols.length; j++) { cols[j] = tableDef[j].getName(); } SeSqlConstruct sqlCons = new SeSqlConstruct("conn"); SeQuery query = new SeQuery(conn, cols, sqlCons); SeQueryInfo queryInfo = new SeQueryInfo(); queryInfo.setQueryType(SeQueryInfo.SE_QUERYTYPE_ATTRIBUTE_FIRST); queryInfo.setColumns(cols); queryInfo.setConstruct(sqlCons); query.prepareQueryInfo(queryInfo); query.execute(); SeRow row =query.fetch(); while(row!=null) { System.out.println(row.getObject(0).toString()); row =query.fetch(); } } catch (Exception ex) { ex.printStackTrace(); } } //获得ArcSDE版本信息 public static void GetVersion() { SeConnection conn =getConn(); SeRelease release=conn.getRelease(); System.out.println(release.getBugFix()); System.out.println(release.getDesc()); System.out.println(release.getRelease()); System.out.println(release.getMajor()); System.out.println(release.getMinor()); }
-------------------------------------------------------------------------------------------------------
版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!
------------------------------------------------------------------------------------------------------