在一些特殊的情况,我们需要对点要素文件进行“去重”处理。
这里提供arcpy代码,写一个简单的算法,删除shp点文件中,位置重叠的点。
import arcpy
def whether_close(pt1, pt2):
if pow((pt1[0]-pt2[0]),2)+pow((pt1[1]-pt2[1]),2)<10:
return True
return False
inFC = 'temp\New_Shapefile.shp'
theFields = arcpy.ListFields(inFC)
FieldsArray =