示例#1
0
    def __getitem__(self, chunk):
        # TODO: test this functionality, I don't think this works at all
        pile = self.pile

        return VirtualDatasetBox(_fast_slice(pile, chunk[:len(pile.shape)]),
                                 self.geobox[chunk[len(pile.shape):]],
                                 self.product_definitions)
示例#2
0
    def __getitem__(self, chunk):
        if self.load_natively:
            raise VirtualProductException("slicing requires known geobox")

        # TODO implement this properly
        box = self.box

        return VirtualDatasetBox(_fast_slice(box, chunk[:len(box.shape)]),
                                 self.geobox[chunk[len(box.shape):]],
                                 self.load_natively,
                                 self.product_definitions,
                                 geopolygon=self.geopolygon)
示例#3
0
    def __getitem__(self, chunk):
        pile = self.pile

        return DatasetPile(_fast_slice(pile, chunk[:len(pile.shape)]),
                           self.geobox[chunk[len(pile.shape):]])
示例#4
0
    def __getitem__(self, chunk):
        pile = self.pile

        return VirtualDatasetBox(_fast_slice(pile, chunk[:len(pile.shape)]),
                                 self.geobox[chunk[len(pile.shape):]],
                                 self.product_definitions)