class_docstr: Handler for the geographical datasets.
class_docstr_tok: ["Handler","for","the","geographical","datasets","."]
docstr: Get the geolocation dataset.
docstr_tok: ["Get","the","geolocation","dataset","."]
code: def get_dataset(
      self, dataset_id: DataID, dataset_info: dict
  ) -> xr.DataArray:
      """Get the geolocation dataset."""
      # Name of the dataset as it appears in the HDF EOS file
      in_file_dataset_name = dataset_info.get("file_key")
      # Name of the dataset in the YAML file
      dataset_name = dataset_id["name"]
      # Resolution asked
      resolution = dataset_id["resolution"]
      if in_file_dataset_name is not None:
          # if the YAML was configured with a specific name use that
          data = self.load_dataset(in_file_dataset_name)
      else:
          # otherwise use the default name for this variable
          data = self._load_ds_by_name(dataset_name)
      if resolution != self.geo_resolution:
          if in_file_dataset_name is not None:
              # they specified a custom variable name but
              # we don't know how to interpolate this yet
              raise NotImplementedError(
                  "Interpolation for variable '{}' is not "
                  "configured".format(dataset_name)
              )
  
          # The data must be interpolated
          logger.debug("Loading %s", dataset_name)
          if dataset_name in ["longitude", "latitude"]:
              self.get_interpolated_dataset(
                  "longitude", "latitude", resolution
              )
          elif dataset_name in [
              "satellite_azimuth_angle",
              "satellite_zenith_angle",
          ]:
              # Sensor dataset names differs between L1b and L2 products
              self.get_interpolated_dataset(
                  "satellite_azimuth_angle",
                  "satellite_zenith_angle",
                  resolution,
                  offset=90,
              )
          elif dataset_name in [
              "solar_azimuth_angle",
              "solar_zenith_angle",
          ]:
              # Sensor dataset names differs between L1b and L2 products
              self.get_interpolated_dataset(
                  "solar_azimuth_angle",
                  "solar_zenith_angle",
                  resolution,
                  offset=90,
              )
  
          data = self.cache[dataset_name, resolution]
  
      for key in ("standard_name", "units"):
          if key in dataset_info:
              data.attrs[key] = dataset_info[key]
      self._add_satpy_metadata(dataset_id, data)
  
      return data
  
imports: from __future__ import annotations
  import logging
  import re
  from ast import literal_eval
  from contextlib import suppress
  from datetime import datetime
  import numpy
  import xarray
  from pyhdf.error import HDF4Error
  from pyhdf.SD import SD
  from satpy import DataID
  from satpy.readers.file_handlers import BaseFileHandler
  from satpy.utils import normalize_low_res_chunks
label_desc: Use image node_id 9 for calling the HDFEOSGeoReader obj's underlying member method code with example usage: obj.get_dataset(dataset_id, dataset_info) and returns: data