I need to create a Python code for validating domains compared to another set of domains. The initial premise here is taking Collector data, downloading the attributes, and comparing certain domains against a set of parameters. This is based off of an educational geology project where students collect field data and list which geologic regions they're in and identify any feature/rock/mineral. There are only 2 domains I need/can compare to a set list. (also, I can not change how the map has been set up) I have planned on having the attribute table exported to CSV and comparing that to another, but I need to use Python to automate it (or maybe model builder and extract the code from that.

import arcpy

# Local variables:
Geology2015New = "GeologyofGa2015New\\Geology2015New"
Regions = "Regions\\Regions"
Prov_correct = "C:\\Users\\Joshua\\Desktop\\School Work\\Summer 2015\\Project\\Prov_correct"

# Process: Feature Compare
arcpy.FeatureCompare_management(Geology2015New, Regions, "Province", "ALL", "", "0.003280833333 Meters", "0.001", "0.001", "", "SedimentaryStructure;Fossils;IgneousRox1;SedimentaryRox1;MetamorphicRox1;IgneousRox2;SedimentaryRox2;MetamorphicRox2;GeologicStructure;Strike;Dip;Description;EditDate;Editor;Shape;FID_physio;FID_phys_1;AREA;PERIMETER;PHYSIO_;PHYSIO_ID;FCODE;FENCODE;DIVISION;Shape_Leng;FillTransparency;OutlineTransparency;SHAPE_Length;SHAPE_Area", "NO_CONTINUE_COMPARE", Prov_correct)
  • Currently I have tried to use xlrd to open the excel files I have created from the attribute tables but I am having trouble getting Python to find my file path. I am extremely new to Python, so I'm sure it is something I have not connected correctly. – MrJoshua Nov 28 '15 at 20:49
  • 1
    I don't use ArcMap and don't understand the purpose of FeatureCompare, unfortunately. However if you're having problems with the path to your Geology2015New and Regions variables, you may need to specify a full path. You should also use os.path rather than just a string to your path. as you're new to Python, I really think you need to do some Python intros first before you go on to this task. – alphabetasoup Nov 29 '15 at 0:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.