コード例 #1
0
ファイル: cal_real_area.py プロジェクト: hygnic/Gispot
class MainGUI(tooltk.Tooltk):
    commu = multication.MuCation()
    
    def __init__(self, master):
        super(MainGUI, self).__init__(master,
                                      "cal_real_area.gc",
                                      self.confirm)
        self.name=u"计算真实面积"
        frame = (self.Frame, self.FrameStatic, self.FrameDynamic)
        # block
        self.block1 = tooltk.blockShp_in(frame, u"DLTB图层")
        self.block2 = tooltk.blockShp_in(frame, u"XZQ图层")
        self.block3 = tooltk.blockDIR_in(frame, u"GBZ文件夹")
        self.block4 = tooltk.blockValue(frame, u"区县名称")
        self.block5 = tooltk.blockDIR_in(frame, u"GBZ文件夹(19-20年)")
 
    def confirm(self):
        p1, p2, p3, p4, p5 = self.block1.get(), self.block2.get(),self.block3.get(),self.block4.get(),self.block5.get()
        if p5 == u"0": # 等于零时表示不添加19-20年的高标准文件
            p = Process(target=self.commu.decor,
                        args=(warper, p1, p2, p3, p4 ,int(p5))
                        )
        else:
            p = Process(target=self.commu.decor,
                        args=(warper, p1, p2, p3, p4 ,p5)
                        )
        p.start()
        # 将信息输出到右下方的动态信息栏
        self.commu.process_communication(self.major_msgframe)
コード例 #2
0
ファイル: save_acopy.py プロジェクト: hygnic/Gispot
	def __init__(self, master1):
		super(SaveACopyFunction, self).__init__(
			master1, "save_acopy.gc", self.confirm)
		frame = (self.Frame, self.FrameStatic, self.FrameDynamic)
		# block1
		self.block1 = tooltk.blockMXD_in(frame, u"MXD文件")
		# block2
		self.block2 = tooltk.blockMXD_out(frame, u"保存路径")
		self.commu = multication.MuCation()
		self.name="版本降低"
コード例 #3
0
    def __init__(self, master1):
        """
		:param master1: self.master, a widget from interface.py
		"""
        super(Txt2shp, self).__init__(master1, "txt2shp.gc", self.confirm)
        self.name = "txt转shp"
        frame = (self.Frame, self.FrameStatic, self.FrameDynamic)
        # block1
        self.block1 = tooltk.blockDIR_in(frame, u"TXT文件夹")
        # block2
        self.block2 = tooltk.blockDIR_in(frame, u"输出地址")
        self.commu = multication.MuCation()
コード例 #4
0
ファイル: explode.py プロジェクト: hygnic/Gispot
    def __init__(self, master_eem):
        """
		:param master_eem: mian_f, a widget from entrance.py
		"""
        super(App, self).__init__(master_eem, "explode.gc",
                                  self.confirm_method_e)
        frame = (self.Frame, self.FrameStatic, self.FrameDynamic)
        # block1
        self.block1 = tooltk.blockShp_in(frame, u"添加SHP文件")
        # block2 取消按钮
        self.block2 = tooltk.blockShp_out(frame, u"选择保存路径")
        self.commu = multication.MuCation()
コード例 #5
0
class AreaCalGui(tooltk.Tooltk):
    commu = multication.MuCation()

    def __init__(self, master1):
        super(AreaCalGui, self).__init__(master1, "area_cal.gc", self.confirm)
        self.name = "计算地类面积"
        frame = (self.Frame, self.FrameStatic, self.FrameDynamic)
        # block1
        self.block1 = tooltk.blockDIR_in(frame, u"数据文件地址")
        self.block2 = tooltk.blockShp_in(frame, u"DLTB图层")
        self.block3 = tooltk.blockSheet(frame, u"复核表")

    def confirm(self):
        _folder, _shp, _sheet = [
            self.block1.get(),
            self.block2.get(),
            self.block3.get()
        ]
        p = Process(target=self.commu.decor,
                    args=(run_funtion, _folder, _shp, _sheet))
        # p.deamon = True
        p.start()
        # 将信息输出到右下方的动态信息栏
        self.commu.process_communication(self.major_msgframe)


