当前位置: 首页 > news >正文

网站建设的讲话稿xml网站地图生成

网站建设的讲话稿,xml网站地图生成,南宁公司网站建设方案,简单网站建设模板进入STARS后#xff0c;最简单的学习方法就是演示示例数据。对于源码的分析也可以从这里入手。以下为出发菜单项“Example Project”的函数example#xff1a;def example(self):canned loading of data files and matrices for debugging最简单的学习方法就是演示示例数据。对于源码的分析也可以从这里入手。      以下为出发菜单项“Example Project”的函数exampledef example(self):canned loading of data files and matrices for debuggingself.project SProject(current,self.master,self)        topDir options.getSTARSHOME()self.project.directory os.path.join(topDir,data)projectFile os.path.join(self.project.directory,csiss.prj)tself.project.ReadProjectFile(projectFile)if hasattr(self.project,coords):self.project.scaleCoords()else:self.report(no coords in project)#self.master.configure(cursoroptions.DEFAULTCURSOR)#self.Editor.configure(cursorcrosshair)self.projectSummary()        self.enableMenus()加粗标注的几行代码可作进一步详细了解(1)SProject代码如下所示class SProject(Project):Subclass to compose STARS project inside a GUIdef __init__(self,name,master,app):Constructorname (string): name of projectmaster (Tk): application top level windowapp (App): App instanceProject.__init__(self,name)self.master masterself.app appself.fnt(Times,10)self.screenHeight self.app.winfo_screenheight()self.screenWidth self.app.winfo_screenwidth()if self.screenWidth 1280:self.screenWidth 1280 # prevent spread across 2-extended displayss str(self.screenWidth) str(self.screenHeight)self.screenDim s其中调用了父类Project打开star.py文件找到Project类对其进行分析class Project:Stars project.Example Usage: from stars import Project sProject(s) s.ReadData(csiss) incomes.getVariable(pcincome) regions.getVariable(bea) wspRegionMatrix(region) miMoran(income,w) print(mi.mi[70])0.38918107312def __init__(self,name):self.name nameself.dataBase Database()self.getVariable self.dataBase.getVariableself.getMatrix self.dataBase.getMatrixself.addMatrix self.dataBase.addMatrixself.getMatrixNames self.dataBase.getMatrixNamesself.getVariableNames self.dataBase.getVariableNamesself.getTSVariableNames self.dataBase.getTSVariableNamesself.getCSVariableNames self.dataBase.getCSVariableNamesself.getCSTSVariableNames self.dataBase.getCSTSVariableNames(2)ReadProjectFile代码如下所示def ReadProjectFile(self,fileName):#assumes extension is passed into fileName#check for file existenceif os.path.exists(fileName):self.initialize()config ConfigParser.ConfigParser()config.read(fileName)projectDir os.path.dirname(fileName)#print config.sections()for section in config.sections():options config.options(section)for option in options:value config.get(section,option)#        print section,option,valuesecself.options[section]optsec[option]opt.append(value)sec[option]optself.options[section]sec# self.summarizeOptions()# read data filesdataFiles self.options[data][files]for dataFile in dataFiles:#     print dataFiledfile os.path.join(projectDir,dataFile)#     print dfileself.ReadData(dfile)#print data files# read any gal matriciestry:galFiles self.options[weight][gal][0].split()print galFilesfor galFile in galFiles:#         print galFilegfile os.path.join(projectDir,galFile)self.ReadGalMatrix(gfile)#print galexcept:print No Weights Matrices# read any gis boundary filesself.listGISNames []gisFiles self.options[gis][gis]for gisFile in gisFiles:fileName gisFile.gisself.listGISNames.append(fileName)fileName os.path.join(projectDir,fileName)self.ReadGisFile(fileName)fileName os.path.join(projectDir,gisFile.cnt)if os.path.exists(fileName):self.readCentroids(fileName)else:self.__calcCentroids()self.gisResolution self.options[graphics][screen]else:print Error: Cannot read project file: %s%fileName该段代码可以帮助解析STARS工程文件project的大致结构打开系统自带示例的工程文件csiss.prj[data]files: csiss[weight]gal: states48[gis]gis: us48[graphics]screen: 1280 1201可以发现该文件分为四段前三段分别对应有数据文件、权重文件、GIS文件的连接最后一段为显示参数。·数据文件存储统计数据信息又分为两个文件csiss.dht存储数据索引信息csiss.dat存储数据主体信息其中注释CS为空间序列数据TS为时间序列数据CSTS即为时空序列数据。·权重文件存储空间权重信息后缀名为gal。此文件第一行为空间实体数目从第二行开始每两行构成固定格式形如[第一行]实体序号 权重关联实体个数[第二行]权重关联实体序号列表如此循环至最后一个实体。参见states48.gal文件。·GIS文件(后缀名为gis)存储空间实体的地图数据结构形如[数据头]空间实体编号 该实体内多边形编号 该多边形节点数[数据体]X坐标(换行)Y坐标。参见us48.gis文件。(3)projectSummary代码如下所示def projectSummary(self):self.report(self.project.catalogue())在guimaker.py中找到report函数def report(self,message):enters messages into main application window. use forentering results, commands called by gui, etc.self.Editor.insert(END,message)tlen(message)self.Editor.yview_scroll(t,UNITS)self.Editor.insert(END,\n)
http://www.pierceye.com/news/317476/

相关文章:

  • 网站发布与推广广州品牌网站设计公司
  • 帮忙做公司网站淘宝运营培训多少钱
  • 湘潭网站建设搭建WordPress多条件搜索
  • 信息技术 网站建设教案官网定制
  • 丽水专业网站建设公司淘宝美工培训推荐
  • 如何比较网站小程序商城开发平台
  • 品牌推广宣传词seo整站优化更能准确获得客户
  • 五八同城找工作招聘信息seo服务如何收费
  • 冒充it男给某网站做修复欧美专业牙科医院网站网页源码
  • 搭建网站需要做什么大型 视频网站开发
  • 济南招考院网站网站建设需要些什么东西
  • 手机怎么搭建网站厦门 做网站
  • 网站底部友情链接典型十大优秀网络营销案例
  • 公司装修工程免费推广软件平台seo博客
  • 树状结构的网站一个人可以做多少网站
  • 什么网站是专门做评论赚钱的响应式网站标准尺寸
  • 梅州市建设培训中心网站济南网上房地产
  • 海口网站提升排名专业做公司logo的网站
  • fm网站开发做网站自动赚钱
  • 网站二级导航制作wordpress找人做
  • 网站建设市场占有率网站开发工程师的职责
  • wordpress 单本小说站做网站前景
  • 只做网站可以在百度里收到吗平面设计是干嘛的
  • 义乌网站建设优化推广网站开发需要哪些人怎么分工
  • 关键词排行优化网站企业seo外包
  • 自适应网站怎么做广西建设局建设行政主管部网站
  • 把网站做成手机版学网页设计的培训
  • 陕西省建设厅执业资格注册中心网站报名系统网站建设重庆最加科技
  • 网站优化软件排名器wordpress E405
  • 北京建设部网站职称集约化网站建设方案