How to use the pvl._collections function in pvl

To help you get started, we’ve selected a few pvl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Arcanewinds / FDL-LunarResources / DataPreparation / AlternativeUnused / coordinateTransform.py View on Github external
for key, value in val.iteritems():
                        try:
                            setattr(self, key, value.value)
                        except:
                            setattr(self, key, value)
                else:
                    setattr(self, key, val)
            self.start_byte = self.RECORD_BYTES
            self.bytesize = 4
            self.projection = str(label['IMAGE_MAP_PROJECTION'][
                                      'MAP_PROJECTION_TYPE'])
            self.dtype = np.float32
        elif self.grid == 'NAC':
            label = load_label(self.img)
            for key, val in label.iteritems():
                if type(val) == pvl._collections.PVLObject:
                    for key, value in val.iteritems():
                        try:
                            setattr(self, key, value.value)
                        except:
                            setattr(self, key, value)
                else:
                    setattr(self, key, val)
            self.start_byte = self.RECORD_BYTES
            self.bytesize = 4
            self.projection = str(label['IMAGE_MAP_PROJECTION'][
                                      'MAP_PROJECTION_TYPE'])
            self.dtype = np.float32
        else:
            with open(self.lbl, 'r') as f:
                for line in f:
                    attr = [f.strip() for f in line.split('=')]

pvl

Python implementation for PVL (Parameter Value Language) parsing and encoding.

BSD-3-Clause
Latest version published 2 years ago

Package Health Score

45 / 100
Full package analysis

Similar packages