def define_transformation(self, dataset_crs, tile_crs):
        osr.UseExceptions()
        try:
            dataset_spatial_reference = self.create_spatial_ref(dataset_crs)
            tile_spatial_reference = self.create_spatial_ref(tile_crs)
            if dataset_spatial_reference is None:
                raise DatasetError('Unknown projecton %s'
                                   % str(dataset_crs))
            if tile_spatial_reference is None:
                raise DatasetError('Unknown projecton %s'
                                   % str(tile_crs))
            return osr.CoordinateTransformation(dataset_spatial_reference,
                                                tile_spatial_reference)
        except Exception:
            raise DatasetError('Coordinate transformation error ' +
                               'for transforming %s to %s' %
                               (str(dataset_crs), str(tile_crs)))
Read Agilent/Varian files in a directory using minimal amount of memory.
dataset/ETHPy150Open GeoscienceAustralia/agdc/src/abstract_ingester/dataset_record.py/DatasetRecord.define_transformation--crossover with--dataset/ETHPy150Open jjhelmus/nmrglue/nmrglue/fileio/varian.py/read_lowmem