コード例 #1
0
 def __init__(self, nodeDict, adjMatrix, instanceName, solution):
     self.nodeDict = nodeDict
     self.adjMatrix = adjMatrix
     self.counts = len(nodeDict)
     self.edgeDict = {}
     self.instanceName = instanceName
     self.solution = solution
     for i in range(self.counts):
         for j in range(i + 1, self.counts):
             vertices = (i, j)
             self.edgeDict[vertices] = self.adjMatrix[i, j]
     self.Bounds = bounds.Bounds(self.nodeDict, self.adjMatrix)
     self.solutions = algorithms.Algorithms(self.nodeDict, self.adjMatrix,
                                            self.counts, self.edgeDict)
コード例 #2
0
def splat_cloud(cloud_id, img_size):

    cur.execute(b)

    b = cur.fetchone()[0]
    b = b.replace('BOX3D(', '')
    b = b.replace(')', '')

    b = b.split(',')
    minx, miny, minz = b[0].split()
    maxx, maxy, maxz = b[1].split()
    # print minx, miny, minz, maxx, maxy, maxz
    return bounds.Bounds(*tuple(
        float(x) for x in (minx, miny, minz, maxx, maxy, maxz)))
コード例 #3
0
    def get_bounds(self):
        cur = self.connection.cursor()
        #all of iowa
        b = 'select box3d(st_extent(extent)) from %s' % self.cloud_table
        cur.execute(b)

        b = cur.fetchone()[0]
        b = b.replace('BOX3D(', '')
        b = b.replace(')', '')

        b = b.split(',')
        minx, miny, minz = b[0].split()
        maxx, maxy, maxz = b[1].split()
        # print minx, miny, minz, maxx, maxy, maxz
        return bounds.Bounds(*tuple(
            float(x) for x in (minx, miny, minz, maxx, maxy, maxz)))
コード例 #4
0
ファイル: lasfile.py プロジェクト: jtpils/weblas
 def get_bounds(self):
     return bounds.Bounds(*tuple(self.f.header.min + self.f.header.max))
コード例 #5
0
 def bounds(self):
     return bounds.Bounds(self.position(), self._size)