Exemplo n.º 1
0
 def baseVariableTable(self, sample=1):
     baseData = self.proj.createInitialTable(sample=sample)
     top = Toplevel(self.root)
     table = MixedDataTable(top,
                            baseData,
                            name="Base Data",
                            columnLabels=self.proj.initial.keys())
Exemplo n.º 2
0
 def variableTSTable(self):
     vars = self.proj.getTSVariableNames()
     tab = self.proj.createTableList(vars)
     names = tab[0]
     vals = tab[1]
     top = Toplevel(self.root)
     table = MixedDataTable(top,
                            vals,
                            name="STARS Variables (TS)",
                            columnLabels=names)
Exemplo n.º 3
0
 def variableSpecificTable(self):
     d = sd.SDialogue('View Specific Variable(s)')
     txt = """Choose the name(s) of the CS and CSTS variable(s) you want to
     view in tabular format."""
     cvars = self.proj.getCSVariableNames()
     cstvars = self.proj.getCSTSVariableNames()
     varNames = cvars + cstvars
     sd.DualListBoxes(d,
                      varNames,
                      title="CS and CSTS Variables",
                      helpText=txt)
     tsVars = self.proj.getTSVariableNames()
     txt = """Choose the name(s) of the TS variable(s) you want to view in
     tabular format."""
     sd.DualListBoxes(d, tsVars, title="TS Variables", helpText=txt)
     d.draw()
     if d.status:
         csVars = d.results[0]
         try:
             tab = self.proj.createTableList(csVars)
             names = tab[0]
             vals = tab[1]
             top = Toplevel(self.root)
             table = MixedDataTable(top,
                                    vals,
                                    name="STARS Variables (CS, CSTS)",
                                    columnLabels=names)
         except:
             print "No CS or CSTS Variables identified"
         tsVars = d.results[1]
         try:
             tab = self.proj.createTableList(tsVars)
             names = tab[0]
             vals = tab[1]
             top = Toplevel(self.root)
             table = MixedDataTable(top,
                                    vals,
                                    name="STARS Variables (TS)",
                                    columnLabels=names)
         except:
             print "No TS Variables identified"
Exemplo n.º 4
0
 def variableCS_CSTSTable(self):
     cvars = self.proj.getCSVariableNames()
     cstvars = self.proj.getCSTSVariableNames()
     vars = cvars + cstvars
     tab = self.proj.createTableList(vars)
     names = tab[0]
     vals = tab[1]
     top = Toplevel(self.root)
     table = MixedDataTable(top,
                            vals,
                            name="STARS Variables (CS and CSTS)",
                            columnLabels=names)
Exemplo n.º 5
0
                else:
                    fill = 'blue'

                c.create_polygon(pnts, fill=fill, outline='black')

    projectName = raw_input("Enter shapefile name (with .shp): ")
    if projectName:
        proj = ArcViewProject(projectName)
        proj.summary()
        table = raw_input("Show attribute table (y or n)?")
        if table.upper() == 'Y':

            columnLabels = proj.getVariableNames()
            lists = proj.table2list()
            from DataViewer import MixedDataTable
            table = MixedDataTable(root,
                                   lists,
                                   name=proj.dbfFileName,
                                   columnLabels=columnLabels)

        map = Projection.Map(projectName)
        plot = raw_input("plot shapes (y or n)?")
        top = Toplevel(root)
        if plot.upper() == 'Y':
            v = View(top, map)
            v.plot()
        name = projectName + ".gis"
        map.writer = FileIO.GISWriter(name, map.projected)

        #root.mainloop()