Example #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)
Example #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)
Example #3
0
    def __getitem__(self, chunk):
        pile = self.pile

        return DatasetPile(_fast_slice(pile, chunk[:len(pile.shape)]),
                           self.geobox[chunk[len(pile.shape):]])
Example #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)