示例#1
0
    ##                                    where_clause, sr, False, sql_clause) as sCur:
    ##        pass

    if minTime > '0':
        filterRedundant(in_file, filtList, minTime)
        import dev_filters
        if newFields == 'true':
            out_file = dev_filters.filterOutputFields(in_file, filtList, '_R')
        else:
            out_file = dev_filters.filterOutputLog(in_file, filtList, '_R')
    else:
        arcpy.AddMessage('No features were removed for Orbit Redundant')

    arcpy.AddMessage('Finished with Location Type Filtering')

    return (out_file)


#-------------------------------------------------------------------------------
if __name__ == '__main__':

    defaults_tuple = ((
        'in_file',
        'C:\\CurrentProjects\\Humps All\\GIS\\Hump15AK_new.gdb\\p_00827'),
                      ('minTime', '20'), ('newFields', 'true'))

    defaults = dev_f_utils.parameters_from_args(
        defaults_tuple, sys.argv)  # argv = name of file
    #main(mode='script', **defaults)
    main(**defaults)
示例#2
0
        tb = sys.exc_info()[2]
        tbinfo = traceback.format_tb(tb)[0]
        # Concatenate information together concerning the error into a message string
        pymsg = "PYTHON ERRORS:\nTraceback info:\n" + tbinfo + "\nError Info:\n" + str(
            sys.exc_info()[1])
        msgs = "ArcPy ERRORS:\n" + arcpy.GetMessages(2) + "\n"
        # Return python error messages for use in script tool or Python Window
        arcpy.AddError(pymsg)
        arcpy.AddError(msgs)
        # Print Python error messages for use in Python / Python Window
        print pymsg + "\n"
        print msgs
    finally:
        arcpy.AddMessage('Finished with Path Creation')

    # persist to gdb
    out_file = arcpy.CopyFeatures_management(line_FC, out_name)
    return (out_file)


if __name__ == '__main__':

    defaults_tuple = (
        ('in_file',
         'C:\\CurrentProjects\\Hump18HI\\GIS\\2018HI Hump_3.gdb\\e_05736'),
    )  # NEED that comma!
    defaults = f_utils.parameters_from_args(defaults_tuple, sys.argv)
    #    main(mode='script', **defaults)
    main(**defaults)
#    main(in_file, track_name)