# if __name__ == '__main__':
# 	"""———————————————————————————————para———————————————————————————————————————"""
# 	"""———————————————————————————————para———————————————————————————————————————"""
# 	# folder_path = ur"G:\第三次高标复核\眉山市\511403彭山区\成果1\入库成果数据\510000高标准农田建设上图入库数据20201220"
# 	# 测试路径
# 	# folder_path = ur"G:\第三次高标复核\眉山市\511403彭山区\成果1\test"
# 	folder_path = ur"F:\李恩东\跑模板\广元\剑阁-肖\新建文件夹\510000高标准农田建设上图入库数据20201221"
# 	# 测试路径
# 	dltb_path = ur"F:\李恩东\跑模板\广元\剑阁-肖\底图数据\DLTB.shp"
# 	excel_path = ur"F:\李恩东\跑模板\广元\剑阁-肖\新建文件夹\附表:“十二五”以来高标准农田建设评估复核修正统计表.xlsx"
# 	"""———————————————————————————————para———————————————————————————————————————"""
# 	"""———————————————————————————————para———————————————————————————————————————"""
# 	# 处理shp数据
# 	result_values = handle_shp(folder_path, dltb_path)
# 	# 写出数据到excel
# 	print "excel_path:",excel_path
# 	print "result_values:",result_values
# 	write_excel(excel_path, result_values, "J7:R7")
#
# 	# 处理shp数据
# 	# result_values = handle_shp(folder_path, dltb_path)
# 	# 写出数据到excel
# 	# write_excel(excel_path, result_values)
コード例 #6
0
class StartApp(tooltk.Tooltk):
    """用于启动的 类"""
    commu = multication.MuCation()
    """"""
    def __init__(self, master_f):
        """
		:param master_f: mian_f , a widget from entrance.py
		"""
        super(StartApp, self).__init__(master_f, "task_dispatch.gc",
                                       self.confirm)
        # block1
        self.single_file_block([(u'地图文档', '*.mxd'), ('All Files', '*')], "mxd")
        # block2
        input_value = tk.StringVar()
        self.single_vari_block(u"选择字段", input_value)
        # block3
        self.single_dir_block(u"输出文件夹")
        # block4
        self.single_text_block(u"分组")
        self.divider_bar_block(self.block_frame,
                               color11="#F1F1F1",
                               color22="#F1F1F1")
        # self.help_text.destroy()
        self.window.mainloop()

    def confirm(self):
        para = self.get_blockvalue(self.input_sfb, self.input_svb,
                                   self.input_sdb, self.input_tb)
        # print "para: ",para
        # print "began!--------------"
        para1 = para[0]
        para2 = para[1]
        para3 = para[2]
        para4 = para[3]
        # dispatch_group_dict = datacooker.str2dict(para4)
        # main_f(para1,para2,para3,dispatch_group_dict)
        p = Process(target=self.commu.decor,
                    args=(self.commu.que, mian_wrap, para1, para2, para3,
                          para4))
        print "task_dispatch___running"
        p.start()
        self.commu.process_communication(self.major_msgframe)
コード例 #7
0
ファイル: multiplexport.py プロジェクト: hygnic/Gispot
    def __init__(self, master1):
        """
        :param master1: mian_f , a widget from tool_entrance.py
        """
        super(MultipExp, self).__init__(master1, "multiplexport.gc",
                                        self.confirm_mu)
        self.name = u"多进程批量导图"
        frame = (self.Frame, self.FrameStatic, self.FrameDynamic)
        # block1
        self.block1 = tooltk.blockDIR_in(frame, u"mxd文档文件夹")
        # block2 取消按钮
        self.block2 = tooltk.blockValue(frame, u"进程数")
        # block3 取消按钮
        self.block3 = tooltk.blockValue(frame, u"出图分辨率")
        # self.addfile_button.config(state = "disable")
        # self.addfile_button.pack_forget()  # 隐藏模块
        # self.addfile_button.destroy()	# 隐藏模块

        # stdout = multication.StdoutQueue()
        # sys.stdout = stdout.new_stdout
        self.commu = multication.MuCation()
コード例 #8
0
class ZLDJGui(tooltk.Tooltk):
    commu = multication.MuCation()

    def __init__(self, master1):
        super(ZLDJGui, self).__init__(master1, "ZLDJ.gc", self.confirm)
        self.name = "质量等级"
        frame = (self.Frame, self.FrameStatic, self.FrameDynamic)
        # block1
        self.block1 = tooltk.blockDIR_in(frame, u"数据文件地址")
        self.block2 = tooltk.blockSheet(frame, u"入库清单")

    def confirm(self):
        v = [self.block1.get(), self.block2.get()]
        zldj_folder = v[0]
        zldj_sheet = v[1]
        p = Process(target=self.commu.decor,
                    args=(main, zldj_folder, zldj_sheet))
        # p.deamon = True
        p.start()
        # 将信息输出到右下方的动态信息栏
        self.commu.process_communication(self.major_msgframe)
コード例 #9
0
ファイル: zldj_cal.py プロジェクト: hygnic/Gispot
class ZLDJCalGui(tooltk.Tooltk):
    commu = multication.MuCation()

    def __init__(self, master1):
        super(ZLDJCalGui, self).__init__(master1, "zldj_cal.gc", self.confirm)
        self.name = u"计算耕地质量等级"
        frame = (self.Frame, self.FrameStatic, self.FrameDynamic)
        # block1
        self.block1 = tooltk.blockDIR_in(frame, u"数据文件地址")
        self.block2 = tooltk.blockShp_in(frame, u"DLTB图层")
        self.block3 = tooltk.blockSheet(frame, u"复核表")

    def confirm(self):
        folder, shp, sheet = [
            self.block1.get(),
            self.block2.get(),
            self.block3.get()
        ]
        p = Process(target=self.commu.decor,
                    args=(run_function, folder, shp, sheet))
        # p.deamon = True
        p.start()
        # 将信息输出到右下方的动态信息栏
        self.commu.process_communication(self.major_msgframe)