阅读:976回复:0
如何调整join data的精确度
在arcmap里面,图层的joindata对话框里选择join data from another layer based on
spatial 第二项选择 each polygon will ..... if a polygon falls inside more....,通过这个向导,我可以把图层A和图层B的属性配起来。图层A图>图层B, A join B。根B对A的空间压盖关系对A的属性赋值。 我查帮助,关于这个方面的代码有一个例子 Dim pSpJoin As ISpatialJoin Dim pFCNew As IFeatureClass Set pSpJoin = New SpatialJoin With pSpJoin Set .JoinTable = pPntLayer.FeatureClass Set .SourceTable = pAreaLayer.FeatureClass .LeftOuterJoin = True End With ' setting maxMapDist to 0 means that only points within ' each each polygon will be considered Set pFCNew = pSpJoin.JoinNearest(pName, 0) 我把最后一句改成 Set pFCNew = pSpJoin .JoinWithin(pName) 对于完全重叠的两个图册,得到了和向导一样的结果。可是如果B是A的部分数据合并后的结果。可能是并不是完全百分百重合的关系,这段代码就得不到想要得结果了。但是通过向导,仍能得到原先结果,我试着把B做缓冲再join,但无论怎么调整缓冲得值都得不到和 向导一样得结果。通过仔细分析,向导得到得结果最准确。请问。我如果只能用代码实现如何才能达到和向导一样得结果? |
|