class_docstr: Test the SAFE GRD file handler.
class_docstr_tok: ["Test","the","SAFE","GRD","file","handler","."]
docstr: Test reading lons and lats.
docstr_tok: ["Test","reading","lons","and","lats","."]
code: def test_read_lon_lats(self):
      """Test reading lons and lats."""
  
      class FakeGCP:
          def __init__(self, *args):
              self.row, self.col, self.x, self.y, self.z = args
  
      gcps = [
          FakeGCP(0, 0, 0, 0, 0),
          FakeGCP(0, 3, 1, 0, 0),
          FakeGCP(3, 0, 0, 1, 0),
          FakeGCP(3, 3, 1, 1, 0),
          FakeGCP(0, 7, 2, 0, 0),
          FakeGCP(3, 7, 2, 1, 0),
          FakeGCP(7, 7, 2, 2, 0),
          FakeGCP(7, 3, 1, 2, 0),
          FakeGCP(7, 0, 0, 2, 0),
          FakeGCP(0, 15, 3, 0, 0),
          FakeGCP(3, 15, 3, 1, 0),
          FakeGCP(7, 15, 3, 2, 0),
          FakeGCP(15, 15, 3, 3, 0),
          FakeGCP(15, 7, 2, 3, 0),
          FakeGCP(15, 3, 1, 3, 0),
          FakeGCP(15, 0, 0, 3, 0),
      ]
  
      crs = dict(init="epsg:4326")
  
      self.mocked_rio_open.return_value.gcps = [gcps, crs]
      self.mocked_rio_open.return_value.shape = [16, 16]
  
      query = DataQuery(name="longitude", polarization="vv")
      xarr = self.test_fh.get_dataset(query, info=dict())
      expected = np.array(
          [
              [
                  3.79492915e-16,
                  5.91666667e-01,
                  9.09722222e-01,
                  1.00000000e00,
                  9.08333333e-01,
                  6.80555556e-01,
                  3.62500000e-01,
                  8.32667268e-17,
                  -3.61111111e-01,
                  -6.75000000e-01,
                  -8.95833333e-01,
                  -9.77777778e-01,
                  -8.75000000e-01,
                  -5.41666667e-01,
                  6.80555556e-02,
                  1.00000000e00,
              ],
              [
                  1.19166667e00,
                  1.32437500e00,
                  1.36941964e00,
                  1.34166667e00,
                  1.25598214e00,
                  1.12723214e00,
                  9.70282738e-01,
                  8.00000000e-01,
                  6.31250000e-01,
                  4.78898810e-01,
                  3.57812500e-01,
                  2.82857143e-01,
                  2.68898810e-01,
                  3.30803571e-01,
                  4.83437500e-01,
                  7.41666667e-01,
              ],
              [
                  1.82638889e00,
                  1.77596726e00,
                  1.72667765e00,
                  1.67757937e00,
                  1.62773172e00,
                  1.57619402e00,
                  1.52202558e00,
                  1.46428571e00,
                  1.40203373e00,
                  1.33432894e00,
                  1.26023065e00,
                  1.17879819e00,
                  1.08909084e00,
                  9.90167942e-01,
                  8.81088790e-01,
                  7.60912698e-01,
              ],
              [
                  2.00000000e00,
                  1.99166667e00,
                  1.99305556e00,
                  2.00000000e00,
                  2.00833333e00,
                  2.01388889e00,
                  2.01250000e00,
                  2.00000000e00,
                  1.97222222e00,
                  1.92500000e00,
                  1.85416667e00,
                  1.75555556e00,
                  1.62500000e00,
                  1.45833333e00,
                  1.25138889e00,
                  1.00000000e00,
              ],
              [
                  1.80833333e00,
                  2.01669643e00,
                  2.18011267e00,
                  2.30119048e00,
                  2.38253827e00,
                  2.42676446e00,
                  2.43647747e00,
                  2.41428571e00,
                  2.36279762e00,
                  2.28462160e00,
                  2.18236607e00,
                  2.05863946e00,
                  1.91605017e00,
                  1.75720663e00,
                  1.58471726e00,
                  1.40119048e00,
              ],
              [
                  1.34722222e00,
                  1.89627976e00,
                  2.29940830e00,
                  2.57341270e00,
                  2.73509779e00,
                  2.80126842e00,
                  2.78872945e00,
                  2.71428571e00,
                  2.59474206e00,
                  2.44690334e00,
                  2.28757440e00,
                  2.13356009e00,
                  2.00166525e00,
                  1.90869473e00,
                  1.87145337e00,
                  1.90674603e00,
              ],
              [
                  7.12500000e-01,
                  1.67563988e00,
                  2.36250177e00,
                  2.80892857e00,
                  3.05076318e00,
                  3.12384850e00,
                  3.06402742e00,
                  2.90714286e00,
                  2.68903770e00,
                  2.44555485e00,
                  2.21253720e00,
                  2.02582766e00,
                  1.92126913e00,
                  1.93470451e00,
                  2.10197669e00,
                  2.45892857e00,
              ],
              [
                  5.55111512e-16,
                  1.40000000e00,
                  2.38095238e00,
                  3.00000000e00,
                  3.31428571e00,
                  3.38095238e00,
                  3.25714286e00,
                  3.00000000e00,
                  2.66666667e00,
                  2.31428571e00,
                  2.00000000e00,
                  1.78095238e00,
                  1.71428571e00,
                  1.85714286e00,
                  2.26666667e00,
                  3.00000000e00,
              ],
              [
                  -6.94444444e-01,
                  1.11458333e00,
                  2.36631944e00,
                  3.13888889e00,
                  3.51041667e00,
                  3.55902778e00,
                  3.36284722e00,
                  3.00000000e00,
                  2.54861111e00,
                  2.08680556e00,
                  1.69270833e00,
                  1.44444444e00,
                  1.42013889e00,
                  1.69791667e00,
                  2.35590278e00,
                  3.47222222e00,
              ],
              [
                  -1.27500000e00,
                  8.64613095e-01,
                  2.33016227e00,
                  3.21785714e00,
                  3.62390731e00,
                  3.64452239e00,
                  3.37591199e00,
                  2.91428571e00,
                  2.35585317e00,
                  1.79682398e00,
                  1.33340774e00,
                  1.06181406e00,
                  1.07825255e00,
                  1.47893282e00,
                  2.36006448e00,
                  3.81785714e00,
              ],
              [
                  -1.64583333e00,
                  6.95312500e-01,
                  2.28404018e00,
                  3.22916667e00,
                  3.63950893e00,
                  3.62388393e00,
                  3.29110863e00,
                  2.75000000e00,
                  2.10937500e00,
                  1.47805060e00,
                  9.64843750e-01,
                  6.78571429e-01,
                  7.28050595e-01,
                  1.22209821e00,
                  2.26953125e00,
                  3.97916667e00,
              ],
              [
                  -1.71111111e00,
                  6.51904762e-01,
                  2.23951247e00,
                  3.16507937e00,
                  3.54197279e00,
                  3.48356009e00,
                  3.10320862e00,
                  2.51428571e00,
                  1.83015873e00,
                  1.16419501e00,
                  6.29761905e-01,
                  3.40226757e-01,
                  4.08956916e-01,
                  9.49319728e-01,
                  2.07468254e00,
                  3.89841270e00,
              ],
              [
                  -1.37500000e00,
                  7.79613095e-01,
                  2.20813846e00,
                  3.01785714e00,
                  3.31605017e00,
                  3.20999858e00,
                  2.80698342e00,
                  2.21428571e00,
                  1.53918651e00,
                  8.88966837e-01,
                  3.70907738e-01,
                  9.22902494e-02,
                  1.60395408e-01,
                  6.82504252e-01,
                  1.76589782e00,
                  3.51785714e00,
              ],
              [
                  -5.41666667e-01,
                  1.12366071e00,
                  2.20147747e00,
                  2.77976190e00,
                  2.94649235e00,
                  2.78964711e00,
                  2.39720451e00,
                  1.85714286e00,
                  1.25744048e00,
                  6.86075680e-01,
                  2.31026786e-01,
                  -1.97278912e-02,
                  2.17899660e-02,
                  4.43558673e-01,
                  1.33355655e00,
                  2.77976190e00,
              ],
              [
                  8.84722222e-01,
                  1.72927083e00,
                  2.23108879e00,
                  2.44305556e00,
                  2.41805060e00,
                  2.20895337e00,
                  1.86864335e00,
                  1.45000000e00,
                  1.00590278e00,
                  5.89231151e-01,
                  2.52864583e-01,
                  4.96825397e-02,
                  3.25644841e-02,
                  2.54389881e-01,
                  7.68038194e-01,
                  1.62638889e00,
              ],
              [
                  3.00000000e00,
                  2.64166667e00,
                  2.30853175e00,
                  2.00000000e00,
                  1.71547619e00,
                  1.45436508e00,
                  1.21607143e00,
                  1.00000000e00,
                  8.05555556e-01,
                  6.32142857e-01,
                  4.79166667e-01,
                  3.46031746e-01,
                  2.32142857e-01,
                  1.36904762e-01,
                  5.97222222e-02,
                  0.00000000e00,
              ],
          ]
      )
      np.testing.assert_allclose(xarr.values, expected)
  
imports: import unittest
  import unittest.mock
  from enum import Enum
  from io import BytesIO
  import dask.array
  import numpy
  import xarray
  from satpy.dataset import DataQuery
  from satpy.readers.sar_c_safe import SAFEXMLAnnotation, SAFEXMLCalibration, SAFEXMLNoise
label_desc: Use image node_id 5 for calling the TestSAFEGRD obj's underlying member method code with example usage: obj.test_read_lon_lats() without return types