From cb86059c3007d11b6be5aeda7d754ecf23c8e602 Mon Sep 17 00:00:00 2001 From: HKS Date: Sat, 27 May 2023 16:25:02 +0800 Subject: [PATCH] delete codes to index FeatureCode field --- .gitignore | 2 ++ translate2old.py | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..763cd41 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/log/ +/NEWGDB/ diff --git a/translate2old.py b/translate2old.py index 1b60f50..3b0044f 100644 --- a/translate2old.py +++ b/translate2old.py @@ -198,8 +198,6 @@ def transform_to_feature_class(fc_name, out_location): out_fc = fc_name if out_fc == "" else out_fc try: add_log_info(str(fc_name) + "-->" + str(out_fc)) - # 每个图层的FeatureCode字段加索引 - arcpy.AddIndex_management(fc_name, "FEATURECODE", "FeatureCode_Index", "NON_UNIQUE", "NON_ASCENDING") if arcpy.Exists(os.path.join(out_location, out_fc)): # 先转换到内存工作空间 # arcpy.FeatureClassToFeatureClass_conversion(fc_name, "in_memory", "buffer", expression)