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
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
def get_pixel_locations(self, pixels): return earthMine.ddGetAllPixels(pixels, self.viewId)