예제 #1
0
 def ddFetch(self, featurefile, view, info=0):
   "Fetches pixels for view using ddObject"
   if info == 0:
       info = eval(open(os.path.join(self.infodir, view + '.info')).read())
   else:
       info = eval(open(info).read())
   pixels = set()
   reader = get_reader(os.path.basename(featurefile))
   for x,y,foo,bar in reader.load_file(featurefile)['geom']:
     pixels.add((int(x), int(y)))
     print str(int(x)) + ', ' + str(int(y))
   data = ddGetAllPixels(pixels, info['id'], keep_None=True)
   assert len(data) == len(pixels)
   return data
예제 #2
0
 def ddFetch(self, featurefile, view, info=0):
     "Fetches pixels for view using ddObject"
     if info == 0:
         info = eval(
             open(os.path.join(self.infodir, view + '.info')).read())
     else:
         info = eval(open(info).read())
     pixels = set()
     reader = get_reader(os.path.basename(featurefile))
     for x, y, foo, bar in reader.load_file(featurefile)['geom']:
         pixels.add((int(x), int(y)))
         print str(int(x)) + ', ' + str(int(y))
     data = ddGetAllPixels(pixels, info['id'], keep_None=True)
     assert len(data) == len(pixels)
     return data
예제 #3
0
 def get_pixel_locations(self, pixels):
   return earthMine.ddGetAllPixels(pixels, self.viewId)