专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > GIS

关于SDE JAVA API的有关问题

发布时间:2010-06-06 17:15:57 文章来源:www.iduyao.cn 采编人员:星星草
关于SDE JAVA API的问题,请教高手
请教一下,我用的是SDE for Oracle,现在我想通过Java API将SDE数据库中的一个点对象修改掉(比如原来的坐标是(50,50),现在该为(100,100)).代码如下:
  SeUpdate update = null;
  SeShape shape = null;
  try {
uid = row.getInteger(idex);
shape = (SeShape) row.getShape(0);
update = new SeUpdate(conn);

SeObjectId featureId = new SeObjectId(uid);
row = update.singleRow(featureId, geomTableName, cols);

int numPts = 1;
SDEPoint[] ptArray = new SDEPoint[numPts];
ptArray[0] = new SDEPoint(100,100);
shape.generatePoint(numPts, ptArray);
row.setShape(0,shape);
update.execute();
update.close();
  } catch (SeException e) {
  try {
  update.close();
  } catch (SeException se) {
System.out.println(se.getSeError().getErrDesc());
}
  e.printStackTrace();
  return false;
执行到update.execute()时抛出异常:

ArcSDE Error Number : -22
 Error Description : SPECIFIED SHAPE - LAYER:FID DOESN'T EXIST.
com.esri.sde.sdk.client.SeException: 
at com.esri.sde.sdk.client.j.a(Unknown Source)
at com.esri.sde.sdk.client.j.e(Unknown Source)
at com.esri.sde.sdk.client.j.r(Unknown Source)
at com.esri.sde.sdk.client.j.b(Unknown Source)
at com.esri.sde.sdk.client.SeStreamOp.execute(Unknown Source)

请教一下该如何解决啊。


------解决方案--------------------
shape = (SeShape) row.getShape(0);
 shape没取到吧
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: