阅读:1970回复:2
[求助]如何修改格网大小?
<P>程序部分代码如下:</P>
<P>IFields pInFields, pOutFields;<BR>IFieldChecker pFldChk = new FieldCheckerClass();<BR>pInFields = InFClass.Fields;<BR>IEnumFieldError err;<BR>pFldChk.Validate(pInFields, out err, out pOutFields);</P> <P>//设置索引格网</P> <P>IGeometryDef pGeometryDef = new GeometryDefClass();<BR>for (int k = 0; k < pOutFields.FieldCount; k++)<BR> {<BR> if (pOutFields.get_Field(k).Type ==esriFieldType.esriFieldTypeGeometry)<BR> {<BR> pGeometryDef = pOutFields.get_Field(k).GeometryDef;<BR> break;<BR> }<BR> }</P> <P><BR>IGeometryDefEdit pGeoDefEdit = (IGeometryDefEdit)pGeometryDef;<BR>pGeoDefEdit.set_GridSize(0, mGridSize);修改格网大小mGridSize<BR>IFeatureDataConverter pFCToFC = new FeatureDataConverterClass();<BR>/////导入<BR>pFCToFC.ConvertFeatureClass(pInFCName, null, pOutFeatDSName, pNewFCName, pGeometryDef, pOutFields, "", 1000, 0);</P> <P>修改后,pGeometryDef里面gridsize变成了新的值,但是用ConvertFeatureClass转换就回到原来的值<BR><BR>我修改格网大小后怎么再最后一句导入后格网还是原来的大小,而不是我的mGridSize的数值呢?或者原来发生invalid grid size错误的仍然出现这个错误<BR>/////怎么才能真正修改格网大小呢?</P> <P><BR> </P> |
|
1楼#
发布于:2007-07-05 15:15
没有人知道吗?
|
|
2楼#
发布于:2007-07-16 20:39
我不知道.关注一下!
|
|