摘要: 伍:上菜篇 1、wkb源代码 略 2、sketch.py源代码 #-*-encoding:GBK-*- importwx classSketchWindow(wx.Window): def__init__(self,parent,ID): wx.Window.__init__(self,parent,ID) self.SetBackgroundColour("White"... 阅读全文
posted @ 2008-03-30 19:19 columbus2 阅读(1337) 评论(1) 推荐(0)
摘要: 肆:炒菜篇 1、通过之前介绍的读取shape文件的py脚本,以下面方式将坐标值转换成wkb格式列表 def ShpToCoord(fileIn): shpFile=ogr.Open(fileIn) shpLayer=shpFile.GetLayer() shpExtent=shpLayer.GetExtent() frame.sketch.SetExtent(shpExtent) #print ... 阅读全文
posted @ 2008-03-30 19:12 columbus2 阅读(712) 评论(0) 推荐(0)
摘要: 叁:择菜篇 拿来的程序总是要选择、修改一下的 1、因数据从文件读取,故略去程序原有的鼠标移动、点击事件 self.Bind(wx.EVT_SIZE, self.OnSize) self.Bind(wx.EVT_IDLE, self.OnIdle) self.Bind(wx.EVT_PAINT, self.OnPaint) 并建立必要的菜单 menuBar=wx.MenuBar() mFile=... 阅读全文
posted @ 2008-03-30 00:32 columbus2 阅读(623) 评论(0) 推荐(0)