Пример #1
0
def createLayer(targetpath, outname, tempoutname, delTargetValueList):
    """生成临时图层和要删除的要素的图层"""

    delstr = "'" + "','".join(delTargetValueList) + "'"

    where_clause = "TSTYBM in (%s)" % (delstr)

    arcpyDeal.createExistsTempLayer(targetpath, outname)

    arcpyDeal.createExistsTempLayer(targetpath,
                                    tempoutname,
                                    where_clause=where_clause)
Пример #2
0
def createLayer(targetpath, outname, tempoutname):
    """根据标记生成临时图层和输出图层"""

    where_clause1 = " intersecrteddeal = '1'"
    where_clause2 = " intersecrteddeal = '0'"

    arcpyDeal.createExistsTempLayer(targetpath,
                                    outname,
                                    where_clause=where_clause1)
    arcpyDeal.createExistsTempLayer(targetpath,
                                    tempoutname,
                                    where_clause=where_clause2)
def start(targetpath, outname):

    arcpyDeal.createExistsTempLayer(targetpath, outname)

    cursor = arcpy.da.UpdateCursor(outname, ["bhlx"])

    result = arcpy.GetCount_management(outname)
    count = int(result.getOutput(0))
    arcpy.SetProgressor('step', '遍历进度', 0, count, 1)

    for row in cursor:

        bhlx = dealNone.dealNoneAndBlank(row[0])

        if bhlx == "":

            cursor.deleteRow()

        arcpy.SetProgressorPosition()
Пример #4
0
def start(targetpath, BDTBpath, photopath, tempTargetPath, tempBDTBpath,
          tempPhotoPath):

    keepTargetFields = [
        "TSTYBM", "BSM", "ZLDWDM", "JZSJ", 'DLBM', "WJZLX", "CZCSXM", 'GDLX',
        'TBXHDM', 'TBXHMC', 'GDZZSXDM', 'GDZZSXMC', 'LINKTBS', 'SJDLBM',
        "DLBM_1", "GDZZSXMC_1", "GDLX_1", "TBXHMC_1"
    ]
    keepBDTBFields = ["ZLDWDM", "BSM", "DLBM", "CZCSXM"]

    arcpy.AddMessage("1_现状库")
    arcpyDeal.createExistsTempLayer(targetpath,
                                    tempTargetPath,
                                    keepFields=keepTargetFields)

    arcpy.AddMessage("1_初始库")
    arcpyDeal.createExistsTempLayer(BDTBpath,
                                    tempBDTBpath,
                                    keepFields=keepBDTBFields)

    arcpy.AddMessage("1_照片点")
    arcpyDeal.createExistsTempLayer(photopath, tempPhotoPath)
Пример #5
0
    tempxzkpath = "outputxzkpath_2"
    tempPhotoPath = "outputtppath_2"

    keepTargetFields = [
        'TSTYBM', 'BSM', 'ZLDWDM', 'JZSJ', 'DLBM', 'WJZLX', 'CZCSXM', 'GDLX',
        'TBXHDM', 'TBXHMC', 'GDZZSXDM', 'GDZZSXMC', 'LINKTBS', 'SJDLBM',
        'OLDTAG', 'ZZJZTB'
    ]
    keepBDTBFields = ['ZLDWDM', 'BSM', 'DLBM', 'CZCSXM']

    arcpy.AddMessage("2_现状库")
    arcpyDeal.copyToTempLayer(enviroment,
                              xzkpath,
                              tempxzkpath,
                              keepFields=keepTargetFields,
                              addFields=["width"],
                              addFieldsType="DOUBLE")

    arcpy.AddMessage("2_初始库")
    arcpyDeal.copyToTempLayer(enviroment,
                              cskpath,
                              tempcskpath,
                              keepFields=keepBDTBFields)

    arcpy.AddMessage("2_照片点")
    arcpyDeal.createExistsTempLayer(photopath, tempPhotoPath)

    arcpy.SetParameterAsText(4, tempxzkpath)
    arcpy.SetParameterAsText(5, tempcskpath)
    arcpy.SetParameterAsText(6, tempPhotoPath)
    arcpy.AddMessage("2_结束")